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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 MOCK_METHOD0(ClearRefreshToken, void()); | 136 MOCK_METHOD0(ClearRefreshToken, void()); |
137 | 137 |
138 void set_file_data(std::string* file_data) { | 138 void set_file_data(std::string* file_data) { |
139 file_data_.reset(file_data); | 139 file_data_.reset(file_data); |
140 } | 140 } |
141 | 141 |
142 private: | 142 private: |
143 // Helper stub methods for functions which take callbacks, so that | 143 // Helper stub methods for functions which take callbacks, so that |
144 // the callbacks get called with testable results. | 144 // the callbacks get called with testable results. |
145 | 145 |
| 146 // Will call |callback| with HTTP_SUCCESS and a empty ResourceList. |
| 147 void GetChangeListStub(int64 start_changestamp, |
| 148 const GetResourceListCallback& callback); |
| 149 |
146 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current | 150 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current |
147 // value of |account_metadata_|. | 151 // value of |account_metadata_|. |
148 void GetAccountMetadataStub(const GetAccountMetadataCallback& callback); | 152 void GetAccountMetadataStub(const GetAccountMetadataCallback& callback); |
149 | 153 |
150 // Will call |callback| with HTTP_SUCCESS. | 154 // Will call |callback| with HTTP_SUCCESS. |
151 void DeleteResourceStub(const std::string& resource_id, | 155 void DeleteResourceStub(const std::string& resource_id, |
152 const std::string& etag, | 156 const std::string& etag, |
153 const EntryActionCallback& callback); | 157 const EntryActionCallback& callback); |
154 | 158 |
155 // Will call |callback| with HTTP_SUCCESS and the current value of | 159 // Will call |callback| with HTTP_SUCCESS and the current value of |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 scoped_ptr<base::Value> document_data_; | 206 scoped_ptr<base::Value> document_data_; |
203 | 207 |
204 // File data to be written to the local temporary file when | 208 // File data to be written to the local temporary file when |
205 // DownloadFileStub is called. | 209 // DownloadFileStub is called. |
206 scoped_ptr<std::string> file_data_; | 210 scoped_ptr<std::string> file_data_; |
207 }; | 211 }; |
208 | 212 |
209 } // namespace google_apis | 213 } // namespace google_apis |
210 | 214 |
211 #endif // CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ | 215 #endif // CHROME_BROWSER_GOOGLE_APIS_MOCK_DRIVE_SERVICE_H_ |
OLD | NEW |