Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: chrome/browser/net/chrome_url_request_context.h

Issue 1702016: Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_thread.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 public: 247 public:
248 // Constructs a ChromeURLRequestContextGetter that will use |factory| to 248 // Constructs a ChromeURLRequestContextGetter that will use |factory| to
249 // create the ChromeURLRequestContext. If |profile| is non-NULL, then the 249 // create the ChromeURLRequestContext. If |profile| is non-NULL, then the
250 // ChromeURLRequestContextGetter will additionally watch the preferences for 250 // ChromeURLRequestContextGetter will additionally watch the preferences for
251 // changes to charset/language and CleanupOnUIThread() will need to be 251 // changes to charset/language and CleanupOnUIThread() will need to be
252 // called to unregister. 252 // called to unregister.
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() however can 257 // thread (it will assert otherwise). GetCookieStore() and
258 // 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 264
264 // Convenience overload of GetURLRequestContext() that returns a 265 // Convenience overload of GetURLRequestContext() that returns a
265 // ChromeURLRequestContext* rather than a URLRequestContext*. 266 // ChromeURLRequestContext* rather than a URLRequestContext*.
266 ChromeURLRequestContext* GetIOContext() { 267 ChromeURLRequestContext* GetIOContext() {
267 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext()); 268 return reinterpret_cast<ChromeURLRequestContext*>(GetURLRequestContext());
268 } 269 }
269 270
270 // 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
271 // expected to get called on the UI thread. 272 // expected to get called on the UI thread.
272 static ChromeURLRequestContextGetter* CreateOriginal( 273 static ChromeURLRequestContextGetter* CreateOriginal(
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 IOThread* const io_thread_; 393 IOThread* const io_thread_;
393 394
394 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); 395 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory);
395 }; 396 };
396 397
397 // Creates a proxy configuration using the overrides specified on the command 398 // Creates a proxy configuration using the overrides specified on the command
398 // line. Returns NULL if the system defaults should be used instead. 399 // line. Returns NULL if the system defaults should be used instead.
399 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); 400 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line);
400 401
401 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 402 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_thread.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698