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

Unified Diff: chrome/browser/google_apis/drive_service_interface.h

Issue 11143014: Add request header on gdata operation for testing ETag match. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment 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/drive_service_interface.h
diff --git a/chrome/browser/google_apis/drive_service_interface.h b/chrome/browser/google_apis/drive_service_interface.h
index 412a9295e35355b7a33229ef93411298c2637e4a..ffe47a8e5dee84d8bbabb5234ba93df25788f728 100644
--- a/chrome/browser/google_apis/drive_service_interface.h
+++ b/chrome/browser/google_apis/drive_service_interface.h
@@ -145,18 +145,22 @@ class DriveServiceInterface {
// Upon completion, invokes |callback| with results on the calling thread.
virtual void GetApplicationInfo(const gdata::GetDataCallback& callback) = 0;
- // Deletes a document identified by its 'self' |url| and |etag|.
+ // Deletes a document identified by its 'self' |document_url|.
+ // If |etag| is set, checks if it matches the document before deletion.
satorux1 2012/10/17 03:14:27 If etag does not match, what happens? Please docum
// Upon completion, invokes |callback| with results on the calling thread.
virtual void DeleteDocument(const GURL& document_url,
+ const std::string& etag,
const gdata::EntryActionCallback& callback) = 0;
// Downloads a document identified by its |content_url| in a given |format|.
+ // If |etag| is set, checks if it matches the document before downloading.
satorux1 2012/10/17 03:14:27 ditto.
// Upon completion, invokes |callback| with results on the calling thread.
virtual void DownloadDocument(
const FilePath& virtual_path,
const FilePath& local_cache_path,
const GURL& content_url,
DocumentExportFormat format,
+ const std::string& etag,
const gdata::DownloadActionCallback& callback) = 0;
// Makes a copy of a document identified by its |resource_id|.
@@ -202,9 +206,11 @@ class DriveServiceInterface {
const FilePath::StringType& directory_name,
const gdata::GetDataCallback& callback) = 0;
- // Downloads a file identified by its |content_url|. The downloaded file will
- // be stored at |local_cache_path| location. Upon completion, invokes
- // |download_action_callback| with results on the calling thread.
+ // Downloads a file identified by its |content_url|.
+ // If |etag| is set, checks if it matches the file before downloading.
satorux1 2012/10/17 03:14:27 ditto.
+ // The downloaded file will be stored at |local_cache_path| location.
+ // Upon completion, invokes |download_action_callback| with results on the
+ // calling thread.
// If |get_content_callback| is not empty,
// URLFetcherDelegate::OnURLFetchDownloadData will be called, which will in
// turn invoke |get_content_callback| on the calling thread.
@@ -212,6 +218,7 @@ class DriveServiceInterface {
const FilePath& virtual_path,
const FilePath& local_cache_path,
const GURL& content_url,
+ const std::string& etag,
const gdata::DownloadActionCallback& download_action_callback,
const gdata::GetContentCallback& get_content_callback) = 0;

Powered by Google App Engine
This is Rietveld 408576698