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

Side by Side Diff: net/url_request/url_request_job.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 | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job_factory_unittest.cc » ('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/url_request/url_request_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // requests. We could receive a request to Cancel, followed shortly 405 // requests. We could receive a request to Cancel, followed shortly
406 // by a successful IO. For tracking the status(), once there is 406 // by a successful IO. For tracking the status(), once there is
407 // an error, we do not change the status back to success. To 407 // an error, we do not change the status back to success. To
408 // enforce this, only set the status if the job is so far 408 // enforce this, only set the status if the job is so far
409 // successful. 409 // successful.
410 if (request_->status().is_success()) { 410 if (request_->status().is_success()) {
411 if (status.status() == URLRequestStatus::FAILED) { 411 if (status.status() == URLRequestStatus::FAILED) {
412 request_->net_log().AddEvent( 412 request_->net_log().AddEvent(
413 NetLog::TYPE_FAILED, 413 NetLog::TYPE_FAILED,
414 make_scoped_refptr(new NetLogIntegerParameter("net_error", 414 make_scoped_refptr(new NetLogIntegerParameter("net_error",
415 status.os_error()))); 415 status.error())));
416 } 416 }
417 request_->set_status(status); 417 request_->set_status(status);
418 } 418 }
419 } 419 }
420 420
421 // Complete this notification later. This prevents us from re-entering the 421 // Complete this notification later. This prevents us from re-entering the
422 // delegate if we're done because of a synchronous call. 422 // delegate if we're done because of a synchronous call.
423 MessageLoop::current()->PostTask( 423 MessageLoop::current()->PostTask(
424 FROM_HERE, 424 FROM_HERE,
425 method_factory_.NewRunnableMethod(&URLRequestJob::CompleteNotifyDone)); 425 method_factory_.NewRunnableMethod(&URLRequestJob::CompleteNotifyDone));
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 696 }
697 697
698 bool URLRequestJob::FilterHasData() { 698 bool URLRequestJob::FilterHasData() {
699 return filter_.get() && filter_->stream_data_len(); 699 return filter_.get() && filter_->stream_data_len();
700 } 700 }
701 701
702 void URLRequestJob::UpdatePacketReadTimes() { 702 void URLRequestJob::UpdatePacketReadTimes() {
703 } 703 }
704 704
705 } // namespace net 705 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698