diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-13 00:42:38 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-13 00:42:38 +0000 |
commit | 5583d098ed6ff3615022ec7fc9d8c8db7beafc92 (patch) | |
tree | 615d7bfd5e92a25166256b4199037a9190608971 /chrome/browser/sessions | |
parent | 37386f05316698320c6cc32359ffc445a710f113 (diff) | |
download | chromium_src-5583d098ed6ff3615022ec7fc9d8c8db7beafc92.zip chromium_src-5583d098ed6ff3615022ec7fc9d8c8db7beafc92.tar.gz chromium_src-5583d098ed6ff3615022ec7fc9d8c8db7beafc92.tar.bz2 |
Remove tab_count from Browser.
BUG=167548
TEST=no functional change
Review URL: https://chromiumcodereview.appspot.com/11858021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 982bc83..368249d 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -1361,11 +1361,12 @@ void SessionService::BuildCommandsForBrowser( } windows_to_track->insert(browser->session_id().id()); - for (int i = 0; i < browser->tab_count(); ++i) { - WebContents* tab = chrome::GetWebContentsAt(browser, i); + TabStripModel* tab_strip = browser->tab_strip_model(); + for (int i = 0; i < tab_strip->count(); ++i) { + WebContents* tab = tab_strip->GetWebContentsAt(i); DCHECK(tab); BuildCommandsForTab(browser->session_id(), tab, i, - browser->tab_strip_model()->IsTabPinned(i), + tab_strip->IsTabPinned(i), commands, tab_to_available_range); } @@ -1388,7 +1389,7 @@ void SessionService::BuildCommandsFromBrowsers( // for us to get a handle to a browser that is about to be removed. If // the tab count is 0 or the window is NULL, the browser is about to be // deleted, so we ignore it. - if (ShouldTrackBrowser(browser) && browser->tab_count() && + if (ShouldTrackBrowser(browser) && browser->tab_strip_model()->count() && browser->window()) { BuildCommandsForBrowser(browser, commands, tab_to_available_range, windows_to_track); @@ -1513,7 +1514,7 @@ bool SessionService::IsOnlyOneTabLeft() const { return false; // By the time this is invoked the tab has been removed. As such, we use // > 0 here rather than > 1. - if ((*i)->tab_count() > 0) + if ((*i)->tab_strip_model()->count() > 0) return false; } } |