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

Unified Diff: components/page_load_metrics/browser/metrics_web_contents_observer.h

Issue 1303973009: [DO NOT COMMIT] Re-use the dafsa code for s-w-r histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply changes by tyoshino. Created 5 years, 2 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: components/page_load_metrics/browser/metrics_web_contents_observer.h
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h
index cf39dc9bff6e66878fc7c4cdd5f3e4a02d02ff09..066485bc26057484652b9a77ee784d4e6cea8d72 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h
@@ -63,6 +63,12 @@ class PageLoadTracker {
void Commit();
void WebContentsHidden();
+ // If the final destination of the navigation is one of the origins included
+ // in the stale-while-revalidate experiment, call this method. See
+ // https://docs.google.com/document/d/1nBhr25nSJgoyAh4S1-U5h2sH70Iz4RR0NAfXNL79G5Y/edit
+ // for the design doc.
+ void IncludeInStaleWhileRevalidateExperiment();
+
// Returns true if the timing was successfully updated.
bool UpdateTiming(const PageLoadTiming& timing);
void RecordEvent(PageLoadEvent event);
@@ -77,6 +83,7 @@ class PageLoadTracker {
// when they occur in the bacground.
base::TimeTicks background_time_;
bool started_in_foreground_;
+ bool include_in_stale_while_revalidate_experiment_;
PageLoadTiming timing_;

Powered by Google App Engine
This is Rietveld 408576698