OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/linked_ptr.h" | 9 #include "base/linked_ptr.h" |
10 #include "net/base/cookie_policy.h" | 10 #include "net/base/cookie_policy.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 // Create an instance for an original profile for extensions. This is expected | 274 // Create an instance for an original profile for extensions. This is expected |
275 // to get called on UI thread. | 275 // to get called on UI thread. |
276 static ChromeURLRequestContextGetter* CreateOriginalForExtensions( | 276 static ChromeURLRequestContextGetter* CreateOriginalForExtensions( |
277 Profile* profile, const FilePath& cookie_store_path); | 277 Profile* profile, const FilePath& cookie_store_path); |
278 | 278 |
279 // Create an instance for use with an OTR profile. This is expected to get | 279 // Create an instance for use with an OTR profile. This is expected to get |
280 // called on the UI thread. | 280 // called on the UI thread. |
281 static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile); | 281 static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile); |
282 | 282 |
283 // Create an instance of request context for OTR profile for extensions. | |
284 static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( | |
285 Profile* profile); | |
286 | |
287 // Clean up UI thread resources. This is expected to get called on the UI | 283 // Clean up UI thread resources. This is expected to get called on the UI |
288 // thread before the instance is deleted on the IO thread. | 284 // thread before the instance is deleted on the IO thread. |
289 void CleanupOnUIThread(); | 285 void CleanupOnUIThread(); |
290 | 286 |
291 // These methods simply forward to the corresponding methods on | 287 // These methods simply forward to the corresponding methods on |
292 // ChromeURLRequestContext. Takes ownership of |extension_info|. | 288 // ChromeURLRequestContext. Takes ownership of |extension_info|. |
293 void OnNewExtensions( | 289 void OnNewExtensions( |
294 const std::string& extension_id, | 290 const std::string& extension_id, |
295 ChromeURLRequestContext::ExtensionInfo* extension_info); | 291 ChromeURLRequestContext::ExtensionInfo* extension_info); |
296 void OnUnloadedExtension(const std::string& id); | 292 void OnUnloadedExtension(const std::string& id); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 IOThread* const io_thread_; | 383 IOThread* const io_thread_; |
388 | 384 |
389 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 385 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
390 }; | 386 }; |
391 | 387 |
392 // Creates a proxy configuration using the overrides specified on the command | 388 // Creates a proxy configuration using the overrides specified on the command |
393 // line. Returns NULL if the system defaults should be used instead. | 389 // line. Returns NULL if the system defaults should be used instead. |
394 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); | 390 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); |
395 | 391 |
396 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 392 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |