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

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

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate ash browser test fix 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
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index ed2a15b0a540184875beb7d65bec8ef929c11ae2..e6ac0759efaaa74f43a12dee7556a91ffb3fe1d3 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -83,8 +83,8 @@
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
#include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
-#include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
+#include "chrome/browser/ui/views/profiles/profile_indicator_icon.h"
#include "chrome/browser/ui/views/session_crashed_bubble_view.h"
#include "chrome/browser/ui/views/settings_api_bubble_helper_views.h"
#include "chrome/browser/ui/views/status_bubble_views.h"
@@ -177,10 +177,6 @@
#include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h"
#endif
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
-#endif
-
#if defined(OS_LINUX)
#include "ui/native_theme/native_theme_dark_aura.h"
#endif
@@ -617,32 +613,6 @@ bool BrowserView::IsRegularOrGuestSession() const {
return profiles::IsRegularOrGuestSession(browser_.get());
}
-bool BrowserView::ShouldShowAvatar() const {
-#if defined(OS_CHROMEOS)
- if (!browser_->is_type_tabbed() && !browser_->is_app())
- return false;
- // Don't show incognito avatar in the guest session.
- if (IsOffTheRecord() && !IsGuestSession())
- return true;
- return chrome::MultiUserWindowManager::ShouldShowAvatar(GetNativeWindow());
-#else
- if (!IsBrowserTypeNormal())
- return false;
- if (IsOffTheRecord()) // Desktop guest is incognito and needs avatar.
- return true;
- // Tests may not have a profile manager.
- if (!g_browser_process->profile_manager())
- return false;
- ProfileAttributesEntry* entry;
- if (!g_browser_process->profile_manager()->GetProfileAttributesStorage().
- GetProfileAttributesWithPath(browser_->profile()->GetPath(), &entry)) {
- return false;
- }
-
- return AvatarMenu::ShouldShowAvatarMenu();
-#endif
-}
-
bool BrowserView::GetAccelerator(int cmd_id,
ui::Accelerator* accelerator) const {
// We retrieve the accelerator information for standard accelerators
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698