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 #ifndef CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/drive/drive_service_interface.h" | 10 #include "chrome/browser/drive/drive_service_interface.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // Changes the offline state. All functions fail with GDATA_NO_CONNECTION | 39 // Changes the offline state. All functions fail with GDATA_NO_CONNECTION |
40 // when offline. By default the offline state is false. | 40 // when offline. By default the offline state is false. |
41 void set_offline(bool offline) { offline_ = offline; } | 41 void set_offline(bool offline) { offline_ = offline; } |
42 | 42 |
43 // Changes the default max results returned from GetResourceList(). | 43 // Changes the default max results returned from GetResourceList(). |
44 // By default, it's set to 0, which is unlimited. | 44 // By default, it's set to 0, which is unlimited. |
45 void set_default_max_results(int default_max_results) { | 45 void set_default_max_results(int default_max_results) { |
46 default_max_results_ = default_max_results; | 46 default_max_results_ = default_max_results; |
47 } | 47 } |
48 | 48 |
| 49 // Sets the url to the test server to be used as a base for generated share |
| 50 // urls to the share dialog. |
| 51 void set_share_url_base(const GURL& share_url_base) { |
| 52 share_url_base_ = share_url_base; |
| 53 } |
| 54 |
49 // Returns the largest changestamp, which starts from 0 by default. See | 55 // Returns the largest changestamp, which starts from 0 by default. See |
50 // also comments at LoadAccountMetadataForWapi(). | 56 // also comments at LoadAccountMetadataForWapi(). |
51 int64 largest_changestamp() const { return largest_changestamp_; } | 57 int64 largest_changestamp() const { return largest_changestamp_; } |
52 | 58 |
53 // Returns the number of times the resource list is successfully loaded by | 59 // Returns the number of times the resource list is successfully loaded by |
54 // GetAllResourceList(). | 60 // GetAllResourceList(). |
55 int resource_list_load_count() const { return resource_list_load_count_; } | 61 int resource_list_load_count() const { return resource_list_load_count_; } |
56 | 62 |
57 // Returns the number of times the resource list is successfully loaded by | 63 // Returns the number of times the resource list is successfully loaded by |
58 // GetChangeList(). | 64 // GetChangeList(). |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 int64 published_date_seq_; | 273 int64 published_date_seq_; |
268 int64 next_upload_sequence_number_; | 274 int64 next_upload_sequence_number_; |
269 int default_max_results_; | 275 int default_max_results_; |
270 int resource_id_count_; | 276 int resource_id_count_; |
271 int resource_list_load_count_; | 277 int resource_list_load_count_; |
272 int change_list_load_count_; | 278 int change_list_load_count_; |
273 int directory_load_count_; | 279 int directory_load_count_; |
274 int about_resource_load_count_; | 280 int about_resource_load_count_; |
275 bool offline_; | 281 bool offline_; |
276 base::FilePath last_cancelled_file_; | 282 base::FilePath last_cancelled_file_; |
| 283 GURL share_url_base_; |
277 | 284 |
278 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); | 285 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); |
279 }; | 286 }; |
280 | 287 |
281 } // namespace drive | 288 } // namespace drive |
282 | 289 |
283 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 290 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
OLD | NEW |