Chromium Code Reviews| Index: chrome/browser/google_apis/gdata_wapi_service.cc |
| diff --git a/chrome/browser/google_apis/gdata_wapi_service.cc b/chrome/browser/google_apis/gdata_wapi_service.cc |
| index 6ec26c2acf23097d2ff448938e39e525a9e3283d..31f751d7406184c45f0db6dc19c08ecd55864514 100644 |
| --- a/chrome/browser/google_apis/gdata_wapi_service.cc |
| +++ b/chrome/browser/google_apis/gdata_wapi_service.cc |
| @@ -191,13 +191,26 @@ 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 |
| + false, // shared_with_me |
|
hashimoto
2013/04/04 09:24:45
nit: Please be consistent to use one of "shared_wi
hidehiko
2013/04/05 05:17:56
Acknowledged.
Fortunately (?), shared_with_me was
|
| + "", // no directory resource id |
| + callback)); |
| } |
| void GDataWapiService::GetResourceListInDirectory( |
| @@ -207,8 +220,17 @@ 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 |
| + false, // no shared with me |
| + directory_resource_id, |
| + callback)); |
| } |
| void GDataWapiService::Search(const std::string& search_query, |
| @@ -217,8 +239,17 @@ 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, |
| + false, // no shared with me |
| + "", // no directory resource id |
| + callback)); |
| } |
| void GDataWapiService::SearchInDirectory( |
| @@ -230,8 +261,17 @@ 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, |
| + false, // no shared with me |
| + directory_resource_id, |
| + callback)); |
| } |
| void GDataWapiService::GetChangeList(int64 start_changestamp, |
| @@ -239,18 +279,37 @@ 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 |
| + false, // shared_with_me |
| + "", // 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 |
| + false, // shared_with_me |
| + "", // no directory resource id |
| + callback)); |
| } |
| void GDataWapiService::GetResourceEntry( |