OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_restore.h" | 5 #include "chrome/browser/sessions/session_restore.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 | 741 |
742 } // namespace | 742 } // namespace |
743 | 743 |
744 // SessionRestore ------------------------------------------------------------- | 744 // SessionRestore ------------------------------------------------------------- |
745 | 745 |
746 // static | 746 // static |
747 Browser* SessionRestore::RestoreSession( | 747 Browser* SessionRestore::RestoreSession( |
748 Profile* profile, Browser* browser, | 748 Profile* profile, Browser* browser, |
749 SessionRestore::BehaviorBitmask behavior, | 749 SessionRestore::BehaviorBitmask behavior, |
750 const std::vector<GURL>& urls_to_open) { | 750 const std::vector<GURL>& urls_to_open) { |
| 751 VLOG(0) << "RestoreSession"; |
751 #if defined(OS_CHROMEOS) | 752 #if defined(OS_CHROMEOS) |
752 chromeos::BootTimesRecorder::Get()->AddLoginTimeMarker( | 753 chromeos::BootTimesRecorder::Get()->AddLoginTimeMarker( |
753 "SessionRestore-Start", false); | 754 "SessionRestore-Start", false); |
754 #endif | 755 #endif |
755 DCHECK(profile); | 756 DCHECK(profile); |
756 // Always restore from the original profile (incognito profiles have no | 757 // Always restore from the original profile (incognito profiles have no |
757 // session service). | 758 // session service). |
758 profile = profile->GetOriginalProfile(); | 759 profile = profile->GetOriginalProfile(); |
759 if (!SessionServiceFactory::GetForProfile(profile)) { | 760 if (!SessionServiceFactory::GetForProfile(profile)) { |
760 NOTREACHED(); | 761 NOTREACHED(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 // static | 844 // static |
844 SessionRestore::CallbackSubscription | 845 SessionRestore::CallbackSubscription |
845 SessionRestore::RegisterOnSessionRestoredCallback( | 846 SessionRestore::RegisterOnSessionRestoredCallback( |
846 const base::Callback<void(int)>& callback) { | 847 const base::Callback<void(int)>& callback) { |
847 return on_session_restored_callbacks()->Add(callback); | 848 return on_session_restored_callbacks()->Add(callback); |
848 } | 849 } |
849 | 850 |
850 // static | 851 // static |
851 base::CallbackList<void(int)>* | 852 base::CallbackList<void(int)>* |
852 SessionRestore::on_session_restored_callbacks_ = nullptr; | 853 SessionRestore::on_session_restored_callbacks_ = nullptr; |
OLD | NEW |