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

Side by Side Diff: remoting/base/url_request_context_getter.h

Issue 2977693003: Use TaskRunner passed in to URLRequestContextBuilder only for the cache (Closed)
Patch Set: Actually, don't need to set the thread everywhere Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
6 #define REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "net/url_request/url_request_context_getter.h" 11 #include "net/url_request/url_request_context_getter.h"
12 12
13 namespace base { 13 namespace base {
14 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
15 } // namespace base 15 } // namespace base
16 16
17 namespace net { 17 namespace net {
18 class NetLog; 18 class NetLog;
19 class ProxyConfigService; 19 class ProxyConfigService;
20 } // namespace net 20 } // namespace net
21 21
22 namespace remoting { 22 namespace remoting {
23 23
24 class URLRequestContextGetter : public net::URLRequestContextGetter { 24 class URLRequestContextGetter : public net::URLRequestContextGetter {
25 public: 25 public:
26 // TODO(mmenke): Remove |file_task_runner|, as it's no longer used.
26 URLRequestContextGetter( 27 URLRequestContextGetter(
27 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 28 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
28 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); 29 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
29 30
30 // Overridden from net::URLRequestContextGetter: 31 // Overridden from net::URLRequestContextGetter:
31 net::URLRequestContext* GetURLRequestContext() override; 32 net::URLRequestContext* GetURLRequestContext() override;
32 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() 33 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
33 const override; 34 const override;
34 35
35 protected: 36 protected:
36 ~URLRequestContextGetter() override; 37 ~URLRequestContextGetter() override;
37 38
38 private: 39 private:
39 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 40 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
40 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 41 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
41 std::unique_ptr<net::ProxyConfigService> proxy_config_service_; 42 std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
42 std::unique_ptr<net::NetLog> net_log_; 43 std::unique_ptr<net::NetLog> net_log_;
43 std::unique_ptr<net::URLRequestContext> url_request_context_; 44 std::unique_ptr<net::URLRequestContext> url_request_context_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); 46 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
46 }; 47 };
47 48
48 } // namespace remoting 49 } // namespace remoting
49 50
50 #endif // REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ 51 #endif // REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.cc ('k') | remoting/base/url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698