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_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 chrome_protocol_handler, | 102 chrome_protocol_handler, |
103 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 103 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
104 chrome_devtools_protocol_handler); | 104 chrome_devtools_protocol_handler); |
105 | 105 |
106 // Create an instance for an original profile for media. This is expected to | 106 // Create an instance for an original profile for media. This is expected to |
107 // get called on UI thread. This method takes a profile and reuses the | 107 // get called on UI thread. This method takes a profile and reuses the |
108 // 'original' net::URLRequestContext for common files. | 108 // 'original' net::URLRequestContext for common files. |
109 static ChromeURLRequestContextGetter* CreateOriginalForMedia( | 109 static ChromeURLRequestContextGetter* CreateOriginalForMedia( |
110 Profile* profile, const ProfileIOData* profile_io_data); | 110 Profile* profile, const ProfileIOData* profile_io_data); |
111 | 111 |
112 // Create an instance for an original profile for extensions. This is expected | |
113 // to get called on UI thread. | |
114 static ChromeURLRequestContextGetter* CreateOriginalForExtensions( | |
115 Profile* profile, const ProfileIOData* profile_io_data); | |
116 | |
117 // Create an instance for an original profile for an app with isolated | 112 // Create an instance for an original profile for an app with isolated |
118 // storage. This is expected to get called on UI thread. | 113 // storage. This is expected to get called on UI thread. |
119 static ChromeURLRequestContextGetter* CreateOriginalForIsolatedApp( | 114 static ChromeURLRequestContextGetter* CreateOriginalForIsolatedApp( |
120 Profile* profile, | 115 Profile* profile, |
121 const ProfileIOData* profile_io_data, | 116 const ProfileIOData* profile_io_data, |
122 const StoragePartitionDescriptor& partition_descriptor, | 117 const StoragePartitionDescriptor& partition_descriptor, |
123 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 118 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
124 protocol_handler_interceptor, | 119 protocol_handler_interceptor, |
125 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 120 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
126 blob_protocol_handler, | 121 blob_protocol_handler, |
(...skipping 23 matching lines...) Expand all Loading... |
150 blob_protocol_handler, | 145 blob_protocol_handler, |
151 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 146 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
152 file_system_protocol_handler, | 147 file_system_protocol_handler, |
153 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 148 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
154 developer_protocol_handler, | 149 developer_protocol_handler, |
155 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 150 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
156 chrome_protocol_handler, | 151 chrome_protocol_handler, |
157 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 152 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
158 chrome_devtools_protocol_handler); | 153 chrome_devtools_protocol_handler); |
159 | 154 |
160 // Create an instance for an OTR profile for extensions. This is expected | |
161 // to get called on UI thread. | |
162 static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( | |
163 Profile* profile, const ProfileIOData* profile_io_data); | |
164 | |
165 // Create an instance for an OTR profile for an app with isolated storage. | 155 // Create an instance for an OTR profile for an app with isolated storage. |
166 // This is expected to get called on UI thread. | 156 // This is expected to get called on UI thread. |
167 static ChromeURLRequestContextGetter* CreateOffTheRecordForIsolatedApp( | 157 static ChromeURLRequestContextGetter* CreateOffTheRecordForIsolatedApp( |
168 Profile* profile, | 158 Profile* profile, |
169 const ProfileIOData* profile_io_data, | 159 const ProfileIOData* profile_io_data, |
170 const StoragePartitionDescriptor& partition_descriptor, | 160 const StoragePartitionDescriptor& partition_descriptor, |
171 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 161 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
172 protocol_handler_interceptor, | 162 protocol_handler_interceptor, |
173 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 163 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
174 blob_protocol_handler, | 164 blob_protocol_handler, |
(...skipping 15 matching lines...) Expand all Loading... |
190 | 180 |
191 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext | 181 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext |
192 // instance that was lazily created by GetURLRequestContext(). | 182 // instance that was lazily created by GetURLRequestContext(). |
193 // Access only from the IO thread. | 183 // Access only from the IO thread. |
194 base::WeakPtr<ChromeURLRequestContext> url_request_context_; | 184 base::WeakPtr<ChromeURLRequestContext> url_request_context_; |
195 | 185 |
196 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 186 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
197 }; | 187 }; |
198 | 188 |
199 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 189 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |