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 #include "chrome/browser/ui/webui/options/supervised_user_import_handler.h" | 5 #include "chrome/browser/ui/webui/options/supervised_user_import_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 14 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
15 #include "chrome/browser/profiles/profile_info_cache.h" | 15 #include "chrome/browser/profiles/profile_info_cache.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
18 #include "chrome/browser/signin/signin_manager_factory.h" | 18 #include "chrome/browser/signin/signin_manager_factory.h" |
19 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 19 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
20 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" | 20 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" |
21 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" | 21 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
_factory.h" |
22 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" | 22 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" |
23 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" | 23 #include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h" |
24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
25 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
| 26 #include "chrome/grit/generated_resources.h" |
26 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 27 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
27 #include "components/signin/core/browser/signin_error_controller.h" | 28 #include "components/signin/core/browser/signin_error_controller.h" |
28 #include "components/signin/core/browser/signin_manager.h" | 29 #include "components/signin/core/browser/signin_manager.h" |
29 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
30 #include "grit/generated_resources.h" | |
31 #include "grit/theme_resources.h" | 31 #include "grit/theme_resources.h" |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 scoped_ptr<base::ListValue> GetAvatarIcons() { | 35 scoped_ptr<base::ListValue> GetAvatarIcons() { |
36 scoped_ptr<base::ListValue> avatar_icons(new base::ListValue); | 36 scoped_ptr<base::ListValue> avatar_icons(new base::ListValue); |
37 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { | 37 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { |
38 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); | 38 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); |
39 avatar_icons->Append(new base::StringValue(avatar_url)); | 39 avatar_icons->Append(new base::StringValue(avatar_url)); |
40 } | 40 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 const std::string& key) { | 246 const std::string& key) { |
247 if (key == supervised_users::kChromeAvatarIndex) | 247 if (key == supervised_users::kChromeAvatarIndex) |
248 FetchSupervisedUsers(); | 248 FetchSupervisedUsers(); |
249 } | 249 } |
250 | 250 |
251 void SupervisedUserImportHandler::OnErrorChanged() { | 251 void SupervisedUserImportHandler::OnErrorChanged() { |
252 FetchSupervisedUsers(); | 252 FetchSupervisedUsers(); |
253 } | 253 } |
254 | 254 |
255 } // namespace options | 255 } // namespace options |
OLD | NEW |