diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 21:11:53 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 21:11:53 +0000 |
commit | 227b0e8d0e0f62dc2ee2a50aca77de83ff394278 (patch) | |
tree | e185402e8a1da224dc3ac55ebd0fa295ce07a5ad /chrome/browser/net/net_pref_observer.h | |
parent | 76c551c6fe7dcfc664b9261eaec812a1966d1984 (diff) | |
download | chromium_src-227b0e8d0e0f62dc2ee2a50aca77de83ff394278.zip chromium_src-227b0e8d0e0f62dc2ee2a50aca77de83ff394278.tar.gz chromium_src-227b0e8d0e0f62dc2ee2a50aca77de83ff394278.tar.bz2 |
Support enabling/disabling the URL request throttler via the about:net-internals page:
- Add a new tab to the about:net-internals page.
- Add a preference item to persist user's choice.
- Remove the command line switch --disable-enforced-throttling.
- Make throttling feature off by default for now.
This is 95% based on yzshen@chromium.org's patch
http://codereview.chromium.org/6286001/ which was never landed. The
changes that have been made from that patch are mostly cosmetic, apart
from updating it to match the codebase (the patch was prepared ~2
months ago) and responding to eroman@'s initial round of code review
comments.
BUG=66062
TEST=Make sure the checkbox on about:net-internals > HTTP Throttling is checked.
(1) Type in the addresss bar a URL which is expected to return 5XX.
(2) Keep clicking the "reload" button.
(3) After a few clicks, Chrome displays an error page explaining why a net::ERR_TEMPORARILY_THROTTLED error occurs.
Make sure the checkbox on about:net-internals > HTTP Throttling is unchecked.
Following step (1) and (2) described above won't result in a net::ERR_TEMPORARILY_THROTTLED error page.
Review URL: http://codereview.chromium.org/6677085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/net_pref_observer.h')
-rw-r--r-- | chrome/browser/net/net_pref_observer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/net/net_pref_observer.h b/chrome/browser/net/net_pref_observer.h index b5954231..a1fd2bd 100644 --- a/chrome/browser/net/net_pref_observer.h +++ b/chrome/browser/net/net_pref_observer.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ #pragma once +#include <string> + #include "base/basictypes.h" #include "chrome/browser/prefs/pref_member.h" #include "content/common/notification_observer.h" @@ -26,10 +28,12 @@ class NetPrefObserver : public NotificationObserver { static void RegisterPrefs(PrefService* prefs); private: - void ApplySettings(); + // If |pref_name| is NULL, all monitored preferences will be applied. + void ApplySettings(const std::string* pref_name); BooleanPrefMember dns_prefetching_enabled_; BooleanPrefMember spdy_disabled_; + BooleanPrefMember http_throttling_enabled_; DISALLOW_COPY_AND_ASSIGN(NetPrefObserver); }; |