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

Unified Diff: chrome/browser/chromeos/drive/mock_drive_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/chromeos/drive/mock_drive_service.cc
diff --git a/chrome/browser/chromeos/drive/mock_drive_service.cc b/chrome/browser/chromeos/drive/mock_drive_service.cc
index dc42a758ade0b58978a00a0d45b6275f2cea81fc..42f1e294c509611c212a91a374f7c114cab11915 100644
--- a/chrome/browser/chromeos/drive/mock_drive_service.cc
+++ b/chrome/browser/chromeos/drive/mock_drive_service.cc
@@ -32,9 +32,9 @@ MockDriveService::MockDriveService() {
ON_CALL(*this, GetAccountMetadata(_))
.WillByDefault(Invoke(this,
&MockDriveService::GetAccountMetadataStub));
- ON_CALL(*this, DeleteDocument(_, _))
+ ON_CALL(*this, DeleteDocument(_, _, _))
.WillByDefault(Invoke(this, &MockDriveService::DeleteDocumentStub));
- ON_CALL(*this, DownloadDocument(_, _, _, _, _))
+ ON_CALL(*this, DownloadDocument(_, _, _, _, _, _))
.WillByDefault(Invoke(this, &MockDriveService::DownloadDocumentStub));
ON_CALL(*this, CopyDocument(_, _, _))
.WillByDefault(Invoke(this, &MockDriveService::CopyDocumentStub));
@@ -48,7 +48,7 @@ MockDriveService::MockDriveService() {
Invoke(this, &MockDriveService::RemoveResourceFromDirectoryStub));
ON_CALL(*this, CreateDirectory(_, _, _))
.WillByDefault(Invoke(this, &MockDriveService::CreateDirectoryStub));
- ON_CALL(*this, DownloadFile(_, _, _, _, _))
+ ON_CALL(*this, DownloadFile(_, _, _, _, _, _))
.WillByDefault(Invoke(this, &MockDriveService::DownloadFileStub));
// Fill in the default values for mock feeds.
@@ -102,6 +102,7 @@ void MockDriveService::GetAccountMetadataStub(
void MockDriveService::DeleteDocumentStub(
const GURL& document_url,
+ const std::string& etag,
const gdata::EntryActionCallback& callback) {
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
@@ -113,6 +114,7 @@ void MockDriveService::DownloadDocumentStub(
const FilePath& local_tmp_path,
const GURL& content_url,
DocumentExportFormat format,
+ const std::string& etag,
const gdata::DownloadActionCallback& callback) {
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
@@ -170,6 +172,7 @@ void MockDriveService::DownloadFileStub(
const FilePath& virtual_path,
const FilePath& local_tmp_path,
const GURL& content_url,
+ const std::string& etag,
const gdata::DownloadActionCallback& download_action_callback,
const gdata::GetContentCallback& get_content_callback) {
gdata::GDataErrorCode error = gdata::HTTP_SUCCESS;

Powered by Google App Engine
This is Rietveld 408576698