Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
index be6845e560e0f20319c8b6779f56074a943b255f..53b40e249b38157a88f754d2350fad53f4490c3c 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
@@ -18,6 +18,7 @@ |
#include "chrome/browser/google/google_util.h" |
#include "chrome/browser/instant/instant_controller.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/sync/profile_sync_service.h" |
#include "chrome/browser/sync/sync_ui_util_mac.h" |
@@ -1353,8 +1354,20 @@ typedef NSInteger NSWindowAnimationBehavior; |
} |
- (BOOL)shouldShowAvatar { |
- return [self hasTabStrip] && (browser_->profile()->IsOffTheRecord() || |
- ProfileManager::IsMultipleProfilesEnabled()); |
+ if (![self hasTabStrip]) |
+ return NO; |
+ |
+ if (browser_->profile()->IsOffTheRecord()) |
+ return YES; |
+ |
+ if (ProfileManager::IsMultipleProfilesEnabled()) { |
+ // Show the profile avatar after the user has create more than one profile. |
Robert Sesek
2011/08/03 21:13:00
createD?
sail
2011/08/03 21:17:14
Done.
|
+ ProfileInfoCache& cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ return cache.GetNumberOfProfiles() > 1; |
+ } |
+ |
+ return NO; |
} |
- (BOOL)isBookmarkBarVisible { |