| 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 b6e39e5d707a295876a082e6a697016941f4fe75..a399e30d75e3a12473b599d9e78137c64b98f400 100644
|
| --- a/chrome/browser/predictors/resource_prefetch_predictor.cc
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
|
| @@ -393,8 +393,10 @@ ResourcePrefetchPredictor::~ResourcePrefetchPredictor() {}
|
|
|
| void ResourcePrefetchPredictor::StartInitialization() {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + TRACE_EVENT0("browser", "ResourcePrefetchPredictor::StartInitialization");
|
|
|
| - DCHECK_EQ(NOT_INITIALIZED, initialization_state_);
|
| + if (initialization_state_ != NOT_INITIALIZED)
|
| + return;
|
| initialization_state_ = INITIALIZING;
|
|
|
| // Create local caches using the database as loaded.
|
| @@ -521,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);
|
|
|