| 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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 for (auto* session_restorer : *active_session_restorers) { | 858 for (auto* session_restorer : *active_session_restorers) { |
| 859 if (session_restorer->profile() == profile) { | 859 if (session_restorer->profile() == profile) { |
| 860 session_restorer->AddURLsToOpen(urls); | 860 session_restorer->AddURLsToOpen(urls); |
| 861 return; | 861 return; |
| 862 } | 862 } |
| 863 } | 863 } |
| 864 NOTREACHED() << "Failed to add urls to open for session restore"; | 864 NOTREACHED() << "Failed to add urls to open for session restore"; |
| 865 } | 865 } |
| 866 | 866 |
| 867 // static | 867 // static |
| 868 void SessionRestore::AddObserver(SessionRestoreObserver* observer) { |
| 869 observers().AddObserver(observer); |
| 870 } |
| 871 |
| 872 // static |
| 873 void SessionRestore::RemoveObserver(SessionRestoreObserver* observer) { |
| 874 observers().RemoveObserver(observer); |
| 875 } |
| 876 |
| 877 // static |
| 868 base::CallbackList<void(int)>* | 878 base::CallbackList<void(int)>* |
| 869 SessionRestore::on_session_restored_callbacks_ = nullptr; | 879 SessionRestore::on_session_restored_callbacks_ = nullptr; |
| 880 |
| 881 // static |
| 882 base::ObserverList<SessionRestoreObserver>* SessionRestore::observers_ = |
| 883 nullptr; |
| OLD | NEW |