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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "components/signin/core/browser/signin_manager.h" | 31 #include "components/signin/core/browser/signin_manager.h" |
32 #include "content/public/browser/web_ui.h" | 32 #include "content/public/browser/web_ui.h" |
33 #include "grit/theme_resources.h" | 33 #include "grit/theme_resources.h" |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 std::unique_ptr<base::ListValue> GetAvatarIcons() { | 37 std::unique_ptr<base::ListValue> GetAvatarIcons() { |
38 std::unique_ptr<base::ListValue> avatar_icons(new base::ListValue); | 38 std::unique_ptr<base::ListValue> avatar_icons(new base::ListValue); |
39 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { | 39 for (size_t i = 0; i < profiles::GetDefaultAvatarIconCount(); ++i) { |
40 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); | 40 std::string avatar_url = profiles::GetDefaultAvatarIconUrl(i); |
41 avatar_icons->Append(new base::StringValue(avatar_url)); | 41 avatar_icons->AppendString(avatar_url); |
42 } | 42 } |
43 | 43 |
44 return avatar_icons; | 44 return avatar_icons; |
45 } | 45 } |
46 | 46 |
47 bool ProfileIsLegacySupervised(const base::FilePath& profile_path) { | 47 bool ProfileIsLegacySupervised(const base::FilePath& profile_path) { |
48 ProfileAttributesEntry* entry; | 48 ProfileAttributesEntry* entry; |
49 | 49 |
50 return g_browser_process->profile_manager()->GetProfileAttributesStorage(). | 50 return g_browser_process->profile_manager()->GetProfileAttributesStorage(). |
51 GetProfileAttributesWithPath(profile_path, &entry) && | 51 GetProfileAttributesWithPath(profile_path, &entry) && |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 const std::string& key) { | 292 const std::string& key) { |
293 if (key == supervised_users::kChromeAvatarIndex) | 293 if (key == supervised_users::kChromeAvatarIndex) |
294 FetchSupervisedUsers(); | 294 FetchSupervisedUsers(); |
295 } | 295 } |
296 | 296 |
297 void SupervisedUserImportHandler::OnErrorChanged() { | 297 void SupervisedUserImportHandler::OnErrorChanged() { |
298 FetchSupervisedUsers(); | 298 FetchSupervisedUsers(); |
299 } | 299 } |
300 | 300 |
301 } // namespace options | 301 } // namespace options |
OLD | NEW |