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

Side by Side Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 1506353007: Show warning message when trying to create SU with existing name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed break from the nameIsUnique loop Created 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/manage_profile_handler.h" 5 #include "chrome/browser/ui/webui/options/manage_profile_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/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void ManageProfileHandler::GetLocalizedValues( 86 void ManageProfileHandler::GetLocalizedValues(
87 base::DictionaryValue* localized_strings) { 87 base::DictionaryValue* localized_strings) {
88 DCHECK(localized_strings); 88 DCHECK(localized_strings);
89 89
90 static OptionsStringResource resources[] = { 90 static OptionsStringResource resources[] = {
91 { "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL }, 91 { "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL },
92 { "manageProfilesIconLabel", IDS_PROFILES_MANAGE_ICON_LABEL }, 92 { "manageProfilesIconLabel", IDS_PROFILES_MANAGE_ICON_LABEL },
93 { "manageProfilesExistingSupervisedUser", 93 { "manageProfilesExistingSupervisedUser",
94 IDS_PROFILES_CREATE_EXISTING_LEGACY_SUPERVISED_USER_ERROR }, 94 IDS_PROFILES_CREATE_EXISTING_LEGACY_SUPERVISED_USER_ERROR },
95 { "managedProfilesExistingLocalSupervisedUser",
96 IDS_PROFILES_CREATE_EXISTING_LEGACY_SUPERVISED_USER_ERROR_EXISTS_LOCALLY },
Marc Treib 2015/12/10 11:36:41 nit: "exist" is in there twice; can we remove one
Pam (message me for reviews) 2015/12/15 14:31:37 Or a new string with a more suitable tone but stil
atanasova 2015/12/15 17:57:36 The second type of string is useful since it conta
95 { "manageProfilesSupervisedSignedInLabel", 97 { "manageProfilesSupervisedSignedInLabel",
96 IDS_PROFILES_CREATE_SUPERVISED_SIGNED_IN_LABEL }, 98 IDS_PROFILES_CREATE_SUPERVISED_SIGNED_IN_LABEL },
97 { "manageProfilesSupervisedNotSignedIn", 99 { "manageProfilesSupervisedNotSignedIn",
98 IDS_PROFILES_CREATE_SUPERVISED_NOT_SIGNED_IN_HTML }, 100 IDS_PROFILES_CREATE_SUPERVISED_NOT_SIGNED_IN_HTML },
99 { "manageProfilesSupervisedAccountDetailsOutOfDate", 101 { "manageProfilesSupervisedAccountDetailsOutOfDate",
100 IDS_PROFILES_CREATE_SUPERVISED_ACCOUNT_DETAILS_OUT_OF_DATE_LABEL }, 102 IDS_PROFILES_CREATE_SUPERVISED_ACCOUNT_DETAILS_OUT_OF_DATE_LABEL },
101 { "manageProfilesSupervisedSignInAgainLink", 103 { "manageProfilesSupervisedSignInAgainLink",
102 IDS_PROFILES_GAIA_REAUTH_TITLE }, 104 IDS_PROFILES_GAIA_REAUTH_TITLE },
103 { "manageProfilesConfirm", IDS_SAVE }, 105 { "manageProfilesConfirm", IDS_SAVE },
104 { "deleteProfileTitle", IDS_PROFILES_DELETE_TITLE }, 106 { "deleteProfileTitle", IDS_PROFILES_DELETE_TITLE },
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 567
566 // Update the UI buttons. 568 // Update the UI buttons.
567 OnHasProfileShortcuts(false); 569 OnHasProfileShortcuts(false);
568 } 570 }
569 571
570 void ManageProfileHandler::RefreshGaiaPicture(const base::ListValue* args) { 572 void ManageProfileHandler::RefreshGaiaPicture(const base::ListValue* args) {
571 profiles::UpdateGaiaProfileInfoIfNeeded(Profile::FromWebUI(web_ui())); 573 profiles::UpdateGaiaProfileInfoIfNeeded(Profile::FromWebUI(web_ui()));
572 } 574 }
573 575
574 } // namespace options 576 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698