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

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

Issue 1242793005: Refactor most c/b/profiles calls to ProfileInfoCache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows unit test and ChromeOS build Created 5 years, 5 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
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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1293 }
1294 } 1294 }
1295 1295
1296 return view; 1296 return view;
1297 } 1297 }
1298 1298
1299 views::View* ProfileChooserView::CreateGuestProfileView() { 1299 views::View* ProfileChooserView::CreateGuestProfileView() {
1300 gfx::Image guest_icon = 1300 gfx::Image guest_icon =
1301 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 1301 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
1302 profiles::GetPlaceholderAvatarIconResourceID()); 1302 profiles::GetPlaceholderAvatarIconResourceID());
1303 AvatarMenu::Item guest_avatar_item(0, 0, guest_icon); 1303 AvatarMenu::Item guest_avatar_item(0, guest_icon);
1304 guest_avatar_item.active = true; 1304 guest_avatar_item.active = true;
1305 guest_avatar_item.name = l10n_util::GetStringUTF16( 1305 guest_avatar_item.name = l10n_util::GetStringUTF16(
1306 IDS_PROFILES_GUEST_PROFILE_NAME); 1306 IDS_PROFILES_GUEST_PROFILE_NAME);
1307 guest_avatar_item.signed_in = false; 1307 guest_avatar_item.signed_in = false;
1308 1308
1309 return CreateCurrentProfileView(guest_avatar_item, true); 1309 return CreateCurrentProfileView(guest_avatar_item, true);
1310 } 1310 }
1311 1311
1312 views::View* ProfileChooserView::CreateOtherProfilesView( 1312 views::View* ProfileChooserView::CreateOtherProfilesView(
1313 const Indexes& avatars_to_show) { 1313 const Indexes& avatars_to_show) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1748 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1749 IncognitoModePrefs::DISABLED; 1749 IncognitoModePrefs::DISABLED;
1750 return incognito_available && !browser_->profile()->IsGuestSession(); 1750 return incognito_available && !browser_->profile()->IsGuestSession();
1751 } 1751 }
1752 1752
1753 void ProfileChooserView::PostActionPerformed( 1753 void ProfileChooserView::PostActionPerformed(
1754 ProfileMetrics::ProfileDesktopMenu action_performed) { 1754 ProfileMetrics::ProfileDesktopMenu action_performed) {
1755 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1755 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1756 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1756 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1757 } 1757 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698