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

Side by Side Diff: chrome/browser/sessions/session_restore_observer.h

Issue 2935183002: [TabMetrics] Add signals that mark the start and end of session restore. (Closed)
Patch Set: Store global SessionRestoreObserver list into a separate class. Created 3 years, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_RESTORE_OBSERVER_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_OBSERVER_H_
7
8 #include <unordered_set>
9
10 // Observer of events during session restore.
11 // The set of observers will be deleted when there is no observer.
12 class SessionRestoreObserver {
13 public:
14 virtual void OnTabLoadingStarted() {}
15 virtual void OnTabLoadingEnded() {}
16
17 static std::unordered_set<SessionRestoreObserver*>* observers();
lpy 2017/06/23 22:35:57 Let's use static base::ObserverList<SessionRestore
ducbui 2017/06/23 23:30:14 Done.
18
19 static void AddObserver(SessionRestoreObserver* observer);
20 static void RemoveObserver(SessionRestoreObserver* observer);
21
22 private:
23 static std::unordered_set<SessionRestoreObserver*>* observers_;
lpy 2017/06/23 22:35:57 Let's use base::ObserverList<SessionRestoreObserve
ducbui 2017/06/23 23:30:14 Done.
24 };
25
26 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698