Commit d1d68d8a authored by hidehiko@chromium.org's avatar hidehiko@chromium.org

Implement new methods to replace GetResourceList on GData WAPI.

This CL implements the new methods in GDataWapiService. Because the GData WAPI
will be deprecated, so instead of splitting GetResourceListOperation, keeping
it as is but set some default parameters in GDataWapiService.
The new methods are not used yet, but will be soon used.

BUG=160932
TEST=Ran unit_tests


Review URL: https://chromiumcodereview.appspot.com/13429004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192524 0039d316-1c4b-4281-b951-d872f2087c98
parent c8e65402
......@@ -189,13 +189,25 @@ void GDataWapiService::GetResourceList(
callback));
}
// Because GData WAPI support is expected to be gone somehow soon by migration
// to the Drive API v2, so we'll reuse GetResourceListOperation to implement
// following methods, instead of cleaning the operation class.
void GDataWapiService::GetAllResourceList(
const GetResourceListCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
GURL(), // No override url
0, // start changestamp
"", // empty search query
"", // no directory resource id
callback));
}
void GDataWapiService::GetResourceListInDirectory(
......@@ -205,8 +217,16 @@ void GDataWapiService::GetResourceListInDirectory(
DCHECK(!directory_resource_id.empty());
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
GURL(), // No override url
0, // start changestamp
"", // empty search query
directory_resource_id,
callback));
}
void GDataWapiService::Search(const std::string& search_query,
......@@ -215,8 +235,16 @@ void GDataWapiService::Search(const std::string& search_query,
DCHECK(!search_query.empty());
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
GURL(), // No override url
0, // start changestamp
search_query,
"", // no directory resource id
callback));
}
void GDataWapiService::SearchInDirectory(
......@@ -228,8 +256,16 @@ void GDataWapiService::SearchInDirectory(
DCHECK(!directory_resource_id.empty());
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
GURL(), // No override url
0, // start changestamp
search_query,
directory_resource_id,
callback));
}
void GDataWapiService::GetChangeList(int64 start_changestamp,
......@@ -237,18 +273,35 @@ void GDataWapiService::GetChangeList(int64 start_changestamp,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
GURL(), // No override url
start_changestamp,
"", // empty search query
"", // no directory resource id
callback));
}
void GDataWapiService::ContinueGetResourceList(
const GURL& override_url,
const GetResourceListCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!override_url.is_empty());
DCHECK(!callback.is_null());
// TODO(hidehiko): Implement this.
NOTIMPLEMENTED();
runner_->StartOperationWithRetry(
new GetResourceListOperation(
operation_registry(),
url_request_context_getter_,
url_generator_,
override_url,
0, // start changestamp
"", // empty search query
"", // no directory resource id
callback));
}
void GDataWapiService::GetResourceEntry(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment