summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/drive/mock_drive_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/drive/mock_drive_service.h')
-rw-r--r--chrome/browser/chromeos/drive/mock_drive_service.h112
1 files changed, 60 insertions, 52 deletions
diff --git a/chrome/browser/chromeos/drive/mock_drive_service.h b/chrome/browser/chromeos/drive/mock_drive_service.h
index 32b9129..a8e46f5 100644
--- a/chrome/browser/chromeos/drive/mock_drive_service.h
+++ b/chrome/browser/chromeos/drive/mock_drive_service.h
@@ -31,64 +31,70 @@ class MockDriveService : public DriveServiceInterface {
MOCK_METHOD0(CancelAll, void(void));
MOCK_METHOD1(CancelForFilePath, bool(const FilePath& file_path));
MOCK_CONST_METHOD0(GetProgressStatusList,
- gdata::OperationProgressStatusList());
- MOCK_METHOD1(Authenticate, void(const gdata::AuthStatusCallback& callback));
- MOCK_METHOD5(GetDocuments, void(const GURL& feed_url,
- int64 start_changestamp,
- const std::string& search_string,
- const std::string& directory_resource_id,
- const gdata::GetDataCallback& callback));
- MOCK_METHOD2(GetDocumentEntry, void(const std::string& resource_id,
- const gdata::GetDataCallback& callback));
+ google_apis::OperationProgressStatusList());
+ MOCK_METHOD1(Authenticate,
+ void(const google_apis::AuthStatusCallback& callback));
+ MOCK_METHOD5(GetDocuments,
+ void(const GURL& feed_url,
+ int64 start_changestamp,
+ const std::string& search_string,
+ const std::string& directory_resource_id,
+ const google_apis::GetDataCallback& callback));
+ MOCK_METHOD2(GetDocumentEntry,
+ void(const std::string& resource_id,
+ const google_apis::GetDataCallback& callback));
MOCK_METHOD1(GetAccountMetadata,
- void(const gdata::GetDataCallback& callback));
+ void(const google_apis::GetDataCallback& callback));
MOCK_METHOD1(GetApplicationInfo,
- void(const gdata::GetDataCallback& callback));
+ void(const google_apis::GetDataCallback& callback));
MOCK_METHOD2(DeleteDocument,
void(const GURL& document_url,
- const gdata::EntryActionCallback& callback));
+ const google_apis::EntryActionCallback& callback));
MOCK_METHOD5(DownloadDocument,
void(const FilePath& virtual_path,
const FilePath& local_cache_path,
const GURL& content_url,
DocumentExportFormat format,
- const gdata::DownloadActionCallback& callback));
- MOCK_METHOD3(CopyDocument, void(const std::string& resource_id,
- const FilePath::StringType& new_name,
- const gdata::GetDataCallback& callback));
+ const google_apis::DownloadActionCallback& callback));
+ MOCK_METHOD3(CopyDocument,
+ void(const std::string& resource_id,
+ const FilePath::StringType& new_name,
+ const google_apis::GetDataCallback& callback));
MOCK_METHOD3(RenameResource,
void(const GURL& resource_url,
const FilePath::StringType& new_name,
- const gdata::EntryActionCallback& callback));
+ const google_apis::EntryActionCallback& callback));
MOCK_METHOD3(AddResourceToDirectory,
void(const GURL& parent_content_url,
const GURL& resource_url,
- const gdata::EntryActionCallback& callback));
+ const google_apis::EntryActionCallback& callback));
MOCK_METHOD4(RemoveResourceFromDirectory,
void(const GURL& parent_content_url,
const GURL& resource_url,
const std::string& resource_id,
- const gdata::EntryActionCallback& callback));
+ const google_apis::EntryActionCallback& callback));
MOCK_METHOD3(CreateDirectory,
void(const GURL& parent_content_url,
const FilePath::StringType& directory_name,
- const gdata::GetDataCallback& callback));
- MOCK_METHOD5(DownloadFile,
- void(const FilePath& virtual_path,
- const FilePath& local_cache_path,
- const GURL& content_url,
- const gdata::DownloadActionCallback&
- donwload_action_callback,
- const gdata::GetContentCallback& get_content_callback));
+ const google_apis::GetDataCallback& callback));
+ MOCK_METHOD5(
+ DownloadFile,
+ void(const FilePath& virtual_path,
+ const FilePath& local_cache_path,
+ const GURL& content_url,
+ const google_apis::DownloadActionCallback&
+ donwload_action_callback,
+ const google_apis::GetContentCallback& get_content_callback));
MOCK_METHOD2(InitiateUpload,
- void(const gdata::InitiateUploadParams& upload_file_info,
- const gdata::InitiateUploadCallback& callback));
+ void(const google_apis::InitiateUploadParams& upload_file_info,
+ const google_apis::InitiateUploadCallback& callback));
MOCK_METHOD2(ResumeUpload,
- void(const gdata::ResumeUploadParams& upload_file_info,
- const gdata::ResumeUploadCallback& callback));
- MOCK_METHOD3(AuthorizeApp, void(const GURL& resource_url,
- const std::string& app_ids,
- const gdata::GetDataCallback& callback));
+ void(const google_apis::ResumeUploadParams& upload_file_info,
+ const google_apis::ResumeUploadCallback& callback));
+ MOCK_METHOD3(AuthorizeApp,
+ void(const GURL& resource_url,
+ const std::string& app_ids,
+ const google_apis::GetDataCallback& callback));
MOCK_CONST_METHOD0(HasAccessToken, bool());
MOCK_CONST_METHOD0(HasRefreshToken, bool());
@@ -116,7 +122,7 @@ class MockDriveService : public DriveServiceInterface {
// Will call |callback| with HTTP_SUCCESS and the token "test_auth_token"
// as the token.
- void AuthenticateStub(const gdata::AuthStatusCallback& callback);
+ void AuthenticateStub(const google_apis::AuthStatusCallback& callback);
// Will call |callback| with HTTP_SUCCESS and a StringValue with the current
// value of |feed_data_|.
@@ -124,52 +130,54 @@ class MockDriveService : public DriveServiceInterface {
int64 start_changestamp,
const std::string& search_string,
const std::string& directory_resource_id,
- const gdata::GetDataCallback& callback);
+ const google_apis::GetDataCallback& callback);
// Will call |callback| with HTTP_SUCCESS and a StringValue with the current
// value of |account_metadata_|.
- void GetAccountMetadataStub(const gdata::GetDataCallback& callback);
+ void GetAccountMetadataStub(const google_apis::GetDataCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the |document_url|.
void DeleteDocumentStub(const GURL& document_url,
- const gdata::EntryActionCallback& callback);
+ const google_apis::EntryActionCallback& callback);
// Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path
// portion of the URL as the temporary file path.
- void DownloadDocumentStub(const FilePath& virtual_path,
- const FilePath& local_tmp_path,
- const GURL& content_url,
- DocumentExportFormat format,
- const gdata::DownloadActionCallback& callback);
+ void DownloadDocumentStub(
+ const FilePath& virtual_path,
+ const FilePath& local_tmp_path,
+ const GURL& content_url,
+ DocumentExportFormat format,
+ const google_apis::DownloadActionCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the current value of
// |document_data_|.
void CopyDocumentStub(const std::string& resource_id,
const FilePath::StringType& new_name,
- const gdata::GetDataCallback& callback);
+ const google_apis::GetDataCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the |document_url|.
void RenameResourceStub(const GURL& document_url,
const FilePath::StringType& new_name,
- const gdata::EntryActionCallback& callback);
+ const google_apis::EntryActionCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the |resource_url|.
- void AddResourceToDirectoryStub(const GURL& parent_content_url,
- const GURL& resource_url,
- const gdata::EntryActionCallback& callback);
+ void AddResourceToDirectoryStub(
+ const GURL& parent_content_url,
+ const GURL& resource_url,
+ const google_apis::EntryActionCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the |resource_url|.
void RemoveResourceFromDirectoryStub(
const GURL& parent_content_url,
const GURL& resource_url,
const std::string& resource_id,
- const gdata::EntryActionCallback& callback);
+ const google_apis::EntryActionCallback& callback);
// Will call |callback| with HTTP_SUCCESS and the current value of
// |directory_data_|.
void CreateDirectoryStub(const GURL& parent_content_url,
const FilePath::StringType& directory_name,
- const gdata::GetDataCallback& callback);
+ const google_apis::GetDataCallback& callback);
// Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path
// portion of the URL as the temporary file path. If |file_data_| is not null,
@@ -178,8 +186,8 @@ class MockDriveService : public DriveServiceInterface {
const FilePath& virtual_path,
const FilePath& local_tmp_path,
const GURL& content_url,
- const gdata::DownloadActionCallback& download_action_callback,
- const gdata::GetContentCallback& get_content_callback);
+ const google_apis::DownloadActionCallback& download_action_callback,
+ const google_apis::GetContentCallback& get_content_callback);
// Account meta data to be returned from GetAccountMetadata.
scoped_ptr<base::Value> account_metadata_;