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

Unified Diff: chrome/browser/net/net_pref_observer.cc

Issue 7685009: Revert "Modifying prefetch to account for multi-profile." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/browser/net/net_pref_observer.h ('k') | chrome/browser/net/predictor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/net_pref_observer.cc
diff --git a/chrome/browser/net/net_pref_observer.cc b/chrome/browser/net/net_pref_observer.cc
index 5655f545c8e6292ad6046cbd969b9ac20a737f48..abfcc4651c5a64c9a3b239a70f59215accdeb1d6 100644
--- a/chrome/browser/net/net_pref_observer.cc
+++ b/chrome/browser/net/net_pref_observer.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/net/net_pref_observer.h"
#include "base/task.h"
-#include "chrome/browser/net/predictor.h"
+#include "chrome/browser/net/predictor_api.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/profiles/profile.h"
@@ -29,14 +29,10 @@ void SetEnforceThrottlingOnThrottlerManager(bool enforce) {
}
NetPrefObserver::NetPrefObserver(PrefService* prefs,
- prerender::PrerenderManager* prerender_manager,
- chrome_browser_net::Predictor* predictor)
- : prerender_manager_(prerender_manager),
- predictor_(predictor) {
+ prerender::PrerenderManager* prerender_manager)
+ : prerender_manager_(prerender_manager) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(prefs);
- DCHECK(predictor);
-
network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled, prefs,
this);
spdy_disabled_.Init(prefs::kDisableSpdy, prefs, this);
@@ -61,7 +57,7 @@ void NetPrefObserver::Observe(int type,
void NetPrefObserver::ApplySettings(const std::string* pref_name) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- predictor_->EnablePredictor(*network_prediction_enabled_);
+ chrome_browser_net::EnablePredictor(*network_prediction_enabled_);
if (prerender_manager_)
prerender_manager_->set_enabled(*network_prediction_enabled_);
net::HttpStreamFactory::set_spdy_enabled(!*spdy_disabled_);
« no previous file with comments | « chrome/browser/net/net_pref_observer.h ('k') | chrome/browser/net/predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698