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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 2053563002: Incognito icon shows up again when opening incognito browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Refractored code change. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 37f4e5e2d63390650cdd13366e3835b71b8b3b6f..fb8c766ef0d0d54facb648d83039dbd87443f4f7 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -397,9 +397,12 @@ gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() {
// BrowserNonClientFrameView:
void BrowserNonClientFrameViewAsh::UpdateProfileIcons() {
Browser* browser = browser_view()->browser();
- if ((browser->is_type_tabbed() || browser->is_app()) &&
- chrome::MultiUserWindowManager::ShouldShowAvatar(
- browser_view()->GetNativeWindow())) {
+ const Profile* profile = browser_view()->browser()->profile();
jdufault 2016/06/10 16:43:23 nit: This can be shortened to browser->profile()
+ bool show_avatar = (browser->is_type_tabbed() || browser->is_app()) &&
+ chrome::MultiUserWindowManager::ShouldShowAvatar(
+ browser_view()->GetNativeWindow());
+ bool is_incognito = profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
Peter Kasting 2016/06/11 01:54:46 The incognito case can only apply when the (tabbed
+ if (show_avatar || is_incognito) {
UpdateProfileIndicatorIcon();
}
}
« 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