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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm

Issue 10270004: cocoa/bookmarks: Do not rely on Browser::tabstrip_model() accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nico review -> contents Created 8 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm
index 82a4765fb7473f94a0e749eaef277ca39dc3b385..2de8c1b8212101170d284b8e5810630751411a12 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm
@@ -44,13 +44,10 @@ using content::WebContents;
- (void)UpdateActiveTabPairs {
activeTabPairsVector_.clear();
Browser* browser = BrowserList::GetLastActive();
- TabStripModel* tabstrip_model = browser->tabstrip_model();
- const int tabCount = tabstrip_model->count();
+ const int tabCount = browser->tab_count();
for (int i = 0; i < tabCount; ++i) {
- WebContents* wc = tabstrip_model->GetTabContentsAt(i)->web_contents();
- const string16 tabTitle = wc->GetTitle();
- const GURL& tabURL(wc->GetURL());
- ActiveTabNameURLPair tabPair(tabTitle, tabURL);
+ WebContents* contents = browser->GetWebContentsAt(i);
+ ActiveTabNameURLPair tabPair(contents->GetTitle(), contents->GetURL());
activeTabPairsVector_.push_back(tabPair);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698