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

Unified Diff: chrome/browser/google_apis/gdata_util.cc

Issue 11094061: drive: Move IsDriveEnabled() and DisableDrive() to DriveSystemService (Closed) Base URL: http://git.chromium.org/chromium/src.git@drive_available
Patch Set: address comments Created 8 years, 2 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
« no previous file with comments | « chrome/browser/google_apis/gdata_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/gdata_util.cc
diff --git a/chrome/browser/google_apis/gdata_util.cc b/chrome/browser/google_apis/gdata_util.cc
index 782823d7fa24085b7c9e576a0002c1e1bce1656b..5ef2db6dd86f763f621a643fed6afabb273edf46 100644
--- a/chrome/browser/google_apis/gdata_util.cc
+++ b/chrome/browser/google_apis/gdata_util.cc
@@ -60,47 +60,8 @@ bool ParseTimezone(const base::StringPiece& timezone,
return true;
}
-// Map to collect profiles with Drive disabled.
-std::map<Profile*, bool>* g_drive_disabled_map = NULL;
-
} // namespace
-bool IsDriveEnabled(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- if (!AuthService::CanAuthenticate(profile))
- return false;
-
-#if defined(OS_CHROMEOS)
- // Disable gdata if preference is set. This can happen with commandline flag
- // --disable-gdata or enterprise policy, or probably with user settings too
- // in the future.
- if (profile->GetPrefs()->GetBoolean(prefs::kDisableGData))
- return false;
-
- if (g_drive_disabled_map && g_drive_disabled_map->count(profile) > 0)
- return false;
-
- return true;
-#else
- // TODO(nhiroki): Check if GData is available or not in a platform
- // independent way (http://crbug.com/147529).
- return false;
-#endif // OS_CHROMEOS
-}
-
-void DisableDrive(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- // We don't change kDisableGData preference here. If we do, we'll end up
- // disabling Drive on other devices, as kDisableGData is a syncable
- // preference. Hence the map is used here.
- if (!g_drive_disabled_map)
- g_drive_disabled_map = new std::map<Profile*, bool>;
-
- g_drive_disabled_map->insert(std::make_pair(profile, true));
-}
-
bool IsDriveV2ApiEnabled() {
// TODO(kochi): Re-enable this. crbug.com/152230
return false;
« no previous file with comments | « chrome/browser/google_apis/gdata_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698