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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 years, 10 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/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 0e4d12174b1f35ac32dc100bf098a805cf4d2c5a..eeafc2d4fed5bd8ac73abeea509a04cf4f662b5f 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -213,10 +213,9 @@ class SessionRestoreImpl : public content::NotificationObserver {
bool use_new_window = disposition == WindowOpenDisposition::NEW_WINDOW;
- Browser* browser =
- use_new_window
- ? new Browser(Browser::CreateParams(profile_))
- : browser_;
+ Browser* browser = use_new_window
+ ? new Browser(Browser::CreateParams(profile_, true))
+ : browser_;
RecordAppLaunchForTab(browser, tab, selected_index);
@@ -293,7 +292,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
std::vector<RestoredTab>* contents_created) {
Browser* browser = nullptr;
if (!created_tabbed_browser && always_create_tabbed_browser_) {
- browser = new Browser(Browser::CreateParams(profile_));
+ browser = new Browser(Browser::CreateParams(profile_, false));
if (urls_to_open_.empty()) {
// No tab browsers were created and no URLs were supplied on the command
// line. Open the new tab page.
@@ -630,11 +629,11 @@ class SessionRestoreImpl : public content::NotificationObserver {
const std::string& workspace,
ui::WindowShowState show_state,
const std::string& app_name) {
- Browser::CreateParams params(type, profile_);
+ Browser::CreateParams params(type, profile_, false);
if (!app_name.empty()) {
const bool trusted_source = true; // We only store trusted app windows.
params = Browser::CreateParams::CreateForApp(app_name, trusted_source,
- bounds, profile_);
+ bounds, profile_, false);
} else {
params.initial_bounds = bounds;
}
« no previous file with comments | « chrome/browser/sessions/better_session_restore_browsertest.cc ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698