summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/browser_titlebar.cc
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 01:15:14 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 01:15:14 +0000
commitfa7ced97069ff5fcf343880814c7155447966edb (patch)
treeea67bea5b79c8e087703ab6346a1cd31cd92db11 /chrome/browser/ui/gtk/browser_titlebar.cc
parentbcf415cf6d1c8291c8bbca16c141adb7b94f6c78 (diff)
downloadchromium_src-fa7ced97069ff5fcf343880814c7155447966edb.zip
chromium_src-fa7ced97069ff5fcf343880814c7155447966edb.tar.gz
chromium_src-fa7ced97069ff5fcf343880814c7155447966edb.tar.bz2
Multi-Profiles: Only show the avatar icon if user has multiple profiles
BUG=88878 TEST=None Review URL: http://codereview.chromium.org/7484040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/browser_titlebar.cc')
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index a8325f8..051c68e 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);