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

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

Issue 2023523002: Fix display of "new" avatar menu in guest mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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/avatar_button_manager.cc
diff --git a/chrome/browser/ui/views/frame/avatar_button_manager.cc b/chrome/browser/ui/views/frame/avatar_button_manager.cc
index c9bbfbd094d2b64f25888ad0103291f574537fa0..eb80888dc13525feebc3899d807d8f1a7b8e66f8 100644
--- a/chrome/browser/ui/views/frame/avatar_button_manager.cc
+++ b/chrome/browser/ui/views/frame/avatar_button_manager.cc
@@ -22,12 +22,14 @@ void AvatarButtonManager::Update(AvatarButtonStyle style) {
// This should never be called in incognito mode.
DCHECK(browser_view->IsRegularOrGuestSession());
ProfileAttributesEntry* unused;
- if (browser_view->IsBrowserTypeNormal() &&
- // Tests may not have a profile manager.
- g_browser_process->profile_manager() &&
- g_browser_process->profile_manager()
- ->GetProfileAttributesStorage()
- .GetProfileAttributesWithPath(profile->GetPath(), &unused)) {
+ if ((browser_view->IsBrowserTypeNormal() &&
+ // Tests may not have a profile manager.
+ g_browser_process->profile_manager() &&
+ g_browser_process->profile_manager()
+ ->GetProfileAttributesStorage()
+ .GetProfileAttributesWithPath(profile->GetPath(), &unused)) ||
+ // Desktop guest shows the avatar button.
+ browser_view->IsOffTheRecord()) {
Evan Stade 2016/05/27 20:01:26 I failed to correctly copy (move) the logic from B
if (!view_) {
view_ = new NewAvatarButton(this, style, profile);
view_->set_id(VIEW_ID_AVATAR_BUTTON);
« 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