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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 10203002: Make URLRequestThrottlerManager a member of URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review. 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
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index cb7a64d830447909cd2e9d37d08a72694a04d628..237c4b6e2728d48bd6fe5c5ecd5b2994f738e35a 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -176,7 +176,7 @@ URLRequestHttpJob::URLRequestHttpJob(URLRequest* request)
base::Unretained(this)))),
read_in_progress_(false),
transaction_(NULL),
- throttling_entry_(URLRequestThrottlerManager::GetInstance()->
+ throttling_entry_(request->context()->throttler_manager()->
RegisterRequestUrl(request->url())),
sdch_dictionary_advertised_(false),
sdch_test_activated_(false),
@@ -325,7 +325,7 @@ void URLRequestHttpJob::StartTransactionInternal() {
// change (to throttle only requests originating from
// extensions) gets into M19. Right after the M19 branch point,
// I will sort this out in a more architecturally-sound way.
- if (!URLRequestThrottlerManager::GetInstance()->enforce_throttling() ||
+ if (!request_->context()->throttler_manager()->enforce_throttling() ||
request_->first_party_for_cookies().scheme() != "chrome-extension" ||
!throttling_entry_->ShouldRejectRequest(request_info_.load_flags)) {
rv = transaction_->Start(

Powered by Google App Engine
This is Rietveld 408576698