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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.h

Issue 2553083002: predictors: Add browsertest that tests prefetching. (Closed)
Patch Set: Created 4 years 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: chrome/browser/predictors/resource_prefetch_predictor.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index d4a0065d57f8ec01a19b842eac69fa269d396235..8c48765237ad8f87eb60d73996745748e308b26c 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -159,6 +159,10 @@ class ResourcePrefetchPredictor
// |main_frame_url|.
void StopPrefetching(const GURL& main_frame_url);
+ // Called when ResourcePrefetcher is finished, i.e. there is nothing pending
+ // in flight.
+ void OnPrefetchingFinished(const GURL& main_frame_url);
+
// Sets the |observer| to be notified when the resource prefetch predictor
// data changes. Previously registered observer will be discarded. Call
// this with nullptr parameter to de-register observer.
@@ -366,6 +370,8 @@ class TestObserver {
size_t url_visit_count,
const ResourcePrefetchPredictor::PageRequestSummary& summary) {}
+ virtual void OnPrefetchingFinished(const GURL& main_frame_url) {}
+
virtual void OnPredictorInitialized() {}
protected:

Powered by Google App Engine
This is Rietveld 408576698