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

Unified Diff: chrome/browser/ui/browser_tab_restore_service_delegate.cc

Issue 10837192: Speculative revert to see if this change introduced a performance regression on Mac intl perf bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tab_restore_service_delegate.cc
===================================================================
--- chrome/browser/ui/browser_tab_restore_service_delegate.cc (revision 150796)
+++ chrome/browser/ui/browser_tab_restore_service_delegate.cc (working copy)
@@ -100,16 +100,22 @@
}
// static
-TabRestoreServiceDelegate*
- TabRestoreServiceDelegate::FindDelegateForWebContents(
- const WebContents* contents) {
- Browser* browser = browser::FindBrowserWithWebContents(contents);
- return browser ? browser->tab_restore_service_delegate() : NULL;
+TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateForController(
+ const NavigationController* controller,
+ int* index) {
+ Browser* browser = browser::FindBrowserForController(controller, index);
+ if (browser)
+ return browser->tab_restore_service_delegate();
+ else
+ return NULL;
}
// static
TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID(
SessionID::id_type desired_id) {
Browser* browser = browser::FindBrowserWithID(desired_id);
- return browser ? browser->tab_restore_service_delegate() : NULL;
+ if (browser)
+ return browser->tab_restore_service_delegate();
+ else
+ return NULL;
}
« no previous file with comments | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698