| 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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 "components/signin/core/browser/profile_oauth2_token_service.h" | 26 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 27 #include "components/signin/core/browser/signin_error_controller.h" | 27 #include "components/signin/core/browser/signin_error_controller.h" |
| 28 #include "components/signin/core/browser/signin_manager.h" | 28 #include "components/signin/core/browser/signin_manager.h" |
| 29 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
| 30 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
| 31 #include "grit/theme_resources.h" | 31 #include "grit/theme_resources.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | |
| 33 | 32 |
| 34 namespace { | 33 namespace { |
| 35 | 34 |
| 36 scoped_ptr<base::ListValue> GetAvatarIcons() { | 35 scoped_ptr<base::ListValue> GetAvatarIcons() { |
| 37 scoped_ptr<base::ListValue> avatar_icons(new base::ListValue); | 36 scoped_ptr<base::ListValue> avatar_icons(new base::ListValue); |
| 38 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { | 37 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { |
| 39 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); | 38 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); |
| 40 avatar_icons->Append(new base::StringValue(avatar_url)); | 39 avatar_icons->Append(new base::StringValue(avatar_url)); |
| 41 } | 40 } |
| 42 | 41 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 const std::string& key) { | 246 const std::string& key) { |
| 248 if (key == supervised_users::kChromeAvatarIndex) | 247 if (key == supervised_users::kChromeAvatarIndex) |
| 249 FetchSupervisedUsers(); | 248 FetchSupervisedUsers(); |
| 250 } | 249 } |
| 251 | 250 |
| 252 void SupervisedUserImportHandler::OnErrorChanged() { | 251 void SupervisedUserImportHandler::OnErrorChanged() { |
| 253 FetchSupervisedUsers(); | 252 FetchSupervisedUsers(); |
| 254 } | 253 } |
| 255 | 254 |
| 256 } // namespace options | 255 } // namespace options |
| OLD | NEW |