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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 ChromeURLRequestContextGetter(Profile* profile, | 253 ChromeURLRequestContextGetter(Profile* profile, |
254 ChromeURLRequestContextFactory* factory); | 254 ChromeURLRequestContextFactory* factory); |
255 | 255 |
256 // Note that GetURLRequestContext() can only be called from the IO | 256 // Note that GetURLRequestContext() can only be called from the IO |
257 // thread (it will assert otherwise). GetCookieStore() and | 257 // thread (it will assert otherwise). GetCookieStore() and |
258 // GetIOMessageLoopProxy however can be called from any thread. | 258 // GetIOMessageLoopProxy however can be called from any thread. |
259 // | 259 // |
260 // URLRequestContextGetter implementation. | 260 // URLRequestContextGetter implementation. |
261 virtual URLRequestContext* GetURLRequestContext(); | 261 virtual URLRequestContext* GetURLRequestContext(); |
262 virtual net::CookieStore* GetCookieStore(); | 262 virtual net::CookieStore* GetCookieStore(); |
263 virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy(); | 263 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); |
264 | 264 |
265 // Convenience overload of GetURLRequestContext() that returns a | 265 // Convenience overload of GetURLRequestContext() that returns a |
266 // ChromeURLRequestContext* rather than a URLRequestContext*. | 266 // ChromeURLRequestContext* rather than a URLRequestContext*. |
267 ChromeURLRequestContext* GetIOContext() { | 267 ChromeURLRequestContext* GetIOContext() { |
268 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); | 268 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); |
269 } | 269 } |
270 | 270 |
271 // Create an instance for use with an 'original' (non-OTR) profile. This is | 271 // Create an instance for use with an 'original' (non-OTR) profile. This is |
272 // expected to get called on the UI thread. | 272 // expected to get called on the UI thread. |
273 static ChromeURLRequestContextGetter* CreateOriginal( | 273 static ChromeURLRequestContextGetter* CreateOriginal( |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 IOThread* const io_thread_; | 393 IOThread* const io_thread_; |
394 | 394 |
395 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 395 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
396 }; | 396 }; |
397 | 397 |
398 // Creates a proxy configuration using the overrides specified on the command | 398 // Creates a proxy configuration using the overrides specified on the command |
399 // line. Returns NULL if the system defaults should be used instead. | 399 // line. Returns NULL if the system defaults should be used instead. |
400 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); | 400 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); |
401 | 401 |
402 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 402 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |