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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.h

Issue 98493003: Simplify fileBrowserPrivate.getDriveConnectionStatus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the util function name. Created 7 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system_util.h
diff --git a/chrome/browser/chromeos/drive/file_system_util.h b/chrome/browser/chromeos/drive/file_system_util.h
index 96029f8eca2afbee75d0afcd0aa56669863a8a3d..7766f0c74fe30c47a049bb21c3b06c9bc49dad07 100644
--- a/chrome/browser/chromeos/drive/file_system_util.h
+++ b/chrome/browser/chromeos/drive/file_system_util.h
@@ -204,6 +204,25 @@ std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path);
// Returns true if Drive is enabled for the given Profile.
bool IsDriveEnabledForProfile(Profile* profile);
+// Enum type for describing the current connection status to Drive.
+enum ConnectionStatusType {
+ // Disconnected because Drive service is unavailable for this account (either
+ // disabled by a flag or the account has no Google account (e.g., guests)).
+ DRIVE_DISCONNECTED_NOSERVICE,
+ // Disconnected because no network is available.
+ DRIVE_DISCONNECTED_NONETWORK,
+ // Disconnected because authentication is not ready.
+ DRIVE_DISCONNECTED_NOTREADY,
+ // Connected by cellular network. Background sync is disabled.
+ DRIVE_CONNECTED_METERED,
+ // Connected without condition (WiFi, Ethernet, or cellular with the
+ // disable-sync preference turned off.)
+ DRIVE_CONNECTED,
+};
+
+// Returns the Drive connection status for the |profile|.
+ConnectionStatusType GetDriveConnectionStatus(Profile* profile);
+
} // namespace util
} // namespace drive
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698