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

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

Issue 2935183002: [TabMetrics] Add signals that mark the start and end of session restore. (Closed)
Patch Set: Enable SessionRestoreObserverTest only when session service available. Created 3 years, 5 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 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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698