| 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 "chrome/browser/drive/drive_service_interface.h" | 9 #include "chrome/browser/drive/drive_service_interface.h" |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Returns the file path whose request is cancelled just before this method | 107 // Returns the file path whose request is cancelled just before this method |
| 108 // invocation. | 108 // invocation. |
| 109 const base::FilePath& last_cancelled_file() const { | 109 const base::FilePath& last_cancelled_file() const { |
| 110 return last_cancelled_file_; | 110 return last_cancelled_file_; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // Returns the (fake) URL for the link. | 113 // Returns the (fake) URL for the link. |
| 114 static GURL GetFakeLinkUrl(const std::string& resource_id); | 114 static GURL GetFakeLinkUrl(const std::string& resource_id); |
| 115 | 115 |
| 116 // Sets the printf format for constructing the response of AuthorizeApp(). |
| 117 // The format string must include two %s that are to be filled with |
| 118 // resource_id and app_id. |
| 119 void set_open_url_format(const std::string& url_format) { |
| 120 open_url_format_ = url_format; |
| 121 } |
| 122 |
| 116 // DriveServiceInterface Overrides | 123 // DriveServiceInterface Overrides |
| 117 virtual void Initialize(const std::string& account_id) OVERRIDE; | 124 virtual void Initialize(const std::string& account_id) OVERRIDE; |
| 118 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; | 125 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; |
| 119 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; | 126 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; |
| 120 virtual bool CanSendRequest() const OVERRIDE; | 127 virtual bool CanSendRequest() const OVERRIDE; |
| 121 virtual ResourceIdCanonicalizer GetResourceIdCanonicalizer() const OVERRIDE; | 128 virtual ResourceIdCanonicalizer GetResourceIdCanonicalizer() const OVERRIDE; |
| 122 virtual std::string GetRootResourceId() const OVERRIDE; | 129 virtual std::string GetRootResourceId() const OVERRIDE; |
| 123 virtual bool HasAccessToken() const OVERRIDE; | 130 virtual bool HasAccessToken() const OVERRIDE; |
| 124 virtual void RequestAccessToken( | 131 virtual void RequestAccessToken( |
| 125 const google_apis::AuthStatusCallback& callback) OVERRIDE; | 132 const google_apis::AuthStatusCallback& callback) OVERRIDE; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 int change_list_load_count_; | 348 int change_list_load_count_; |
| 342 int directory_load_count_; | 349 int directory_load_count_; |
| 343 int about_resource_load_count_; | 350 int about_resource_load_count_; |
| 344 int app_list_load_count_; | 351 int app_list_load_count_; |
| 345 int blocked_file_list_load_count_; | 352 int blocked_file_list_load_count_; |
| 346 bool offline_; | 353 bool offline_; |
| 347 bool never_return_all_file_list_; | 354 bool never_return_all_file_list_; |
| 348 base::FilePath last_cancelled_file_; | 355 base::FilePath last_cancelled_file_; |
| 349 GURL share_url_base_; | 356 GURL share_url_base_; |
| 350 std::string app_json_template_; | 357 std::string app_json_template_; |
| 358 std::string open_url_format_; |
| 351 | 359 |
| 352 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); | 360 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); |
| 353 }; | 361 }; |
| 354 | 362 |
| 355 } // namespace drive | 363 } // namespace drive |
| 356 | 364 |
| 357 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 365 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
| OLD | NEW |