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

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

Issue 2508933002: tools: Local tests for the speculative prefetch predictor. (Closed)
Patch Set: . Created 4 years, 1 month 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.cc
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
index ded4d178be9778a85db793248ddce189d89781de..a399e30d75e3a12473b599d9e78137c64b98f400 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -523,7 +523,8 @@ void ResourcePrefetchPredictor::OnMainFrameRequest(
DCHECK_EQ(INITIALIZED, initialization_state_);
const GURL& main_frame_url = request.navigation_id.main_frame_url;
- StartPrefetching(main_frame_url);
+ if (!config_.ExternalPrefetchingOnly())
+ StartPrefetching(main_frame_url);
// Cleanup older navigations.
CleanupAbandonedNavigations(request.navigation_id);

Powered by Google App Engine
This is Rietveld 408576698