Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: chrome/browser/google_apis/gdata_wapi_service.cc

Issue 13429004: Implement new methods to replace GetResourceList on GData WAPI. (Closed) Base URL: http://git.chromium.org/chromium/src.git@b160932_move_parse_resource_list_and_run
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 181009eb077b37f4ebe5dfe9cd91c1da75e69138..47edcf656b118b26a6087a6c8524a2ad2d08d883 100644
--- a/chrome/browser/google_apis/gdata_wapi_service.cc
+++ b/chrome/browser/google_apis/gdata_wapi_service.cc
@@ -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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698