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

Unified Diff: net/url_request/url_request.cc

Issue 12328072: Remove some calls to URLRequestContext::network_delegate(). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 years, 10 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.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 5d3e26b47fedbce7b639f88bab9879b91e1a9667..f14693b56a7afeba0e55914d5aa436c19effa0af 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -454,6 +454,10 @@ void URLRequest::set_delegate(Delegate* delegate) {
delegate_ = delegate;
}
+bool URLRequest::CanThrottle() const {
+ return !network_delegate_ || network_delegate_->CanThrottleRequest(*this);
+}
+
void URLRequest::Start() {
DCHECK_EQ(network_delegate_, context_->network_delegate());
@@ -820,6 +824,10 @@ const URLRequestContext* URLRequest::context() const {
return context_;
}
+NetworkDelegate* URLRequest::network_delegate() const {
+ return network_delegate_;
+}
+
int64 URLRequest::GetExpectedContentSize() const {
int64 expected_content_size = -1;
if (job_)

Powered by Google App Engine
This is Rietveld 408576698