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

Unified Diff: chrome/browser/extensions/extension_tab_util.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: sync 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tab_util.cc
===================================================================
--- chrome/browser/extensions/extension_tab_util.cc (revision 146674)
+++ chrome/browser/extensions/extension_tab_util.cc (working copy)
@@ -226,13 +226,9 @@
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture) {
- // 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(web_contents->GetBrowserContext());
-
- Browser* browser = browser::FindTabbedBrowser(
- profile, false); // Match incognito exactly.
+ Browser* browser = browser::FindOrCreateTabbedBrowser(profile);
TabContents* tab_contents = new TabContents(web_contents);
chrome::NavigateParams params(browser, tab_contents);
@@ -244,8 +240,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698