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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm

Issue 350183002: Rename "managed (mode|user)" to "supervised user" (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 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 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/profiles/profiles_state.h" 9 #include "chrome/browser/profiles/profiles_state.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } else { 246 } else {
247 foregroundColor = [NSColor blackColor]; 247 foregroundColor = [NSColor blackColor];
248 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.4]]; 248 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.4]];
249 } 249 }
250 250
251 base::string16 profileName = [self getElidedAvatarName]; 251 base::string16 profileName = [self getElidedAvatarName];
252 NSString* buttonTitle = nil; 252 NSString* buttonTitle = nil;
253 if (browser_->profile()->IsSupervised()) { 253 if (browser_->profile()->IsSupervised()) {
254 // Add the "supervised" label after eliding the profile name, so the label 254 // Add the "supervised" label after eliding the profile name, so the label
255 // will not get elided, but will instead enlarge the button. 255 // will not get elided, but will instead enlarge the button.
256 buttonTitle = l10n_util::GetNSStringF(IDS_MANAGED_USER_NEW_AVATAR_LABEL, 256 buttonTitle = l10n_util::GetNSStringF(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL,
257 profileName); 257 profileName);
258 } else { 258 } else {
259 buttonTitle = base::SysUTF16ToNSString(profileName); 259 buttonTitle = base::SysUTF16ToNSString(profileName);
260 } 260 }
261 261
262 base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( 262 base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
263 [[NSMutableParagraphStyle alloc] init]); 263 [[NSMutableParagraphStyle alloc] init]);
264 [paragraphStyle setAlignment:NSLeftTextAlignment]; 264 [paragraphStyle setAlignment:NSLeftTextAlignment];
265 265
266 base::scoped_nsobject<NSAttributedString> attributedTitle( 266 base::scoped_nsobject<NSAttributedString> attributedTitle(
(...skipping 13 matching lines...) Expand all
280 layoutSubviews]; 280 layoutSubviews];
281 } 281 }
282 } 282 }
283 283
284 - (void)updateErrorStatus:(BOOL)hasError { 284 - (void)updateErrorStatus:(BOOL)hasError {
285 [[button_ cell] setHasError:hasError]; 285 [[button_ cell] setHasError:hasError];
286 [self updateAvatarButtonAndLayoutParent:YES]; 286 [self updateAvatarButtonAndLayoutParent:YES];
287 } 287 }
288 288
289 @end 289 @end
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_theme.cc ('k') | chrome/browser/ui/cocoa/profiles/avatar_label_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698