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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 10416002: Seculative resource prefetching for URLs CL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing dominich's and willchan's comments. Created 8 years, 7 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/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 8b513bbe366b65ffc2f7709c47b615514b39414a..363cc4ded9ccaeaa609f445a00aba6e5df3b4c8b 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -36,6 +36,8 @@
#include "chrome/browser/net/transport_security_persister.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/policy/url_blacklist_manager.h"
+#include "chrome/browser/predictors/resource_prefetch_predictor.h"
+#include "chrome/browser/predictors/resource_prefetch_predictor_factory.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -215,6 +217,9 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
params->profile = profile;
profile_params_.reset(params.release());
+ params->resource_prefetch_predictor_ =
+ predictors::ResourcePrefetchPredictorFactory::GetForProfile(profile);
+
// The URLBlacklistManager has to be created on the UI thread to register
// observers of |pref_service|, and it also has to clean up on
// ShutdownOnUIThread to release these observers on the right thread.
@@ -480,6 +485,7 @@ void ProfileIOData::LazyInitialize() const {
url_blacklist_manager_.get(),
profile_params_->profile,
profile_params_->cookie_settings,
+ profile_params_->resource_prefetch_predictor_,
&enable_referrers_));
fraudulent_certificate_reporter_.reset(

Powered by Google App Engine
This is Rietveld 408576698