| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This class simulates what wininet does when a dns lookup fails. | 4 // This class simulates what wininet does when a dns lookup fails. |
| 5 | 5 |
| 6 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ | 6 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ |
| 7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ | 7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ |
| 8 | 8 |
| 9 #include "net/url_request/url_request_job.h" | 9 #include "net/url_request/url_request_job.h" |
| 10 | 10 |
| 11 class URLRequestFailedDnsJob : public URLRequestJob { | 11 class URLRequestFailedDnsJob : public URLRequestJob { |
| 12 public: | 12 public: |
| 13 URLRequestFailedDnsJob(URLRequest* request) | 13 URLRequestFailedDnsJob(URLRequest* request) |
| 14 : URLRequestJob(request) { } | 14 : URLRequestJob(request) { } |
| 15 | 15 |
| 16 virtual void Start(); | 16 virtual void Start(); |
| 17 | 17 |
| 18 static URLRequestJob* Factory(URLRequest* request, | 18 static URLRequestJob* Factory(URLRequest* request, |
| 19 const std::string& scheme); | 19 const std::string& scheme); |
| 20 | 20 |
| 21 // A test URL that can be used in UI tests. | 21 // A test URL that can be used in UI tests. |
| 22 static const wchar_t kTestUrl[]; | 22 static const char kTestUrl[]; |
| 23 | 23 |
| 24 // For UI tests: adds the testing URLs to the URLRequestFilter. | 24 // For UI tests: adds the testing URLs to the URLRequestFilter. |
| 25 static void AddUITestUrls(); | 25 static void AddUITestUrls(); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 // Simulate a DNS failure. | 28 // Simulate a DNS failure. |
| 29 void StartAsync(); | 29 void StartAsync(); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ | 32 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_FAILED_DNS_JOB_H__ |
| 33 | 33 |
| OLD | NEW |