| OLD | NEW |
| 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 // Invalid URLs go through this URLRequestJob class rather than being | 5 // Invalid URLs go through this URLRequestJob class rather than being |
| 6 // passed to the default job handler. | 6 // passed to the default job handler. |
| 7 | 7 |
| 8 #ifndef NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ |
| 9 #define NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| 12 #include "base/task.h" | 12 #include "base/task.h" |
| 13 #include "net/base/net_api.h" | 13 #include "net/base/net_export.h" |
| 14 #include "net/url_request/url_request_job.h" | 14 #include "net/url_request/url_request_job.h" |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 | 17 |
| 18 class NET_API URLRequestErrorJob : public URLRequestJob { | 18 class NET_EXPORT URLRequestErrorJob : public URLRequestJob { |
| 19 public: | 19 public: |
| 20 URLRequestErrorJob(URLRequest* request, int error); | 20 URLRequestErrorJob(URLRequest* request, int error); |
| 21 | 21 |
| 22 virtual void Start(); | 22 virtual void Start(); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 virtual ~URLRequestErrorJob(); | 25 virtual ~URLRequestErrorJob(); |
| 26 | 26 |
| 27 void StartAsync(); | 27 void StartAsync(); |
| 28 | 28 |
| 29 int error_; | 29 int error_; |
| 30 | 30 |
| 31 ScopedRunnableMethodFactory<URLRequestErrorJob> method_factory_; | 31 ScopedRunnableMethodFactory<URLRequestErrorJob> method_factory_; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace net | 34 } // namespace net |
| 35 | 35 |
| 36 #endif // NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ | 36 #endif // NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_ |
| OLD | NEW |