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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 10696222: Make chrome::Navigate take in a Browser* that is never NULL. That function doesn't have a context, … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 5 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 | chrome/browser/platform_util_chromeos.cc » ('j') | chrome/browser/ui/browser_navigator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
===================================================================
--- chrome/browser/extensions/extension_host.cc (revision 146579)
+++ chrome/browser/extensions/extension_host.cc (working copy)
@@ -587,12 +587,9 @@
}
}
- // Find a browser with a profile that matches the new tab. If none is found,
- // NULL argument to NavigateParams is valid.
Profile* profile =
Profile::FromBrowserContext(new_contents->GetBrowserContext());
- Browser* browser = browser::FindTabbedBrowser(
- profile, false); // Match incognito exactly.
+ Browser* browser = browser::FindOrCreateTabbedBrowser(profile);
TabContents* tab_contents = new TabContents(new_contents);
chrome::NavigateParams params(browser, tab_contents);
@@ -604,8 +601,6 @@
if (disposition == NEW_POPUP)
params.extension_app_id = extension_id_;
- if (!browser)
- params.profile = profile;
params.disposition = disposition;
params.window_bounds = initial_pos;
params.window_action = chrome::NavigateParams::SHOW_WINDOW;
« no previous file with comments | « no previous file | chrome/browser/platform_util_chromeos.cc » ('j') | chrome/browser/ui/browser_navigator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698