| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains mocks for classes in drive_service_interface.h | 5 // This file contains mocks for classes in drive_service_interface.h |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ |
| 8 #define CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ | 8 #define CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const FilePath::StringType& new_name, | 61 const FilePath::StringType& new_name, |
| 62 const GetDataCallback& callback)); | 62 const GetDataCallback& callback)); |
| 63 MOCK_METHOD3(RenameResource, | 63 MOCK_METHOD3(RenameResource, |
| 64 void(const GURL& resource_url, | 64 void(const GURL& resource_url, |
| 65 const FilePath::StringType& new_name, | 65 const FilePath::StringType& new_name, |
| 66 const EntryActionCallback& callback)); | 66 const EntryActionCallback& callback)); |
| 67 MOCK_METHOD3(AddResourceToDirectory, | 67 MOCK_METHOD3(AddResourceToDirectory, |
| 68 void(const GURL& parent_content_url, | 68 void(const GURL& parent_content_url, |
| 69 const GURL& resource_url, | 69 const GURL& resource_url, |
| 70 const EntryActionCallback& callback)); | 70 const EntryActionCallback& callback)); |
| 71 MOCK_METHOD4(RemoveResourceFromDirectory, | 71 MOCK_METHOD3(RemoveResourceFromDirectory, |
| 72 void(const GURL& parent_content_url, | 72 void(const GURL& parent_content_url, |
| 73 const GURL& resource_url, | |
| 74 const std::string& resource_id, | 73 const std::string& resource_id, |
| 75 const EntryActionCallback& callback)); | 74 const EntryActionCallback& callback)); |
| 76 MOCK_METHOD3(AddNewDirectory, | 75 MOCK_METHOD3(AddNewDirectory, |
| 77 void(const GURL& parent_content_url, | 76 void(const GURL& parent_content_url, |
| 78 const FilePath::StringType& directory_name, | 77 const FilePath::StringType& directory_name, |
| 79 const GetDataCallback& callback)); | 78 const GetDataCallback& callback)); |
| 80 MOCK_METHOD5( | 79 MOCK_METHOD5( |
| 81 DownloadFile, | 80 DownloadFile, |
| 82 void(const FilePath& virtual_path, | 81 void(const FilePath& virtual_path, |
| 83 const FilePath& local_cache_path, | 82 const FilePath& local_cache_path, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 int64 start_changestamp, | 129 int64 start_changestamp, |
| 131 const std::string& search_string, | 130 const std::string& search_string, |
| 132 bool shared_with_me, | 131 bool shared_with_me, |
| 133 const std::string& directory_resource_id, | 132 const std::string& directory_resource_id, |
| 134 const GetDataCallback& callback); | 133 const GetDataCallback& callback); |
| 135 | 134 |
| 136 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current | 135 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current |
| 137 // value of |account_metadata_|. | 136 // value of |account_metadata_|. |
| 138 void GetAccountMetadataStub(const GetDataCallback& callback); | 137 void GetAccountMetadataStub(const GetDataCallback& callback); |
| 139 | 138 |
| 140 // Will call |callback| with HTTP_SUCCESS and the |document_url|. | 139 // Will call |callback| with HTTP_SUCCESS. |
| 141 void DeleteDocumentStub(const GURL& document_url, | 140 void DeleteDocumentStub(const GURL& document_url, |
| 142 const EntryActionCallback& callback); | 141 const EntryActionCallback& callback); |
| 143 | 142 |
| 144 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path | 143 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path |
| 145 // portion of the URL as the temporary file path. | 144 // portion of the URL as the temporary file path. |
| 146 void DownloadDocumentStub( | 145 void DownloadDocumentStub( |
| 147 const FilePath& virtual_path, | 146 const FilePath& virtual_path, |
| 148 const FilePath& local_tmp_path, | 147 const FilePath& local_tmp_path, |
| 149 const GURL& content_url, | 148 const GURL& content_url, |
| 150 DocumentExportFormat format, | 149 DocumentExportFormat format, |
| 151 const DownloadActionCallback& callback); | 150 const DownloadActionCallback& callback); |
| 152 | 151 |
| 153 // Will call |callback| with HTTP_SUCCESS and the current value of | 152 // Will call |callback| with HTTP_SUCCESS and the current value of |
| 154 // |document_data_|. | 153 // |document_data_|. |
| 155 void CopyDocumentStub(const std::string& resource_id, | 154 void CopyDocumentStub(const std::string& resource_id, |
| 156 const FilePath::StringType& new_name, | 155 const FilePath::StringType& new_name, |
| 157 const GetDataCallback& callback); | 156 const GetDataCallback& callback); |
| 158 | 157 |
| 159 // Will call |callback| with HTTP_SUCCESS and the |document_url|. | 158 // Will call |callback| with HTTP_SUCCESS. |
| 160 void RenameResourceStub(const GURL& document_url, | 159 void RenameResourceStub(const GURL& document_url, |
| 161 const FilePath::StringType& new_name, | 160 const FilePath::StringType& new_name, |
| 162 const EntryActionCallback& callback); | 161 const EntryActionCallback& callback); |
| 163 | 162 |
| 164 // Will call |callback| with HTTP_SUCCESS and the |resource_url|. | 163 // Will call |callback| with HTTP_SUCCESS. |
| 165 void AddResourceToDirectoryStub( | 164 void AddResourceToDirectoryStub( |
| 166 const GURL& parent_content_url, | 165 const GURL& parent_content_url, |
| 167 const GURL& resource_url, | 166 const GURL& resource_url, |
| 168 const EntryActionCallback& callback); | 167 const EntryActionCallback& callback); |
| 169 | 168 |
| 170 // Will call |callback| with HTTP_SUCCESS and the |resource_url|. | 169 // Will call |callback| with HTTP_SUCCESS. |
| 171 void RemoveResourceFromDirectoryStub( | 170 void RemoveResourceFromDirectoryStub( |
| 172 const GURL& parent_content_url, | 171 const GURL& parent_content_url, |
| 173 const GURL& resource_url, | |
| 174 const std::string& resource_id, | 172 const std::string& resource_id, |
| 175 const EntryActionCallback& callback); | 173 const EntryActionCallback& callback); |
| 176 | 174 |
| 177 // Will call |callback| with HTTP_SUCCESS and the current value of | 175 // Will call |callback| with HTTP_SUCCESS and the current value of |
| 178 // |directory_data_|. | 176 // |directory_data_|. |
| 179 void CreateDirectoryStub(const GURL& parent_content_url, | 177 void CreateDirectoryStub(const GURL& parent_content_url, |
| 180 const FilePath::StringType& directory_name, | 178 const FilePath::StringType& directory_name, |
| 181 const GetDataCallback& callback); | 179 const GetDataCallback& callback); |
| 182 | 180 |
| 183 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path | 181 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path |
| (...skipping 23 matching lines...) Expand all Loading... |
| 207 scoped_ptr<base::Value> search_result_; | 205 scoped_ptr<base::Value> search_result_; |
| 208 | 206 |
| 209 // File data to be written to the local temporary file when | 207 // File data to be written to the local temporary file when |
| 210 // DownloadDocumentStub is called. | 208 // DownloadDocumentStub is called. |
| 211 scoped_ptr<std::string> file_data_; | 209 scoped_ptr<std::string> file_data_; |
| 212 }; | 210 }; |
| 213 | 211 |
| 214 } // namespace google_apis | 212 } // namespace google_apis |
| 215 | 213 |
| 216 #endif // CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ | 214 #endif // CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ |
| OLD | NEW |