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

Unified Diff: chrome/browser/managed_mode/managed_user_sync_service.h

Issue 23691045: Update managed user registration to allow updating the avatar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bauerb Created 7 years, 3 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/managed_mode/managed_user_sync_service.h
diff --git a/chrome/browser/managed_mode/managed_user_sync_service.h b/chrome/browser/managed_mode/managed_user_sync_service.h
index 89bfdac24bebd06c63b287d01c6ebfd14d8a3193..3a64eacdb5fd0f0d0878ba0c2d7abbde431454ad 100644
--- a/chrome/browser/managed_mode/managed_user_sync_service.h
+++ b/chrome/browser/managed_mode/managed_user_sync_service.h
@@ -36,8 +36,9 @@ class ManagedUserSyncService : public BrowserContextKeyedService,
static const char kAcknowledged[];
static const char kChromeAvatar[];
static const char kChromeOsAvatar[];
- static const char kName[];
static const char kMasterKey[];
+ static const char kName[];
+ static const int kNoAvatar;
Bernhard Bauer 2013/09/13 20:17:24 Some grouping comments would be nice (in particula
ibra 2013/09/16 08:59:09 Done.
virtual ~ManagedUserSyncService();
@@ -66,6 +67,15 @@ class ManagedUserSyncService : public BrowserContextKeyedService,
int avatar_index);
void DeleteManagedUser(const std::string& id);
+ // Updates the managed user avatar only if the managed user has
+ // no avatar and |avatar_index| is set to some value other than
+ // |kNoAvatar|. If |avatar_index| equals |kNoAvatar| and the
+ // managed user has an avatar, it will be cleared.
Bernhard Bauer 2013/09/13 20:17:24 Hm, this makes ClearManagedUserAvatar() basically
ibra 2013/09/16 08:59:09 Done.
+ // Returns true if the avatar value is changed (either updated or cleared)
+ // and false otherwise.
+ bool UpdateManagedUserAvatarIfNeeded(const std::string& id, int avatar_index);
+ void ClearManagedUserAvatar(const std::string& id);
+
// Returns a dictionary containing all managed users managed by this
// custodian. This method should only be called once this service has started
// syncing managed users (i.e. has finished its initial merge of local and

Powered by Google App Engine
This is Rietveld 408576698