OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 virtual ~ManagedUserSyncService(); | 36 virtual ~ManagedUserSyncService(); |
37 | 37 |
38 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 38 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
39 | 39 |
40 void AddObserver(ManagedUserSyncServiceObserver* observer); | 40 void AddObserver(ManagedUserSyncServiceObserver* observer); |
41 void RemoveObserver(ManagedUserSyncServiceObserver* observer); | 41 void RemoveObserver(ManagedUserSyncServiceObserver* observer); |
42 | 42 |
43 void AddManagedUser(const std::string& id, | 43 void AddManagedUser(const std::string& id, |
44 const std::string& name, | 44 const std::string& name, |
45 const std::string& master_key); | 45 const std::string& master_key, |
| 46 int avatar_index); |
46 void DeleteManagedUser(const std::string& id); | 47 void DeleteManagedUser(const std::string& id); |
47 | 48 |
48 // Returns a dictionary containing all managed users managed by this | 49 // Returns a dictionary containing all managed users managed by this |
49 // custodian. This method should only be called once this service has started | 50 // custodian. This method should only be called once this service has started |
50 // syncing managed users (i.e. has finished its initial merge of local and | 51 // syncing managed users (i.e. has finished its initial merge of local and |
51 // server-side data, via MergeDataAndStartSyncing), as the stored data might | 52 // server-side data, via MergeDataAndStartSyncing), as the stored data might |
52 // be outdated before that. | 53 // be outdated before that. |
53 const base::DictionaryValue* GetManagedUsers(); | 54 const base::DictionaryValue* GetManagedUsers(); |
54 | 55 |
55 // Calls the passed |callback| with a dictionary containing all managed users | 56 // Calls the passed |callback| with a dictionary containing all managed users |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 scoped_ptr<syncer::SyncErrorFactory> error_handler_; | 94 scoped_ptr<syncer::SyncErrorFactory> error_handler_; |
94 | 95 |
95 ObserverList<ManagedUserSyncServiceObserver> observers_; | 96 ObserverList<ManagedUserSyncServiceObserver> observers_; |
96 | 97 |
97 std::vector<ManagedUsersCallback> callbacks_; | 98 std::vector<ManagedUsersCallback> callbacks_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(ManagedUserSyncService); | 100 DISALLOW_COPY_AND_ASSIGN(ManagedUserSyncService); |
100 }; | 101 }; |
101 | 102 |
102 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ | 103 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SYNC_SERVICE_H_ |
OLD | NEW |