| 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 CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 public: | 99 public: |
| 100 // |io_thread_delegate| is used to perform actual job creation work. | 100 // |io_thread_delegate| is used to perform actual job creation work. |
| 101 explicit JobInterceptorFactory(IOThreadDelegate* io_thread_delegate); | 101 explicit JobInterceptorFactory(IOThreadDelegate* io_thread_delegate); |
| 102 virtual ~JobInterceptorFactory(); | 102 virtual ~JobInterceptorFactory(); |
| 103 | 103 |
| 104 // |job_factory| is set as the URLRequestJobFactory where requests are | 104 // |job_factory| is set as the URLRequestJobFactory where requests are |
| 105 // forwarded if JobInterceptorFactory decides to pass on them. | 105 // forwarded if JobInterceptorFactory decides to pass on them. |
| 106 void Chain(scoped_ptr<net::URLRequestJobFactory> job_factory); | 106 void Chain(scoped_ptr<net::URLRequestJobFactory> job_factory); |
| 107 | 107 |
| 108 // URLRequestJobFactory implementation. | 108 // URLRequestJobFactory implementation. |
| 109 virtual bool SetProtocolHandler(const std::string& scheme, | |
| 110 ProtocolHandler* protocol_handler) OVERRIDE; | |
| 111 virtual void AddInterceptor(Interceptor* interceptor) OVERRIDE; | |
| 112 virtual net::URLRequestJob* MaybeCreateJobWithInterceptor( | 109 virtual net::URLRequestJob* MaybeCreateJobWithInterceptor( |
| 113 net::URLRequest* request, | 110 net::URLRequest* request, |
| 114 net::NetworkDelegate* network_delegate) const OVERRIDE; | 111 net::NetworkDelegate* network_delegate) const OVERRIDE; |
| 115 virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( | 112 virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( |
| 116 const std::string& scheme, | 113 const std::string& scheme, |
| 117 net::URLRequest* request, | 114 net::URLRequest* request, |
| 118 net::NetworkDelegate* network_delegate) const OVERRIDE; | 115 net::NetworkDelegate* network_delegate) const OVERRIDE; |
| 119 virtual net::URLRequestJob* MaybeInterceptRedirect( | 116 virtual net::URLRequestJob* MaybeInterceptRedirect( |
| 120 const GURL& location, | 117 const GURL& location, |
| 121 net::URLRequest* request, | 118 net::URLRequest* request, |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 332 |
| 336 // Copy of registry data for use on the IO thread. Changes to the registry | 333 // Copy of registry data for use on the IO thread. Changes to the registry |
| 337 // are posted to the IO thread where updates are applied to this object. | 334 // are posted to the IO thread where updates are applied to this object. |
| 338 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 335 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
| 339 | 336 |
| 340 DefaultClientObserverList default_client_observers_; | 337 DefaultClientObserverList default_client_observers_; |
| 341 | 338 |
| 342 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 339 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
| 343 }; | 340 }; |
| 344 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 341 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
| OLD | NEW |