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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 9819001: Don't throttle unless origin schema is chrome-extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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/resources/net_internals/http_throttling_view.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 871f99eb734c9258e7a9898c2c0dcf34379ccf81..2b8988b6c410dbfee89cf53334801bc68a1e27cf 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -320,7 +320,13 @@ void URLRequestHttpJob::StartTransactionInternal() {
rv = request_->context()->http_transaction_factory()->CreateTransaction(
&transaction_);
if (rv == OK) {
+ // TODO(joi): The hard-coded check for "chrome-extension" is
+ // temporary (as of 2012/3/21), intended only to make sure this
+ // 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() ||
+ request_->first_party_for_cookies().scheme() != "chrome-extension" ||
!throttling_entry_->ShouldRejectRequest(request_info_.load_flags)) {
rv = transaction_->Start(
&request_info_, start_callback_, request_->net_log());
« no previous file with comments | « chrome/browser/resources/net_internals/http_throttling_view.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698