| 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/accounts_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 localized_strings->SetString("add_users", l10n_util::GetStringUTF16( | 81 localized_strings->SetString("add_users", l10n_util::GetStringUTF16( |
| 82 IDS_OPTIONS_ACCOUNTS_ADD_USERS)); | 82 IDS_OPTIONS_ACCOUNTS_ADD_USERS)); |
| 83 localized_strings->SetString("owner_only", l10n_util::GetStringUTF16( | 83 localized_strings->SetString("owner_only", l10n_util::GetStringUTF16( |
| 84 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); | 84 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); |
| 85 | 85 |
| 86 policy::BrowserPolicyConnectorChromeOS* connector = | 86 policy::BrowserPolicyConnectorChromeOS* connector = |
| 87 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 87 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 88 localized_strings->SetBoolean("whitelist_is_managed", | 88 localized_strings->SetBoolean("whitelist_is_managed", |
| 89 connector->IsEnterpriseManaged()); | 89 connector->IsEnterpriseManaged()); |
| 90 | 90 |
| 91 AddAccountUITweaksLocalizedValues(localized_strings); | 91 AddAccountUITweaksLocalizedValues(localized_strings, |
| 92 Profile::FromWebUI(web_ui())); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { | 95 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { |
| 95 std::string typed_email; | 96 std::string typed_email; |
| 96 std::string name; | 97 std::string name; |
| 97 if (!args->GetString(0, &typed_email) || | 98 if (!args->GetString(0, &typed_email) || |
| 98 !args->GetString(1, &name)) { | 99 !args->GetString(1, &name)) { |
| 99 return; | 100 return; |
| 100 } | 101 } |
| 101 | 102 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 132 | 133 |
| 133 const UserList& users = UserManager::Get()->GetUsers(); | 134 const UserList& users = UserManager::Get()->GetUsers(); |
| 134 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) | 135 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) |
| 135 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); | 136 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); |
| 136 | 137 |
| 137 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); | 138 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); |
| 138 } | 139 } |
| 139 | 140 |
| 140 } // namespace options | 141 } // namespace options |
| 141 } // namespace chromeos | 142 } // namespace chromeos |
| OLD | NEW |