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

Unified Diff: chrome/browser/chromeos/gdata/gdata_util.cc

Issue 10214013: Created uber tray UI for monitoring ongoing WebDrive sync operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/chromeos/gdata/gdata_util.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc
index dec6c041ae188847a84bcde0d42558f2b3b8baa7..ff7916ec14b59b60e3dcc866352dc8bd57e509f4 100644
--- a/chrome/browser/chromeos/gdata/gdata_util.cc
+++ b/chrome/browser/chromeos/gdata/gdata_util.cc
@@ -24,6 +24,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
+#include "chrome/browser/chromeos/login/user.h"
+#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -236,6 +238,11 @@ void InsertGDataCachePathsPermissions(
}
bool IsGDataAvailable(Profile* profile) {
+ if (!chromeos::UserManager::Get()->IsUserLoggedIn() ||
+ chromeos::UserManager::Get()->IsLoggedInAsGuest() ||
+ chromeos::UserManager::Get()->IsLoggedInAsDemoUser())
+ return false;
+
// Do not allow GData for incognito windows / guest mode.
if (profile->IsOffTheRecord())
return false;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operation_registry.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698