| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/scoped_observer.h" | 11 #include "base/scoped_observer.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/profiles/profile_attributes_storage.h" | 13 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| 14 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" | 14 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
| 15 #include "components/prefs/pref_change_registrar.h" | 15 #include "components/prefs/pref_change_registrar.h" |
| 16 | 16 |
| 17 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
| 18 #include "components/user_manager/user_manager.h" | 18 #include "components/user_manager/user_manager.h" |
| 19 #include "content/public/browser/notification_observer.h" | |
| 20 #include "content/public/browser/notification_registrar.h" | |
| 21 #else | 19 #else |
| 22 #include "chrome/browser/profiles/profile_statistics_common.h" | 20 #include "chrome/browser/profiles/profile_statistics_common.h" |
| 23 #endif | 21 #endif |
| 24 | 22 |
| 25 class Profile; | 23 class Profile; |
| 26 | 24 |
| 27 namespace settings { | 25 namespace settings { |
| 28 | 26 |
| 29 class ProfileInfoHandler : public SettingsPageUIHandler, | 27 class ProfileInfoHandler : public SettingsPageUIHandler, |
| 30 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 void PushProfileManagesSupervisedUsersStatus(); | 77 void PushProfileManagesSupervisedUsersStatus(); |
| 80 | 78 |
| 81 // Returns true if this profile manages supervised users. | 79 // Returns true if this profile manages supervised users. |
| 82 bool IsProfileManagingSupervisedUsers() const; | 80 bool IsProfileManagingSupervisedUsers() const; |
| 83 | 81 |
| 84 std::unique_ptr<base::DictionaryValue> GetAccountNameAndIcon() const; | 82 std::unique_ptr<base::DictionaryValue> GetAccountNameAndIcon() const; |
| 85 | 83 |
| 86 // Weak pointer. | 84 // Weak pointer. |
| 87 Profile* profile_; | 85 Profile* profile_; |
| 88 | 86 |
| 87 #if defined(OS_CHROMEOS) |
| 88 ScopedObserver<user_manager::UserManager, ProfileInfoHandler> |
| 89 user_manager_observer_; |
| 90 #endif |
| 91 |
| 89 ScopedObserver<ProfileAttributesStorage, ProfileInfoHandler> | 92 ScopedObserver<ProfileAttributesStorage, ProfileInfoHandler> |
| 90 profile_observer_; | 93 profile_observer_; |
| 91 | 94 |
| 92 // Used to listen for changes in the list of managed supervised users. | 95 // Used to listen for changes in the list of managed supervised users. |
| 93 PrefChangeRegistrar profile_pref_registrar_; | 96 PrefChangeRegistrar profile_pref_registrar_; |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler); | 98 DISALLOW_COPY_AND_ASSIGN(ProfileInfoHandler); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace settings | 101 } // namespace settings |
| 99 | 102 |
| 100 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ | 103 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PROFILE_INFO_HANDLER_H_ |
| OLD | NEW |