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

Side by Side Diff: chrome/common/net/url_request_context_getter.h

Issue 6338002: net: Remove typedef net::URLRequestContext URLRequestContext; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for real Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/task.h" 10 #include "base/task.h"
11 11
12 namespace base { 12 namespace base {
13 class MessageLoopProxy; 13 class MessageLoopProxy;
14 } 14 }
15 15
16 namespace net { 16 namespace net {
17 class CookieStore; 17 class CookieStore;
18 class URLRequestContext; 18 class URLRequestContext;
19 } 19 }
20 20
21 struct URLRequestContextGetterTraits; 21 struct URLRequestContextGetterTraits;
22 22
23 // Interface for retrieving an URLRequestContext. 23 // Interface for retrieving an net::URLRequestContext.
24 class URLRequestContextGetter 24 class URLRequestContextGetter
25 : public base::RefCountedThreadSafe<URLRequestContextGetter, 25 : public base::RefCountedThreadSafe<URLRequestContextGetter,
26 URLRequestContextGetterTraits> { 26 URLRequestContextGetterTraits> {
27 public: 27 public:
28 virtual net::URLRequestContext* GetURLRequestContext() = 0; 28 virtual net::URLRequestContext* GetURLRequestContext() = 0;
29 29
30 // Defaults to GetURLRequestContext()->cookie_store(), but 30 // Defaults to GetURLRequestContext()->cookie_store(), but
31 // implementations can override it. 31 // implementations can override it.
32 virtual net::CookieStore* GetCookieStore(); 32 virtual net::CookieStore* GetCookieStore();
33 // Returns a MessageLoopProxy corresponding to the thread on which the 33 // Returns a MessageLoopProxy corresponding to the thread on which the
34 // request IO happens (the thread on which the returned URLRequestContext 34 // request IO happens (the thread on which the returned net::URLRequestContext
35 // may be used). 35 // may be used).
36 virtual scoped_refptr<base::MessageLoopProxy> 36 virtual scoped_refptr<base::MessageLoopProxy>
37 GetIOMessageLoopProxy() const = 0; 37 GetIOMessageLoopProxy() const = 0;
38 38
39 // Controls whether or not the URLRequestContextGetter considers itself to be 39 // Controls whether or not the URLRequestContextGetter considers itself to be
40 // the the "main" URLRequestContextGetter. Note that each Profile will have a 40 // the the "main" URLRequestContextGetter. Note that each Profile will have a
41 // "default" URLRequestContextGetter. Therefore, "is_main" refers to the 41 // "default" URLRequestContextGetter. Therefore, "is_main" refers to the
42 // default URLRequestContextGetter for the "main" Profile. 42 // default URLRequestContextGetter for the "main" Profile.
43 // TODO(willchan): Move this code to ChromeURLRequestContextGetter, since this 43 // TODO(willchan): Move this code to ChromeURLRequestContextGetter, since this
44 // ia a browser process specific concept. 44 // ia a browser process specific concept.
(...skipping 18 matching lines...) Expand all
63 bool is_main_; 63 bool is_main_;
64 }; 64 };
65 65
66 struct URLRequestContextGetterTraits { 66 struct URLRequestContextGetterTraits {
67 static void Destruct(const URLRequestContextGetter* context_getter) { 67 static void Destruct(const URLRequestContextGetter* context_getter) {
68 context_getter->OnDestruct(); 68 context_getter->OnDestruct();
69 } 69 }
70 }; 70 };
71 71
72 #endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_ 72 #endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698