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

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

Issue 11143014: Add request header on gdata operation for testing ETag match. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix & test fix Created 8 years, 2 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
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 02ee8beba7da4e5745b28d74a693b82497f32e90..19a50b95b5287c58a3198c87d6e36279f5cac123 100644
--- a/chrome/browser/google_apis/gdata_wapi_service.cc
+++ b/chrome/browser/google_apis/gdata_wapi_service.cc
@@ -185,6 +185,7 @@ void GDataWapiService::DownloadDocument(
const FilePath& local_cache_path,
const GURL& document_url,
DocumentExportFormat format,
+ const std::string& etag,
const gdata::DownloadActionCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -194,6 +195,7 @@ void GDataWapiService::DownloadDocument(
chrome_common_net::AppendQueryParameter(document_url,
"exportFormat",
GetExportFormatParam(format)),
+ etag,
callback,
gdata::GetContentCallback());
}
@@ -202,6 +204,7 @@ void GDataWapiService::DownloadFile(
const FilePath& virtual_path,
const FilePath& local_cache_path,
const GURL& document_url,
+ const std::string& etag,
const gdata::DownloadActionCallback& download_action_callback,
const gdata::GetContentCallback& get_content_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -210,17 +213,19 @@ void GDataWapiService::DownloadFile(
new gdata::DownloadFileOperation(operation_registry(),
download_action_callback,
get_content_callback, document_url,
- virtual_path, local_cache_path));
+ virtual_path, local_cache_path,
+ etag));
}
void GDataWapiService::DeleteDocument(
const GURL& document_url,
+ const std::string& etag,
const gdata::EntryActionCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
runner_->StartOperationWithRetry(
new gdata::DeleteDocumentOperation(operation_registry(), callback,
- document_url));
+ document_url, etag));
}
void GDataWapiService::CreateDirectory(

Powered by Google App Engine
This is Rietveld 408576698