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

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

Issue 10828333: Merge 150928 - Fix a bad inversion of logic (see OnCanThrottleRequest) and a bug (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 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/chrome_network_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
===================================================================
--- chrome/browser/net/chrome_network_delegate.cc (revision 151760)
+++ chrome/browser/net/chrome_network_delegate.cc (working copy)
@@ -51,6 +51,10 @@
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
@@ -131,7 +135,6 @@
cookie_settings_(cookie_settings),
extension_info_map_(extension_info_map),
enable_referrers_(enable_referrers),
- never_throttle_requests_(false),
url_blacklist_manager_(url_blacklist_manager) {
DCHECK(event_router);
DCHECK(enable_referrers);
@@ -140,8 +143,9 @@
ChromeNetworkDelegate::~ChromeNetworkDelegate() {}
+// static
void ChromeNetworkDelegate::NeverThrottleRequests() {
- never_throttle_requests_ = true;
+ g_never_throttle_requests_ = true;
}
// static
@@ -364,11 +368,11 @@
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;
}
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698