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

Unified Diff: chrome/browser/ui/gtk/browser_titlebar.cc

Issue 7484040: Multi-Profiles: Only show the avatar icon if user has multiple profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/browser_titlebar.cc
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index a8325f8187194531d35a3839cf9181c29f0ac7f0..051c68e7614f009c9545d1d528e78ccf01942158 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -16,8 +16,10 @@
#include "base/string_tokenizer.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/gtk/accelerators_gtk.h"
@@ -310,7 +312,10 @@ void BrowserTitlebar::Init() {
// If multi-profile is enabled set up profile button and login notifications.
// The button lives in its own vbox in container_hbox_.
+ ProfileInfoCache& cache =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
if (ProfileManager::IsMultipleProfilesEnabled() &&
+ cache.GetNumberOfProfiles() > 1 &&
!browser_window_->browser()->profile()->IsOffTheRecord()) {
PrefService* prefs = browser_window_->browser()->profile()->GetPrefs();
usernamePref_.Init(prefs::kGoogleServicesUsername, prefs, this);
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698