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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 294593004: [Win,Linux] New avatar menu: Don't allow supervised users to edit their profile name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/profiles/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/lifetime/application_lifetime.h" 10 #include "chrome/browser/lifetime/application_lifetime.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 gfx::Size preferred_size = question_mark_button_->GetPreferredSize(); 965 gfx::Size preferred_size = question_mark_button_->GetPreferredSize();
966 question_mark_button_->SetBounds( 966 question_mark_button_->SetBounds(
967 0, 0, preferred_size.width(), preferred_size.height()); 967 0, 0, preferred_size.width(), preferred_size.height());
968 current_profile_photo_->AddChildView(question_mark_button_); 968 current_profile_photo_->AddChildView(question_mark_button_);
969 } 969 }
970 970
971 layout->StartRow(1, 0); 971 layout->StartRow(1, 0);
972 layout->AddView(current_profile_photo_); 972 layout->AddView(current_profile_photo_);
973 973
974 // Profile name, centered. 974 // Profile name, centered.
975 bool editing_allowed = !is_guest && !browser_->profile()->IsManaged();
975 current_profile_name_ = new EditableProfileName( 976 current_profile_name_ = new EditableProfileName(
976 this, profiles::GetAvatarNameForProfile(browser_->profile()), !is_guest); 977 this, profiles::GetAvatarNameForProfile(browser_->profile()),
978 editing_allowed);
977 layout->StartRow(1, 0); 979 layout->StartRow(1, 0);
978 layout->AddView(current_profile_name_); 980 layout->AddView(current_profile_name_);
979 981
980 if (is_guest) 982 if (is_guest)
981 return view; 983 return view;
982 984
983 // The available links depend on the type of profile that is active. 985 // The available links depend on the type of profile that is active.
984 layout->StartRow(1, 0); 986 layout->StartRow(1, 0);
985 if (avatar_item.signed_in) { 987 if (avatar_item.signed_in) {
986 if (switches::IsNewProfileManagement()) { 988 if (switches::IsNewProfileManagement()) {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 layout->StartRowWithPadding( 1306 layout->StartRowWithPadding(
1305 1, 0, 0, views::kUnrelatedControlVerticalSpacing); 1307 1, 0, 0, views::kUnrelatedControlVerticalSpacing);
1306 layout->AddView(end_preview_and_relaunch_button_); 1308 layout->AddView(end_preview_and_relaunch_button_);
1307 1309
1308 TitleCard* title_card = new TitleCard( 1310 TitleCard* title_card = new TitleCard(
1309 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); 1311 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_);
1310 return TitleCard::AddPaddedTitleCard( 1312 return TitleCard::AddPaddedTitleCard(
1311 view, title_card, kFixedAccountRemovalViewWidth); 1313 view, title_card, kFixedAccountRemovalViewWidth);
1312 } 1314 }
1313 1315
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698