Index: net/proxy/proxy_script_fetcher_impl.cc |
diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc |
index 7d22ed3f42bbcd105c89dbb61f89cbbad8487946..bc245a25f50c3e3c56dbb38bb352caab36e2c612 100644 |
--- a/net/proxy/proxy_script_fetcher_impl.cc |
+++ b/net/proxy/proxy_script_fetcher_impl.cc |
@@ -90,6 +90,30 @@ ProxyScriptFetcherImpl::~ProxyScriptFetcherImpl() { |
// ensure that the delegate (this) is not called again. |
} |
+base::TimeDelta ProxyScriptFetcherImpl::SetTimeoutConstraint( |
+ base::TimeDelta timeout) { |
+ base::TimeDelta prev = max_duration_; |
+ max_duration_ = timeout; |
+ return prev; |
+} |
+ |
+size_t ProxyScriptFetcherImpl::SetSizeConstraint(size_t size_bytes) { |
+ size_t prev = max_response_bytes_; |
+ max_response_bytes_ = size_bytes; |
+ return prev; |
+} |
+ |
+void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) { |
+ DCHECK_EQ(request, cur_request_.get()); |
+ |
+ // Use |result_code_| as the request's error if we have already set it to |
+ // something specific. |
+ if (result_code_ == OK && !request->status().is_success()) |
+ result_code_ = request->status().os_error(); |
+ |
+ FetchCompleted(); |
+} |
+ |
int ProxyScriptFetcherImpl::Fetch(const GURL& url, |
string16* text, |
CompletionCallback* callback) { |
@@ -200,17 +224,6 @@ void ProxyScriptFetcherImpl::OnReadCompleted(URLRequest* request, |
} |
} |
-void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) { |
- DCHECK_EQ(request, cur_request_.get()); |
- |
- // Use |result_code_| as the request's error if we have already set it to |
- // something specific. |
- if (result_code_ == OK && !request->status().is_success()) |
- result_code_ = request->status().os_error(); |
- |
- FetchCompleted(); |
-} |
- |
void ProxyScriptFetcherImpl::ReadBody(URLRequest* request) { |
// Read as many bytes as are available synchronously. |
while (true) { |
@@ -287,17 +300,4 @@ void ProxyScriptFetcherImpl::OnTimeout(int id) { |
cur_request_->Cancel(); |
} |
-base::TimeDelta ProxyScriptFetcherImpl::SetTimeoutConstraint( |
- base::TimeDelta timeout) { |
- base::TimeDelta prev = max_duration_; |
- max_duration_ = timeout; |
- return prev; |
-} |
- |
-size_t ProxyScriptFetcherImpl::SetSizeConstraint(size_t size_bytes) { |
- size_t prev = max_response_bytes_; |
- max_response_bytes_ = size_bytes; |
- return prev; |
-} |
- |
} // namespace net |