| 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 // 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_AUTOMATION_JOB_H_ | 6 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
| 7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
| 8 | 8 |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/common/ref_counted_util.h" | 10 #include "chrome/common/ref_counted_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace IPC { | 23 namespace IPC { |
| 24 class Message; | 24 class Message; |
| 25 } | 25 } |
| 26 | 26 |
| 27 // net::URLRequestJob implementation that loads the resources using | 27 // net::URLRequestJob implementation that loads the resources using |
| 28 // automation. | 28 // automation. |
| 29 class URLRequestAutomationJob : public net::URLRequestJob { | 29 class URLRequestAutomationJob : public net::URLRequestJob { |
| 30 public: | 30 public: |
| 31 URLRequestAutomationJob(net::URLRequest* request, int tab, int request_id, | 31 URLRequestAutomationJob(net::URLRequest* request, |
| 32 net::NetworkDelegate* network_delegate, |
| 33 int tab, |
| 34 int request_id, |
| 32 AutomationResourceMessageFilter* filter, | 35 AutomationResourceMessageFilter* filter, |
| 33 bool is_pending); | 36 bool is_pending); |
| 34 | 37 |
| 35 // Register our factory for HTTP/HTTPs requests. | 38 // Register our factory for HTTP/HTTPs requests. |
| 36 static void EnsureProtocolFactoryRegistered(); | 39 static void EnsureProtocolFactoryRegistered(); |
| 37 | 40 |
| 38 static net::URLRequest::ProtocolFactory Factory; | 41 static net::URLRequest::ProtocolFactory Factory; |
| 39 | 42 |
| 40 // net::URLRequestJob methods. | 43 // net::URLRequestJob methods. |
| 41 virtual void Start(); | 44 virtual void Start(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 129 |
| 127 // Contains the ip address and port of the destination host. | 130 // Contains the ip address and port of the destination host. |
| 128 net::HostPortPair socket_address_; | 131 net::HostPortPair socket_address_; |
| 129 | 132 |
| 130 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; | 133 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; |
| 131 | 134 |
| 132 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); | 135 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 138 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
| OLD | NEW |