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 41576505b5d7ad28755f695a3295b476d253927d..d25dc77ca3b43ebfdc74a8ee76b4f3eaa28c3a20 100644 |
--- a/chrome/browser/ui/gtk/browser_titlebar.cc |
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc |
@@ -18,6 +18,7 @@ |
#include "chrome/app/chrome_command_ids.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" |
@@ -311,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); |