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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 8539043: Refactor ProfileInfoCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1365 }
1366 1366
1367 - (BOOL)shouldShowAvatar { 1367 - (BOOL)shouldShowAvatar {
1368 if (![self hasTabStrip]) 1368 if (![self hasTabStrip])
1369 return NO; 1369 return NO;
1370 if (browser_->profile()->IsOffTheRecord()) 1370 if (browser_->profile()->IsOffTheRecord())
1371 return YES; 1371 return YES;
1372 1372
1373 ProfileInfoCache& cache = 1373 ProfileInfoCache& cache =
1374 g_browser_process->profile_manager()->GetProfileInfoCache(); 1374 g_browser_process->profile_manager()->GetProfileInfoCache();
1375 if (cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath()) == 1375 ProfileInfoEntry entry;
1376 std::string::npos) { 1376 if (!cache.GetInfoForProfile(browser_->profile()->GetPath(), &entry))
1377 return NO; 1377 return NO;
1378 }
1379 1378
1380 return AvatarMenuModel::ShouldShowAvatarMenu(); 1379 return AvatarMenuModel::ShouldShowAvatarMenu();
1381 } 1380 }
1382 1381
1383 - (BOOL)isBookmarkBarVisible { 1382 - (BOOL)isBookmarkBarVisible {
1384 return [bookmarkBarController_ isVisible]; 1383 return [bookmarkBarController_ isVisible];
1385 } 1384 }
1386 1385
1387 - (BOOL)isBookmarkBarAnimating { 1386 - (BOOL)isBookmarkBarAnimating {
1388 return [bookmarkBarController_ isAnimationRunning]; 1387 return [bookmarkBarController_ isAnimationRunning];
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2176
2178 - (BOOL)supportsBookmarkBar { 2177 - (BOOL)supportsBookmarkBar {
2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2178 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2180 } 2179 }
2181 2180
2182 - (BOOL)isTabbedWindow { 2181 - (BOOL)isTabbedWindow {
2183 return browser_->is_type_tabbed(); 2182 return browser_->is_type_tabbed();
2184 } 2183 }
2185 2184
2186 @end // @implementation BrowserWindowController(WindowType) 2185 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser/avatar_button_controller.mm ('k') | chrome/browser/ui/webui/options/manage_profile_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698