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

Side by Side Diff: net/url_request/url_request_context_getter.h

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: merge Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_
6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 11 matching lines...) Expand all
22 22
23 struct URLRequestContextGetterTraits; 23 struct URLRequestContextGetterTraits;
24 24
25 // Interface for retrieving an URLRequestContext. 25 // Interface for retrieving an URLRequestContext.
26 class NET_EXPORT URLRequestContextGetter 26 class NET_EXPORT URLRequestContextGetter
27 : public base::RefCountedThreadSafe<URLRequestContextGetter, 27 : public base::RefCountedThreadSafe<URLRequestContextGetter,
28 URLRequestContextGetterTraits> { 28 URLRequestContextGetterTraits> {
29 public: 29 public:
30 // Returns the URLRequestContextGetter's URLRequestContext. Must only be 30 // Returns the URLRequestContextGetter's URLRequestContext. Must only be
31 // called on the network task runner. Once NotifyContextShuttingDown() is 31 // called on the network task runner. Once NotifyContextShuttingDown() is
32 // invoked, must always return nullptr. 32 // invoked, must always return nullptr. Does not transfer ownership of
33 // the URLRequestContext.
33 virtual URLRequestContext* GetURLRequestContext() = 0; 34 virtual URLRequestContext* GetURLRequestContext() = 0;
34 35
35 // Returns a SingleThreadTaskRunner corresponding to the thread on 36 // Returns a SingleThreadTaskRunner corresponding to the thread on
36 // which the network IO happens (the thread on which the returned 37 // which the network IO happens (the thread on which the returned
37 // URLRequestContext may be used). 38 // URLRequestContext may be used).
38 virtual scoped_refptr<base::SingleThreadTaskRunner> 39 virtual scoped_refptr<base::SingleThreadTaskRunner>
39 GetNetworkTaskRunner() const = 0; 40 GetNetworkTaskRunner() const = 0;
40 41
41 // Adds / removes an observer to watch for shutdown of |this|'s context. Must 42 // Adds / removes an observer to watch for shutdown of |this|'s context. Must
42 // only be called on network thread. May not be called once 43 // only be called on network thread. May not be called once
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 99
99 URLRequestContext* context_; 100 URLRequestContext* context_;
100 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 101 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
101 102
102 DISALLOW_COPY_AND_ASSIGN(TrivialURLRequestContextGetter); 103 DISALLOW_COPY_AND_ASSIGN(TrivialURLRequestContextGetter);
103 }; 104 };
104 105
105 } // namespace net 106 } // namespace net
106 107
107 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_ 108 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.cc ('k') | net/url_request/url_request_context_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698