| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|