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

Unified Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 6263010: More net/ header/implementation method reordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/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

Powered by Google App Engine
This is Rietveld 408576698