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

Unified Diff: chrome/browser/extensions/api/tabs/tabs.cc

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Index: chrome/browser/extensions/api/tabs/tabs.cc
===================================================================
--- chrome/browser/extensions/api/tabs/tabs.cc (revision 148382)
+++ chrome/browser/extensions/api/tabs/tabs.cc (working copy)
@@ -242,7 +242,7 @@
new_window = browser::FindTabbedBrowser(profile, false);
if (!new_window)
- new_window = Browser::CreateWithParams(params);
+ new_window = new Browser(params);
return new_window;
}
@@ -595,9 +595,8 @@
}
// Create a new BrowserWindow.
- Browser::CreateParams create_params;
+ Browser::CreateParams create_params(window_type, window_profile);
if (extension_id.empty()) {
- create_params = Browser::CreateParams(window_type, window_profile);
create_params.initial_bounds = window_bounds;
} else {
create_params = Browser::CreateParams::CreateForApp(
@@ -1043,7 +1042,7 @@
Profile* profile = browser->profile()->GetOriginalProfile();
browser = browser::FindTabbedBrowser(profile, false);
if (!browser) {
- browser = Browser::Create(profile);
+ browser = new Browser(Browser::CreateParams(profile));
browser->window()->Show();
}
}
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_api.cc ('k') | chrome/browser/extensions/api/tabs/tabs_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698