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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/url_fetcher_unittest.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 max_response_bytes_ = size_bytes; 103 max_response_bytes_ = size_bytes;
104 return prev; 104 return prev;
105 } 105 }
106 106
107 void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) { 107 void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) {
108 DCHECK_EQ(request, cur_request_.get()); 108 DCHECK_EQ(request, cur_request_.get());
109 109
110 // Use |result_code_| as the request's error if we have already set it to 110 // Use |result_code_| as the request's error if we have already set it to
111 // something specific. 111 // something specific.
112 if (result_code_ == OK && !request->status().is_success()) 112 if (result_code_ == OK && !request->status().is_success())
113 result_code_ = request->status().os_error(); 113 result_code_ = request->status().error();
114 114
115 FetchCompleted(); 115 FetchCompleted();
116 } 116 }
117 117
118 int ProxyScriptFetcherImpl::Fetch(const GURL& url, 118 int ProxyScriptFetcherImpl::Fetch(const GURL& url,
119 string16* text, 119 string16* text,
120 CompletionCallback* callback) { 120 CompletionCallback* callback) {
121 // It is invalid to call Fetch() while a request is already in progress. 121 // It is invalid to call Fetch() while a request is already in progress.
122 DCHECK(!cur_request_.get()); 122 DCHECK(!cur_request_.get());
123 123
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // is still applicable. 312 // is still applicable.
313 if (cur_request_id_ != id) 313 if (cur_request_id_ != id)
314 return; 314 return;
315 315
316 DCHECK(cur_request_.get()); 316 DCHECK(cur_request_.get());
317 result_code_ = ERR_TIMED_OUT; 317 result_code_ = ERR_TIMED_OUT;
318 cur_request_->Cancel(); 318 cur_request_->Cancel();
319 } 319 }
320 320
321 } // namespace net 321 } // namespace net
OLDNEW
« no previous file with comments | « content/common/url_fetcher_unittest.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698