Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/accounts_options_handler2.cc

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: plugins, ui_account_tweaks fixes Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION)); 74 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION));
75 localized_strings->SetString("username_edit_hint",l10n_util::GetStringUTF16( 75 localized_strings->SetString("username_edit_hint",l10n_util::GetStringUTF16(
76 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT)); 76 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT));
77 localized_strings->SetString("username_format",l10n_util::GetStringUTF16( 77 localized_strings->SetString("username_format",l10n_util::GetStringUTF16(
78 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT)); 78 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT));
79 localized_strings->SetString("add_users",l10n_util::GetStringUTF16( 79 localized_strings->SetString("add_users",l10n_util::GetStringUTF16(
80 IDS_OPTIONS_ACCOUNTS_ADD_USERS)); 80 IDS_OPTIONS_ACCOUNTS_ADD_USERS));
81 localized_strings->SetString("owner_only", l10n_util::GetStringUTF16( 81 localized_strings->SetString("owner_only", l10n_util::GetStringUTF16(
82 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); 82 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY));
83 83
84 localized_strings->SetString("whitelist_is_managed", 84 localized_strings->SetBoolean("whitelist_is_managed",
85 g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ? 85 g_browser_process->browser_policy_connector()->IsEnterpriseManaged());
86 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
87 86
88 AddAccountUITweaksLocalizedValues(localized_strings); 87 AddAccountUITweaksLocalizedValues(localized_strings);
89 } 88 }
90 89
91 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { 90 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) {
92 std::string typed_email; 91 std::string typed_email;
93 std::string name; 92 std::string name;
94 if (!args->GetString(0, &typed_email) || 93 if (!args->GetString(0, &typed_email) ||
95 !args->GetString(1, &name)) { 94 !args->GetString(1, &name)) {
96 return; 95 return;
(...skipping 19 matching lines...) Expand all
116 DCHECK(args && args->empty()); 115 DCHECK(args && args->empty());
117 116
118 const UserList& users = UserManager::Get()->GetUsers(); 117 const UserList& users = UserManager::Get()->GetUsers();
119 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) { 118 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) {
120 WhitelistUser((*it)->email()); 119 WhitelistUser((*it)->email());
121 } 120 }
122 } 121 }
123 122
124 } // namespace options2 123 } // namespace options2
125 } // namespace chromeos 124 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698