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

Side by Side Diff: chrome/browser/sessions/session_service.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sessions/session_service.h" 5 #include "chrome/browser/sessions/session_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 if (move_on_new_browser_) { 576 if (move_on_new_browser_) {
577 // Make the current session the last. 577 // Make the current session the last.
578 MoveCurrentSessionToLastSession(); 578 MoveCurrentSessionToLastSession();
579 move_on_new_browser_ = false; 579 move_on_new_browser_ = false;
580 } 580 }
581 SessionStartupPref pref = StartupBrowserCreator::GetSessionStartupPref( 581 SessionStartupPref pref = StartupBrowserCreator::GetSessionStartupPref(
582 *base::CommandLine::ForCurrentProcess(), profile()); 582 *base::CommandLine::ForCurrentProcess(), profile());
583 if (pref.type == SessionStartupPref::LAST) { 583 if (pref.type == SessionStartupPref::LAST) {
584 SessionRestore::RestoreSession( 584 SessionRestore::RestoreSession(
585 profile(), browser, 585 profile(), browser,
586 browser ? browser->host_desktop_type() : chrome::GetActiveDesktop(),
587 browser ? 0 : SessionRestore::ALWAYS_CREATE_TABBED_BROWSER, 586 browser ? 0 : SessionRestore::ALWAYS_CREATE_TABBED_BROWSER,
588 urls_to_open); 587 urls_to_open);
589 return true; 588 return true;
590 } 589 }
591 } 590 }
592 return false; 591 return false;
593 } 592 }
594 593
595 void SessionService::Observe(int type, 594 void SessionService::Observe(int type,
596 const content::NotificationSource& source, 595 const content::NotificationSource& source,
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 for (auto* browser : *BrowserList::GetInstance()) { 1108 for (auto* browser : *BrowserList::GetInstance()) {
1110 if (browser->profile() == profile()) 1109 if (browser->profile() == profile())
1111 return; 1110 return;
1112 } 1111 }
1113 DeleteSessionOnlyData(profile()); 1112 DeleteSessionOnlyData(profile());
1114 } 1113 }
1115 1114
1116 sessions::BaseSessionService* SessionService::GetBaseSessionServiceForTest() { 1115 sessions::BaseSessionService* SessionService::GetBaseSessionServiceForTest() {
1117 return base_session_service_.get(); 1116 return base_session_service_.get();
1118 } 1117 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest_chromeos.cc ('k') | chrome/browser/signin/signin_error_notifier_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698