OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ | 5 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ |
6 #define NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ | 6 #define NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "net/url_request/url_request_job.h" | 13 #include "net/url_request/url_request_job.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 | 17 |
17 // This class simulates a URLRequestJob failing with a given error code at | 18 // This class simulates a URLRequestJob failing with a given error code at |
18 // a particular phase while trying to connect. | 19 // a particular phase while trying to connect. |
19 class URLRequestFailedJob : public URLRequestJob { | 20 class URLRequestFailedJob : public URLRequestJob { |
20 public: | 21 public: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const int net_error_; | 80 const int net_error_; |
80 | 81 |
81 base::WeakPtrFactory<URLRequestFailedJob> weak_factory_; | 82 base::WeakPtrFactory<URLRequestFailedJob> weak_factory_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(URLRequestFailedJob); | 84 DISALLOW_COPY_AND_ASSIGN(URLRequestFailedJob); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace net | 87 } // namespace net |
87 | 88 |
88 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ | 89 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ |
OLD | NEW |