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

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

Issue 23523038: Display supervised users synced avatars in the import overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avatar_sync_2
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
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 832ba5109b73b39ef4cf4e277d0e4af82da17270..89bfdac24bebd06c63b287d01c6ebfd14d8a3193 100644
--- a/chrome/browser/managed_mode/managed_user_sync_service.h
+++ b/chrome/browser/managed_mode/managed_user_sync_service.h
@@ -33,10 +33,30 @@ class ManagedUserSyncService : public BrowserContextKeyedService,
typedef base::Callback<void(const base::DictionaryValue*)>
ManagedUsersCallback;
+ static const char kAcknowledged[];
+ static const char kChromeAvatar[];
+ static const char kChromeOsAvatar[];
+ static const char kName[];
+ static const char kMasterKey[];
+
virtual ~ManagedUserSyncService();
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+ // Extracts the avatar index from the input |avatar_str| and set
+ // |avatar_index| to hold the extracted value. Returns true if the
+ // index was extracted successfully and false otherwise.
+ // |avatar_str| should have the format: "chrome-avatar-index:INDEX"
+ // where INDEX is the integer to be extracted. |avatar_str| can be empty
+ // in case there is no avatar synced for a managed user in which case
+ // |avatar_index| is set to -1.
+ static bool GetAvatarIndex(const std::string& avatar_str, int* avatar_index);
+
+ // Given an |avatar_index|, it returns a string of the form:
+ // "chrome-avatar-index:INDEX" where INDEX = |avatar_index|.
+ // It is exposed for testing purposes only.
+ static std::string BuildAvatarString(int avatar_index);
+
void AddObserver(ManagedUserSyncServiceObserver* observer);
void RemoveObserver(ManagedUserSyncServiceObserver* observer);
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698