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 6881c225d4b07596013457c40d031c35e88d97bf..4fcd8d3bd58d47ed4abb14eff03c62e28c86440e 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -33,9 +33,12 @@ |
#include "chrome/browser/net/chrome_network_delegate.h" |
#include "chrome/browser/net/http_server_properties_manager.h" |
#include "chrome/browser/net/proxy_service_factory.h" |
+#include "chrome/browser/net/resource_prefetch_predictor_observer.h" |
#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" |
@@ -198,6 +201,12 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
params->extension_info_map = |
ExtensionSystem::Get(profile)->info_map(); |
+ if (predictors::ResourcePrefetchPredictor* predictor = |
+ predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
+ profile)) |
+ resource_prefetch_predictor_observer_.reset( |
willchan no longer on Chromium
2012/06/18 20:15:12
Ditto here on the braces.
Shishir
2012/06/18 20:38:33
Done.
|
+ new chrome_browser_net::ResourcePrefetchPredictorObserver(predictor)); |
+ |
#if defined(ENABLE_NOTIFICATIONS) |
params->notification_service = |
DesktopNotificationServiceFactory::GetForProfile(profile); |
@@ -550,6 +559,10 @@ void ProfileIOData::LazyInitialize() const { |
resource_context_->host_resolver_ = io_thread_globals->host_resolver.get(); |
resource_context_->request_context_ = main_request_context_.get(); |
+ if (profile_params_->resource_prefetch_predictor_observer_.get()) |
+ resource_prefetch_predictor_observer_.reset( |
willchan no longer on Chromium
2012/06/18 20:15:12
Check the Chromium style guide, you should be usin
Shishir
2012/06/18 20:38:33
Done.
|
+ profile_params_->resource_prefetch_predictor_observer_.release()); |
+ |
LazyInitializeInternal(profile_params_.get()); |
profile_params_.reset(); |