Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: chrome/browser/google_apis/fake_drive_service.h

Issue 11827045: google_apis: Add set_offline() to FakeDriveService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/fake_drive_service.h
diff --git a/chrome/browser/google_apis/fake_drive_service.h b/chrome/browser/google_apis/fake_drive_service.h
index 0becffd28fb5a96acc8e3fc6d773caa6d7dd1733..f310655596ee6390f8fc3f5e1112d54bdc0e8d22 100644
--- a/chrome/browser/google_apis/fake_drive_service.h
+++ b/chrome/browser/google_apis/fake_drive_service.h
@@ -32,6 +32,10 @@ class FakeDriveService : public DriveServiceInterface {
// Loads the application info for Drive API. Returns true on success.
bool LoadApplicationInfoForDriveApi(const std::string& relative_path);
+ // Changes the offline state. All functions fail with GDATA_NO_CONNECTION
+ // when offline. By default the offline state is false.
+ void set_offline(bool offline) { offline_ = offline; }
+
// DriveServiceInterface Overrides
virtual void Initialize(Profile* profile) OVERRIDE;
virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE;
@@ -119,6 +123,7 @@ class FakeDriveService : public DriveServiceInterface {
scoped_ptr<base::Value> account_metadata_value_;
scoped_ptr<base::Value> app_info_value_;
int resource_id_count_;
+ bool offline_;
DISALLOW_COPY_AND_ASSIGN(FakeDriveService);
};
« no previous file with comments | « no previous file | chrome/browser/google_apis/fake_drive_service.cc » ('j') | chrome/browser/google_apis/fake_drive_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698