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

Unified Diff: chrome/browser/prerender/prerender_local_predictor.h

Issue 441923002: Add a PrefetchList to Prerender Local Predictor, to emulate how effective (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate comments Created 6 years, 4 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: chrome/browser/prerender/prerender_local_predictor.h
diff --git a/chrome/browser/prerender/prerender_local_predictor.h b/chrome/browser/prerender/prerender_local_predictor.h
index 852fda7120906554766c25af7a0f7951345af931..2615bdc5d2f940881b0823c8b83bdf3da3ebc662 100644
--- a/chrome/browser/prerender/prerender_local_predictor.h
+++ b/chrome/browser/prerender/prerender_local_predictor.h
@@ -46,6 +46,8 @@ class PrerenderLocalPredictor : public history::VisitDatabaseObserver,
public:
struct LocalPredictorURLInfo;
struct CandidatePrerenderInfo;
+ // A class simulating a set of URLs prefetched, for statistical purposes.
+ class PrefetchList;
enum Event {
EVENT_CONSTRUCTED = 0,
EVENT_INIT_SCHEDULED = 1,
@@ -137,6 +139,9 @@ class PrerenderLocalPredictor : public history::VisitDatabaseObserver,
EVENT_TAB_HELPER_URL_SEEN_MATCH_BROWSER_NAVIGATE = 87,
EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_ENTRY = 88,
EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_BROWSER_NAVIGATE = 89,
+ EVENT_PREFETCH_LIST_ADDED = 90,
+ EVENT_PREFETCH_LIST_SEEN_TABCONTENTS = 91,
+ EVENT_PREFETCH_LIST_SEEN_HISTORY = 92,
EVENT_MAX_VALUE
};
@@ -188,8 +193,7 @@ class PrerenderLocalPredictor : public history::VisitDatabaseObserver,
void ContinuePrerenderCheck(scoped_ptr<CandidatePrerenderInfo> info);
void LogCandidateURLStats(const GURL& url) const;
void IssuePrerender(CandidatePrerenderInfo* info,
- LocalPredictorURLInfo* url_info,
- PrerenderProperties* prerender_properties);
+ LocalPredictorURLInfo* url_info);
void MaybeCancelURLFetcher(net::URLFetcher* fetcher);
// Returns true if the parsed response is semantically correct and could
// be fully applied.
@@ -228,6 +232,8 @@ class PrerenderLocalPredictor : public history::VisitDatabaseObserver,
base::WeakPtrFactory<PrerenderLocalPredictor> weak_factory_;
+ scoped_ptr<PrefetchList> prefetch_list_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderLocalPredictor);
};
« no previous file with comments | « chrome/browser/prerender/prerender_field_trial.cc ('k') | chrome/browser/prerender/prerender_local_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698