| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/core_chromeos_options_handler
.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler
.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // needed by the UI to properly display the Accounts page. | 91 // needed by the UI to properly display the Accounts page. |
| 92 base::Value* CreateUsersWhitelist(const base::Value *pref_value) { | 92 base::Value* CreateUsersWhitelist(const base::Value *pref_value) { |
| 93 const base::ListValue* list_value = | 93 const base::ListValue* list_value = |
| 94 static_cast<const base::ListValue*>(pref_value); | 94 static_cast<const base::ListValue*>(pref_value); |
| 95 base::ListValue* user_list = new base::ListValue(); | 95 base::ListValue* user_list = new base::ListValue(); |
| 96 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 96 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
| 97 | 97 |
| 98 for (base::ListValue::const_iterator i = list_value->begin(); | 98 for (base::ListValue::const_iterator i = list_value->begin(); |
| 99 i != list_value->end(); ++i) { | 99 i != list_value->end(); ++i) { |
| 100 std::string email; | 100 std::string email; |
| 101 if ((*i)->GetAsString(&email)) { | 101 if (i->GetAsString(&email)) { |
| 102 // Translate email to the display email. | 102 // Translate email to the display email. |
| 103 const std::string display_email = | 103 const std::string display_email = |
| 104 user_manager->GetUserDisplayEmail(AccountId::FromUserEmail(email)); | 104 user_manager->GetUserDisplayEmail(AccountId::FromUserEmail(email)); |
| 105 // TODO(ivankr): fetch display name for existing users. | 105 // TODO(ivankr): fetch display name for existing users. |
| 106 user_list->Append(CreateUserInfo(email, display_email, std::string())); | 106 user_list->Append(CreateUserInfo(email, display_email, std::string())); |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 return user_list; | 109 return user_list; |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 GetUiProxyConfigService(), &value); | 417 GetUiProxyConfigService(), &value); |
| 418 DCHECK(value); | 418 DCHECK(value); |
| 419 std::unique_ptr<base::Value> ptr(value); | 419 std::unique_ptr<base::Value> ptr(value); |
| 420 DispatchPrefChangeNotification( | 420 DispatchPrefChangeNotification( |
| 421 proxy_cros_settings_parser::kProxySettings[i], std::move(ptr)); | 421 proxy_cros_settings_parser::kProxySettings[i], std::move(ptr)); |
| 422 } | 422 } |
| 423 } | 423 } |
| 424 | 424 |
| 425 } // namespace options | 425 } // namespace options |
| 426 } // namespace chromeos | 426 } // namespace chromeos |
| OLD | NEW |