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

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

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 89645)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -44,6 +44,7 @@
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/net/gaia/token_service.h"
#include "chrome/browser/net/net_pref_observer.h"
+#include "chrome/browser/net/predictor.h"
#include "chrome/browser/net/pref_proxy_config_service.h"
#include "chrome/browser/net/ssl_config_service_manager.h"
#include "chrome/browser/password_manager/password_store_default.h"
@@ -594,6 +595,9 @@
}
ProfileImpl::~ProfileImpl() {
+ if (GetPredictor())
+ GetPredictor()->SaveStateForNextStartupAndTrim(GetPrefs(), this);
+
NotificationService::current()->Notify(
NotificationType::PROFILE_DESTROYED,
Source<Profile>(this),
@@ -825,7 +829,7 @@
DCHECK(!net_pref_observer_.get());
net_pref_observer_.reset(
- new NetPrefObserver(prefs_.get(), GetPrerenderManager()));
+ new NetPrefObserver(prefs_.get(), GetPrerenderManager(), GetPredictor()));
DoFinalInit();
}
@@ -1644,3 +1648,11 @@
}
return prerender_manager_.get();
}
+
+chrome_browser_net::Predictor* ProfileImpl::GetPredictor() {
+ return io_data_.GetPredictor();
+}
+
+void ProfileImpl::SetPredictor(chrome_browser_net::Predictor* predictor) {
+ io_data_.SetPredictor(predictor);
+}

Powered by Google App Engine
This is Rietveld 408576698