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

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

Issue 10185003: Remove net-internals page for throttling, introduce flag for extension devs instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix JavaScript presubmit. Created 8 years, 8 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/resources/net_internals/browser_bridge.js » ('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 e13912bb45757207bf273570965f3e814434d406..60916e374ed65db82521e38641e10d5f23bf07f4 100644
--- a/chrome/browser/net/net_pref_observer.cc
+++ b/chrome/browser/net/net_pref_observer.cc
@@ -14,21 +14,9 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "net/http/http_stream_factory.h"
-#include "net/url_request/url_request_throttler_manager.h"
using content::BrowserThread;
-namespace {
-
-// Callback function to call the set_enforce_throttling member on the
-// URLRequestThrottlerManager singleton.
-void SetEnforceThrottlingOnThrottlerManager(bool enforce) {
- net::URLRequestThrottlerManager::GetInstance()->set_enforce_throttling(
- enforce);
-}
-
-}
-
NetPrefObserver::NetPrefObserver(PrefService* prefs,
prerender::PrerenderManager* prerender_manager,
chrome_browser_net::Predictor* predictor)
@@ -41,7 +29,6 @@ NetPrefObserver::NetPrefObserver(PrefService* prefs,
network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled, prefs,
this);
spdy_disabled_.Init(prefs::kDisableSpdy, prefs, this);
- http_throttling_enabled_.Init(prefs::kHttpThrottlingEnabled, prefs, this);
ApplySettings(NULL);
}
@@ -66,13 +53,6 @@ void NetPrefObserver::ApplySettings(const std::string* pref_name) {
if (prerender_manager_)
prerender_manager_->set_enabled(*network_prediction_enabled_);
net::HttpStreamFactory::set_spdy_enabled(!*spdy_disabled_);
-
- if (!pref_name || *pref_name == prefs::kHttpThrottlingEnabled) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&SetEnforceThrottlingOnThrottlerManager,
- *http_throttling_enabled_));
- }
}
// static
@@ -83,7 +63,4 @@ void NetPrefObserver::RegisterPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kDisableSpdy,
false,
PrefService::UNSYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kHttpThrottlingEnabled,
- true,
- PrefService::UNSYNCABLE_PREF);
}
« no previous file with comments | « chrome/browser/net/net_pref_observer.h ('k') | chrome/browser/resources/net_internals/browser_bridge.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698