| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 static void RegisterUserPrefs(PrefService* user_prefs); | 234 static void RegisterUserPrefs(PrefService* user_prefs); |
| 235 | 235 |
| 236 // Note that GetURLRequestContext() can only be called from the IO | 236 // Note that GetURLRequestContext() can only be called from the IO |
| 237 // thread (it will assert otherwise). GetCookieStore() and | 237 // thread (it will assert otherwise). GetCookieStore() and |
| 238 // GetIOMessageLoopProxy however can be called from any thread. | 238 // GetIOMessageLoopProxy however can be called from any thread. |
| 239 // | 239 // |
| 240 // URLRequestContextGetter implementation. | 240 // URLRequestContextGetter implementation. |
| 241 virtual URLRequestContext* GetURLRequestContext(); | 241 virtual URLRequestContext* GetURLRequestContext(); |
| 242 virtual net::CookieStore* GetCookieStore(); | 242 virtual net::CookieStore* GetCookieStore(); |
| 243 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); | 243 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; |
| 244 | 244 |
| 245 // Convenience overload of GetURLRequestContext() that returns a | 245 // Convenience overload of GetURLRequestContext() that returns a |
| 246 // ChromeURLRequestContext* rather than a URLRequestContext*. | 246 // ChromeURLRequestContext* rather than a URLRequestContext*. |
| 247 ChromeURLRequestContext* GetIOContext() { | 247 ChromeURLRequestContext* GetIOContext() { |
| 248 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); | 248 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 // Create an instance for use with an 'original' (non-OTR) profile. This is | 251 // Create an instance for use with an 'original' (non-OTR) profile. This is |
| 252 // expected to get called on the UI thread. | 252 // expected to get called on the UI thread. |
| 253 static ChromeURLRequestContextGetter* CreateOriginal( | 253 static ChromeURLRequestContextGetter* CreateOriginal( |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 376 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 // Creates a proxy configuration from proxy-related preferences fetched | 379 // Creates a proxy configuration from proxy-related preferences fetched |
| 380 // from |pref_service|. The relevant preferences in |pref_service| are | 380 // from |pref_service|. The relevant preferences in |pref_service| are |
| 381 // initialized from the process' command line or by applicable proxy policies. | 381 // initialized from the process' command line or by applicable proxy policies. |
| 382 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service); | 382 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service); |
| 383 | 383 |
| 384 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 384 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |