| Index: chrome/browser/net/chrome_network_delegate.cc
|
| diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
|
| index 0295195285ba36cd297c38422f76c77a72bd8907..c9f69cc5f68ba611223563a6609831582d0aff68 100644
|
| --- a/chrome/browser/net/chrome_network_delegate.cc
|
| +++ b/chrome/browser/net/chrome_network_delegate.cc
|
| @@ -53,6 +53,10 @@ bool ChromeNetworkDelegate::g_allow_file_access_ = false;
|
| bool ChromeNetworkDelegate::g_allow_file_access_ = true;
|
| #endif
|
|
|
| +// This remains false unless the --disable-extensions-http-throttling
|
| +// flag is passed to the browser.
|
| +bool ChromeNetworkDelegate::g_never_throttle_requests_ = false;
|
| +
|
| namespace {
|
|
|
| // If the |request| failed due to problems with a proxy, forward the error to
|
| @@ -134,7 +138,6 @@ ChromeNetworkDelegate::ChromeNetworkDelegate(
|
| cookie_settings_(cookie_settings),
|
| extension_info_map_(extension_info_map),
|
| enable_referrers_(enable_referrers),
|
| - never_throttle_requests_(false),
|
| url_blacklist_manager_(url_blacklist_manager),
|
| cache_stats_(cache_stats) {
|
| DCHECK(event_router);
|
| @@ -144,8 +147,9 @@ ChromeNetworkDelegate::ChromeNetworkDelegate(
|
|
|
| ChromeNetworkDelegate::~ChromeNetworkDelegate() {}
|
|
|
| +// static
|
| void ChromeNetworkDelegate::NeverThrottleRequests() {
|
| - never_throttle_requests_ = true;
|
| + g_never_throttle_requests_ = true;
|
| }
|
|
|
| // static
|
| @@ -368,11 +372,11 @@ bool ChromeNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
|
|
| bool ChromeNetworkDelegate::OnCanThrottleRequest(
|
| const net::URLRequest& request) const {
|
| - if (never_throttle_requests_) {
|
| + if (g_never_throttle_requests_) {
|
| return false;
|
| }
|
|
|
| - return request.first_party_for_cookies().scheme() !=
|
| + return request.first_party_for_cookies().scheme() ==
|
| chrome::kExtensionScheme;
|
| }
|
|
|
|
|