| 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/options2/chromeos/accounts_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/accounts_options_handler2.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION)); | 76 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION)); |
| 77 localized_strings->SetString("username_edit_hint", l10n_util::GetStringUTF16( | 77 localized_strings->SetString("username_edit_hint", l10n_util::GetStringUTF16( |
| 78 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT)); | 78 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT)); |
| 79 localized_strings->SetString("username_format", l10n_util::GetStringUTF16( | 79 localized_strings->SetString("username_format", l10n_util::GetStringUTF16( |
| 80 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT)); | 80 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT)); |
| 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 localized_strings->SetString("whitelist_is_managed", | 86 localized_strings->SetBoolean("whitelist_is_managed", |
| 87 g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ? | 87 g_browser_process->browser_policy_connector()->IsEnterpriseManaged()); |
| 88 ASCIIToUTF16("true") : ASCIIToUTF16("false")); | |
| 89 | 88 |
| 90 AddAccountUITweaksLocalizedValues(localized_strings); | 89 AddAccountUITweaksLocalizedValues(localized_strings); |
| 91 } | 90 } |
| 92 | 91 |
| 93 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { | 92 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { |
| 94 std::string typed_email; | 93 std::string typed_email; |
| 95 std::string name; | 94 std::string name; |
| 96 if (!args->GetString(0, &typed_email) || | 95 if (!args->GetString(0, &typed_email) || |
| 97 !args->GetString(1, &name)) { | 96 !args->GetString(1, &name)) { |
| 98 return; | 97 return; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 130 |
| 132 const UserList& users = UserManager::Get()->GetUsers(); | 131 const UserList& users = UserManager::Get()->GetUsers(); |
| 133 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) | 132 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) |
| 134 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); | 133 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); |
| 135 | 134 |
| 136 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); | 135 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); |
| 137 } | 136 } |
| 138 | 137 |
| 139 } // namespace options2 | 138 } // namespace options2 |
| 140 } // namespace chromeos | 139 } // namespace chromeos |
| OLD | NEW |