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

Side by Side Diff: chrome/browser/chromeos/dom_ui/accounts_options_handler.cc

Issue 5965003: Show warning text in the user settings page for non-owner users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/dom_ui/accounts_options_handler.h" 5 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 localized_strings->SetString("use_whitelist",l10n_util::GetStringUTF16( 46 localized_strings->SetString("use_whitelist",l10n_util::GetStringUTF16(
47 IDS_OPTIONS_ACCOUNTS_USE_WHITELIST_DESCRIPTION)); 47 IDS_OPTIONS_ACCOUNTS_USE_WHITELIST_DESCRIPTION));
48 localized_strings->SetString("show_user_on_signin",l10n_util::GetStringUTF16( 48 localized_strings->SetString("show_user_on_signin",l10n_util::GetStringUTF16(
49 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION)); 49 IDS_OPTIONS_ACCOUNTS_SHOW_USER_NAMES_ON_SINGIN_DESCRIPTION));
50 localized_strings->SetString("username_edit_hint",l10n_util::GetStringUTF16( 50 localized_strings->SetString("username_edit_hint",l10n_util::GetStringUTF16(
51 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT)); 51 IDS_OPTIONS_ACCOUNTS_USERNAME_EDIT_HINT));
52 localized_strings->SetString("username_format",l10n_util::GetStringUTF16( 52 localized_strings->SetString("username_format",l10n_util::GetStringUTF16(
53 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT)); 53 IDS_OPTIONS_ACCOUNTS_USERNAME_FORMAT));
54 localized_strings->SetString("add_users",l10n_util::GetStringUTF16( 54 localized_strings->SetString("add_users",l10n_util::GetStringUTF16(
55 IDS_OPTIONS_ACCOUNTS_ADD_USERS)); 55 IDS_OPTIONS_ACCOUNTS_ADD_USERS));
56 localized_strings->SetString("owner_only", l10n_util::GetStringUTF16(
57 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY));
58 localized_strings->SetString("owner_user_id", UTF8ToUTF16(
59 UserCrosSettingsProvider::cached_owner()));
56 60
57 localized_strings->SetString("current_user_is_owner", 61 localized_strings->SetString("current_user_is_owner",
58 UserManager::Get()->current_user_is_owner() ? 62 UserManager::Get()->current_user_is_owner() ?
59 ASCIIToUTF16("true") : ASCIIToUTF16("false")); 63 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
60 } 64 }
61 65
62 UserCrosSettingsProvider* AccountsOptionsHandler::users_settings() const { 66 UserCrosSettingsProvider* AccountsOptionsHandler::users_settings() const {
63 return static_cast<UserCrosSettingsProvider*>(settings_provider_.get()); 67 return static_cast<UserCrosSettingsProvider*>(settings_provider_.get());
64 } 68 }
65 69
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 user_dict->SetBoolean("owner", false); 117 user_dict->SetBoolean("owner", false);
114 118
115 whitelist_users.Append(user_dict); 119 whitelist_users.Append(user_dict);
116 } 120 }
117 } 121 }
118 122
119 dom_ui_->CallJavascriptFunction(L"AccountsOptions.addUsers", whitelist_users); 123 dom_ui_->CallJavascriptFunction(L"AccountsOptions.addUsers", whitelist_users);
120 } 124 }
121 125
122 } // namespace chromeos 126 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698