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

Side by Side Diff: chrome/browser/profiles/avatar_menu_model.cc

Issue 17320005: Update strings to match the final spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: For review Created 7 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 (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/profiles/avatar_menu_model.h" 5 #include "chrome/browser/profiles/avatar_menu_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 base::string16 AvatarMenuModel::GetManagedUserInformation() const { 232 base::string16 AvatarMenuModel::GetManagedUserInformation() const {
233 #if defined(ENABLE_MANAGED_USERS) 233 #if defined(ENABLE_MANAGED_USERS)
234 // |browser_| can be NULL in unit_tests. 234 // |browser_| can be NULL in unit_tests.
235 if (!browser_) 235 if (!browser_)
236 return base::string16(); 236 return base::string16();
237 237
238 ManagedUserService* service = ManagedUserServiceFactory::GetForProfile( 238 ManagedUserService* service = ManagedUserServiceFactory::GetForProfile(
239 browser_->profile()); 239 browser_->profile());
240 if (service->ProfileIsManaged()) { 240 if (service->ProfileIsManaged()) {
241 base::string16 custodian = UTF8ToUTF16(service->GetCustodianEmailAddress()); 241 base::string16 custodian = UTF8ToUTF16(service->GetCustodianName());
242 return l10n_util::GetStringFUTF16(IDS_MANAGED_USER_INFO, custodian); 242 return l10n_util::GetStringFUTF16(IDS_MANAGED_USER_INFO, custodian);
243 } 243 }
244 #endif 244 #endif
245 return base::string16(); 245 return base::string16();
246 } 246 }
247 247
248 const gfx::Image& AvatarMenuModel::GetManagedUserIcon() const { 248 const gfx::Image& AvatarMenuModel::GetManagedUserIcon() const {
249 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( 249 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(
250 IDR_MANAGED_USER_ICON); 250 IDR_MANAGED_USER_ICON);
251 } 251 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 contents->GetController().LoadURL( 340 contents->GetController().LoadURL(
341 logout_url, content::Referrer(), 341 logout_url, content::Referrer(),
342 content::PAGE_TRANSITION_GENERATED, std::string()); 342 content::PAGE_TRANSITION_GENERATED, std::string());
343 343
344 // This object may be destructed when the menu closes but we need something 344 // This object may be destructed when the menu closes but we need something
345 // around to finish the sign-out process and close the profile windows. 345 // around to finish the sign-out process and close the profile windows.
346 new SignoutTracker(current_profile, GURL(landing_url), contents); 346 new SignoutTracker(current_profile, GURL(landing_url), contents);
347 347
348 return contents; // returned for testing purposes 348 return contents; // returned for testing purposes
349 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698