| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_error_job.h" | 5 #include "net/url_request/url_request_error_job.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/url_request/url_request_status.h" | 9 #include "net/url_request/url_request_status.h" |
| 10 | 10 |
| 11 URLRequestErrorJob::URLRequestErrorJob(net::URLRequest* request, int error) | 11 URLRequestErrorJob::URLRequestErrorJob(net::URLRequest* request, int error) |
| 12 : URLRequestJob(request), error_(error) { | 12 : net::URLRequestJob(request), error_(error) { |
| 13 } | 13 } |
| 14 | 14 |
| 15 void URLRequestErrorJob::Start() { | 15 void URLRequestErrorJob::Start() { |
| 16 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 16 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
| 17 this, &URLRequestErrorJob::StartAsync)); | 17 this, &URLRequestErrorJob::StartAsync)); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void URLRequestErrorJob::StartAsync() { | 20 void URLRequestErrorJob::StartAsync() { |
| 21 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_)); | 21 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_)); |
| 22 } | 22 } |
| OLD | NEW |