OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
13 #include "chrome/browser/prefs/pref_service_syncable_observer.h" | 12 #include "chrome/browser/prefs/pref_service_syncable_observer.h" |
14 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
15 | 14 |
16 class PrefChangeRegistrar; | 15 class PrefChangeRegistrar; |
17 class PrefServiceSyncable; | 16 class PrefServiceSyncable; |
18 class Profile; | 17 class Profile; |
19 namespace chromeos { | 18 |
20 class User; | |
21 } | |
22 namespace content { | 19 namespace content { |
23 class NotificationRegistrar; | 20 class NotificationRegistrar; |
24 } | 21 } |
25 namespace user_prefs { | 22 namespace user_prefs { |
26 class PrefRegistrySyncable; | 23 class PrefRegistrySyncable; |
27 } | 24 } |
28 | 25 |
| 26 namespace user_manager { |
| 27 class User; |
| 28 } |
| 29 |
29 namespace chromeos { | 30 namespace chromeos { |
30 | 31 |
31 // This class is responsible for keeping local user image synced with | 32 // This class is responsible for keeping local user image synced with |
32 // image saved in syncable preference. | 33 // image saved in syncable preference. |
33 class UserImageSyncObserver: public PrefServiceSyncableObserver, | 34 class UserImageSyncObserver: public PrefServiceSyncableObserver, |
34 public content::NotificationObserver { | 35 public content::NotificationObserver { |
35 public: | 36 public: |
36 class Observer { | 37 class Observer { |
37 public: | 38 public: |
38 // Called right after image info synced (i.e. |is_synced| became |true|). | 39 // Called right after image info synced (i.e. |is_synced| became |true|). |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 bool is_synced_; | 96 bool is_synced_; |
96 // Indicates if local user image changed during initialization. | 97 // Indicates if local user image changed during initialization. |
97 bool local_image_changed_; | 98 bool local_image_changed_; |
98 ObserverList<Observer> observer_list_; | 99 ObserverList<Observer> observer_list_; |
99 }; | 100 }; |
100 | 101 |
101 } // namespace chromeos | 102 } // namespace chromeos |
102 | 103 |
103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H
_ | 104 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_SYNC_OBSERVER_H
_ |
104 | 105 |
OLD | NEW |