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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 10876085: Add button tooltip is different for enterprise owned device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.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/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 21 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
22 #include "chrome/browser/chromeos/input_method/xkeyboard.h" 22 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
23 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 23 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
24 #include "chrome/browser/chromeos/login/base_login_display_host.h" 24 #include "chrome/browser/chromeos/login/base_login_display_host.h"
25 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" 25 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
26 #include "chrome/browser/chromeos/login/screen_locker.h" 26 #include "chrome/browser/chromeos/login/screen_locker.h"
27 #include "chrome/browser/chromeos/login/user.h" 27 #include "chrome/browser/chromeos/login/user.h"
28 #include "chrome/browser/chromeos/login/webui_login_display.h" 28 #include "chrome/browser/chromeos/login/webui_login_display.h"
29 #include "chrome/browser/chromeos/settings/cros_settings.h" 29 #include "chrome/browser/chromeos/settings/cros_settings.h"
30 #include "chrome/browser/io_thread.h" 30 #include "chrome/browser/io_thread.h"
31 #include "chrome/browser/policy/browser_policy_connector.h"
31 #include "chrome/browser/profiles/profile.h" 32 #include "chrome/browser/profiles/profile.h"
32 #include "chrome/common/chrome_notification_types.h" 33 #include "chrome/common/chrome_notification_types.h"
33 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
34 #include "chrome/common/net/gaia/gaia_auth_util.h" 35 #include "chrome/common/net/gaia/gaia_auth_util.h"
35 #include "chrome/common/net/gaia/gaia_urls.h" 36 #include "chrome/common/net/gaia/gaia_urls.h"
36 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
37 #include "chromeos/dbus/dbus_thread_manager.h" 38 #include "chromeos/dbus/dbus_thread_manager.h"
38 #include "chromeos/dbus/power_manager_client.h" 39 #include "chromeos/dbus/power_manager_client.h"
39 #include "content/public/browser/notification_observer.h" 40 #include "content/public/browser/notification_observer.h"
40 #include "content/public/browser/notification_registrar.h" 41 #include "content/public/browser/notification_registrar.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 l10n_util::GetStringUTF16(IDS_LOGIN_PROXY_ERROR_MESSAGE)); 355 l10n_util::GetStringUTF16(IDS_LOGIN_PROXY_ERROR_MESSAGE));
355 localized_strings->SetString("createAccount", 356 localized_strings->SetString("createAccount",
356 l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_HTML)); 357 l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_HTML));
357 localized_strings->SetString("guestSignin", 358 localized_strings->SetString("guestSignin",
358 l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_HTML)); 359 l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_HTML));
359 localized_strings->SetString("offlineLogin", 360 localized_strings->SetString("offlineLogin",
360 l10n_util::GetStringUTF16(IDS_OFFLINE_LOGIN_HTML)); 361 l10n_util::GetStringUTF16(IDS_OFFLINE_LOGIN_HTML));
361 localized_strings->SetString("removeUser", 362 localized_strings->SetString("removeUser",
362 l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)); 363 l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE));
363 localized_strings->SetString("disabledAddUserTooltip", 364 localized_strings->SetString("disabledAddUserTooltip",
364 l10n_util::GetStringUTF16(IDS_DISABLED_ADD_USER_TOOLTIP)); 365 l10n_util::GetStringUTF16(
366 g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ?
367 IDS_DISABLED_ADD_USER_TOOLTIP_ENTERPRISE :
368 IDS_DISABLED_ADD_USER_TOOLTIP));
365 369
366 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { 370 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) {
367 localized_strings->SetString("demoLoginMessage", 371 localized_strings->SetString("demoLoginMessage",
368 l10n_util::GetStringUTF16(IDS_KIOSK_MODE_LOGIN_MESSAGE)); 372 l10n_util::GetStringUTF16(IDS_KIOSK_MODE_LOGIN_MESSAGE));
369 } 373 }
370 } 374 }
371 375
372 void SigninScreenHandler::Show(bool oobe_ui) { 376 void SigninScreenHandler::Show(bool oobe_ui) {
373 CHECK(delegate_); 377 CHECK(delegate_);
374 oobe_ui_ = oobe_ui; 378 oobe_ui_ = oobe_ui;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 if (!delegate_) 843 if (!delegate_)
840 return; 844 return;
841 845
842 std::string email; 846 std::string email;
843 if (!args->GetString(0, &email)) { 847 if (!args->GetString(0, &email)) {
844 NOTREACHED(); 848 NOTREACHED();
845 return; 849 return;
846 } 850 }
847 851
848 delegate_->RemoveUser(email); 852 delegate_->RemoveUser(email);
853 UpdateAddButtonStatus();
849 } 854 }
850 855
851 void SigninScreenHandler::HandleShowAddUser(const base::ListValue* args) { 856 void SigninScreenHandler::HandleShowAddUser(const base::ListValue* args) {
852 email_.clear(); 857 email_.clear();
853 // |args| can be null if it's OOBE. 858 // |args| can be null if it's OOBE.
854 if (args) 859 if (args)
855 args->GetString(0, &email_); 860 args->GetString(0, &email_);
856 is_account_picker_showing_first_time_ = false; 861 is_account_picker_showing_first_time_ = false;
857 862
858 if (gaia_silent_load_ && email_.empty()) { 863 if (gaia_silent_load_ && email_.empty()) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 } 1147 }
1143 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { 1148 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
1144 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) { 1149 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) {
1145 return false; 1150 return false;
1146 } 1151 }
1147 } 1152 }
1148 return true; 1153 return true;
1149 } 1154 }
1150 1155
1151 } // namespace chromeos 1156 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698