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

Unified Diff: net/reporting/reporting_observer.h

Issue 2751883003: Reporting: Implement serializer. (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/reporting/reporting_observer.h
diff --git a/net/reporting/reporting_observer.h b/net/reporting/reporting_observer.h
index fe2ab5c79f1cb4a9780441ed4f72e5a3915d1c1c..86e5c7c77a51e09eb3ac270766329d5a19b20c26 100644
--- a/net/reporting/reporting_observer.h
+++ b/net/reporting/reporting_observer.h
@@ -12,6 +12,24 @@ namespace net {
class NET_EXPORT ReportingObserver {
public:
+ // Called during ReportingContext::Initialize, before any calls to
+ // OnContextInitialized.
+ //
+ // This is the correct time to preload or restore data in the
+ // ReportingCache, since other observers won't act on it until all observers
+ // have had a chance to initialize.
+ virtual void OnContextInitializing();
+
+ // Called during ReportingContext::Initialize, after all calls to
+ // OnContextInitializing.
+ //
+ // This is the correct time to start timers or network requests based on data
+ // restored by other observers.
+ virtual void OnContextInitialized();
+
+ // Once ReportingContext::Initialize has called OnContextInitializing on all
+ // Observers, OnCacheUpdated will be called on any update to the
+ // ReportingCache.
virtual void OnCacheUpdated();
protected:

Powered by Google App Engine
This is Rietveld 408576698