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

Unified Diff: net/url_request/url_request.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 8f25db9243f4c79b823a5f0253374ea99d20b8be..f45d5908499621ee124f44c50cd0bfeb6f7e1991 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -483,27 +483,27 @@ void URLRequest::Cancel() {
DoCancel(ERR_ABORTED, SSLInfo());
}
-void URLRequest::SimulateError(int os_error) {
- DoCancel(os_error, SSLInfo());
+void URLRequest::SimulateError(int error) {
+ DoCancel(error, SSLInfo());
}
-void URLRequest::SimulateSSLError(int os_error, const SSLInfo& ssl_info) {
+void URLRequest::SimulateSSLError(int error, const SSLInfo& ssl_info) {
// This should only be called on a started request.
if (!is_pending_ || !job_ || job_->has_response_started()) {
NOTREACHED();
return;
}
- DoCancel(os_error, ssl_info);
+ DoCancel(error, ssl_info);
}
-void URLRequest::DoCancel(int os_error, const SSLInfo& ssl_info) {
- DCHECK(os_error < 0);
+void URLRequest::DoCancel(int error, const SSLInfo& ssl_info) {
+ DCHECK(error < 0);
// If the URL request already has an error status, then canceling is a no-op.
// Plus, we don't want to change the error status once it has been set.
if (status_.is_success()) {
status_.set_status(URLRequestStatus::CANCELED);
- status_.set_os_error(os_error);
+ status_.set_error(error);
response_info_.ssl_info = ssl_info;
}
@@ -568,7 +568,7 @@ void URLRequest::NotifyReceivedRedirect(const GURL& location,
void URLRequest::NotifyResponseStarted() {
scoped_refptr<NetLog::EventParameters> params;
if (!status_.is_success())
- params = new NetLogIntegerParameter("net_error", status_.os_error());
+ params = new NetLogIntegerParameter("net_error", status_.error());
net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_START_JOB, params);
URLRequestJob* job =
@@ -725,7 +725,7 @@ void URLRequest::set_context(const URLRequestContext* context) {
// Log error only on failure, not cancellation, as even successful requests
// are "cancelled" on destruction.
if (status_.status() == URLRequestStatus::FAILED)
- net_error = status_.os_error();
+ net_error = status_.error();
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_REQUEST_ALIVE, net_error);
net_log_ = BoundNetLog();
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698