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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( | 109 virtual net::URLRequestJob* MaybeCreateJobWithProtocolHandler( |
110 const std::string& scheme, | 110 const std::string& scheme, |
111 net::URLRequest* request, | 111 net::URLRequest* request, |
112 net::NetworkDelegate* network_delegate) const OVERRIDE; | 112 net::NetworkDelegate* network_delegate) const OVERRIDE; |
113 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE; | 113 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE; |
114 virtual bool IsHandledURL(const GURL& url) const OVERRIDE; | 114 virtual bool IsHandledURL(const GURL& url) const OVERRIDE; |
115 virtual bool IsSafeRedirectTarget(const GURL& location) const OVERRIDE; | |
116 | 115 |
117 private: | 116 private: |
118 // When JobInterceptorFactory decides to pass on particular requests, | 117 // When JobInterceptorFactory decides to pass on particular requests, |
119 // they're forwarded to the chained URLRequestJobFactory, |job_factory_|. | 118 // they're forwarded to the chained URLRequestJobFactory, |job_factory_|. |
120 scoped_ptr<URLRequestJobFactory> job_factory_; | 119 scoped_ptr<URLRequestJobFactory> job_factory_; |
121 // |io_thread_delegate_| performs the actual job creation decisions by | 120 // |io_thread_delegate_| performs the actual job creation decisions by |
122 // mirroring the ProtocolHandlerRegistry on the IO thread. | 121 // mirroring the ProtocolHandlerRegistry on the IO thread. |
123 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 122 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
124 | 123 |
125 DISALLOW_COPY_AND_ASSIGN(JobInterceptorFactory); | 124 DISALLOW_COPY_AND_ASSIGN(JobInterceptorFactory); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 322 |
324 // Copy of registry data for use on the IO thread. Changes to the registry | 323 // Copy of registry data for use on the IO thread. Changes to the registry |
325 // are posted to the IO thread where updates are applied to this object. | 324 // are posted to the IO thread where updates are applied to this object. |
326 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 325 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
327 | 326 |
328 DefaultClientObserverList default_client_observers_; | 327 DefaultClientObserverList default_client_observers_; |
329 | 328 |
330 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 329 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
331 }; | 330 }; |
332 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 331 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
OLD | NEW |