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

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

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 | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.h
===================================================================
--- chrome/browser/net/chrome_network_delegate.h (revision 151760)
+++ chrome/browser/net/chrome_network_delegate.h (working copy)
@@ -42,8 +42,9 @@
BooleanPrefMember* enable_referrers);
virtual ~ChromeNetworkDelegate();
- // Causes |OnCanThrottleRequest| to never return true.
- void NeverThrottleRequests();
+ // Causes |OnCanThrottleRequest| to always return false, for all
+ // instances of this object.
+ static void NeverThrottleRequests();
// Binds |enable_referrers| to |pref_service| and moves it to the IO thread.
// This method should be called on the UI thread.
@@ -106,15 +107,20 @@
// Weak, owned by our owner.
BooleanPrefMember* enable_referrers_;
- // True if OnCanThrottleRequest should always return false.
- bool never_throttle_requests_;
-
// Weak, owned by our owner.
const policy::URLBlacklistManager* url_blacklist_manager_;
// When true, allow access to all file:// URLs.
static bool g_allow_file_access_;
+ // True if OnCanThrottleRequest should always return false.
+ //
+ // Note: This needs to be static as the instance of
+ // ChromeNetworkDelegate used may change over time, and we need to
+ // set this variable once at start-up time. It is effectively
+ // static anyway since it is based on a command-line flag.
+ static bool g_never_throttle_requests_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698