| 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 gdata_documents_service.h | 5 // This file contains mocks for classes in gdata_documents_service.h |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
| 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const EntryActionCallback& callback)); | 66 const EntryActionCallback& callback)); |
| 67 MOCK_METHOD3(CreateDirectory, | 67 MOCK_METHOD3(CreateDirectory, |
| 68 void(const GURL& parent_content_url, | 68 void(const GURL& parent_content_url, |
| 69 const FilePath::StringType& directory_name, | 69 const FilePath::StringType& directory_name, |
| 70 const GetDataCallback& callback)); | 70 const GetDataCallback& callback)); |
| 71 MOCK_METHOD5(DownloadFile, | 71 MOCK_METHOD5(DownloadFile, |
| 72 void(const FilePath& virtual_path, | 72 void(const FilePath& virtual_path, |
| 73 const FilePath& local_cache_path, | 73 const FilePath& local_cache_path, |
| 74 const GURL& content_url, | 74 const GURL& content_url, |
| 75 const DownloadActionCallback& donwload_action_callback, | 75 const DownloadActionCallback& donwload_action_callback, |
| 76 const GetDownloadDataCallback& get_download_data_callback)); | 76 const GetContentCallback& get_content_callback)); |
| 77 MOCK_METHOD2(InitiateUpload, | 77 MOCK_METHOD2(InitiateUpload, |
| 78 void(const InitiateUploadParams& upload_file_info, | 78 void(const InitiateUploadParams& upload_file_info, |
| 79 const InitiateUploadCallback& callback)); | 79 const InitiateUploadCallback& callback)); |
| 80 MOCK_METHOD2(ResumeUpload, void(const ResumeUploadParams& upload_file_info, | 80 MOCK_METHOD2(ResumeUpload, void(const ResumeUploadParams& upload_file_info, |
| 81 const ResumeUploadCallback& callback)); | 81 const ResumeUploadCallback& callback)); |
| 82 MOCK_METHOD3(AuthorizeApp, void(const GURL& resource_url, | 82 MOCK_METHOD3(AuthorizeApp, void(const GURL& resource_url, |
| 83 const std::string& app_ids, | 83 const std::string& app_ids, |
| 84 const GetDataCallback& callback)); | 84 const GetDataCallback& callback)); |
| 85 MOCK_CONST_METHOD0(HasAccessToken, bool()); | 85 MOCK_CONST_METHOD0(HasAccessToken, bool()); |
| 86 MOCK_CONST_METHOD0(HasRefreshToken, bool()); | 86 MOCK_CONST_METHOD0(HasRefreshToken, bool()); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 const GetDataCallback& callback); | 164 const GetDataCallback& callback); |
| 165 | 165 |
| 166 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path | 166 // Will call |callback| with HTTP_SUCCESS, the given URL, and the host+path |
| 167 // portion of the URL as the temporary file path. If |file_data_| is not null, | 167 // portion of the URL as the temporary file path. If |file_data_| is not null, |
| 168 // |file_data_| is written to the temporary file. | 168 // |file_data_| is written to the temporary file. |
| 169 void DownloadFileStub( | 169 void DownloadFileStub( |
| 170 const FilePath& virtual_path, | 170 const FilePath& virtual_path, |
| 171 const FilePath& local_tmp_path, | 171 const FilePath& local_tmp_path, |
| 172 const GURL& content_url, | 172 const GURL& content_url, |
| 173 const DownloadActionCallback& download_action_callback, | 173 const DownloadActionCallback& download_action_callback, |
| 174 const GetDownloadDataCallback& get_download_data_callback); | 174 const GetContentCallback& get_content_callback); |
| 175 | 175 |
| 176 // Account meta data to be returned from GetAccountMetadata. | 176 // Account meta data to be returned from GetAccountMetadata. |
| 177 scoped_ptr<base::Value> account_metadata_; | 177 scoped_ptr<base::Value> account_metadata_; |
| 178 | 178 |
| 179 // Feed data to be returned from GetDocuments. | 179 // Feed data to be returned from GetDocuments. |
| 180 scoped_ptr<base::Value> feed_data_; | 180 scoped_ptr<base::Value> feed_data_; |
| 181 | 181 |
| 182 // Feed data to be returned from CreateDirectory. | 182 // Feed data to be returned from CreateDirectory. |
| 183 scoped_ptr<base::Value> directory_data_; | 183 scoped_ptr<base::Value> directory_data_; |
| 184 | 184 |
| 185 // Feed data to be returned from CopyDocument. | 185 // Feed data to be returned from CopyDocument. |
| 186 scoped_ptr<base::Value> document_data_; | 186 scoped_ptr<base::Value> document_data_; |
| 187 | 187 |
| 188 // Feed data to be returned from GetDocuments if the search path is specified. | 188 // Feed data to be returned from GetDocuments if the search path is specified. |
| 189 // The feed contains subset of the root_feed. | 189 // The feed contains subset of the root_feed. |
| 190 scoped_ptr<base::Value> search_result_; | 190 scoped_ptr<base::Value> search_result_; |
| 191 | 191 |
| 192 // File data to be written to the local temporary file when | 192 // File data to be written to the local temporary file when |
| 193 // DownloadDocumentStub is called. | 193 // DownloadDocumentStub is called. |
| 194 scoped_ptr<std::string> file_data_; | 194 scoped_ptr<std::string> file_data_; |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace gdata | 197 } // namespace gdata |
| 198 | 198 |
| 199 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 199 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
| OLD | NEW |