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

Side by Side Diff: remoting/host/url_request_context.h

Issue 18460003: Move url_request_context from remoting/host/ to remoting/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « remoting/host/setup/win/host_configurer.cc ('k') | remoting/host/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_URL_REQUEST_CONTEXT_H_
6 #define REMOTING_HOST_URL_REQUEST_CONTEXT_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h"
13 #include "net/proxy/proxy_config_service.h"
14 #include "net/url_request/url_request_context.h"
15 #include "net/url_request/url_request_context_getter.h"
16 #include "net/url_request/url_request_context_storage.h"
17
18 namespace base {
19 class MessageLoopProxy;
20 } // namespace base
21
22 namespace remoting {
23
24 // Subclass of net::URLRequestContext which can be used to store extra
25 // information for requests. This subclass is meant to be used in the
26 // remoting Me2Me host process where the profile is not available.
27 class URLRequestContext : public net::URLRequestContext {
28 public:
29 explicit URLRequestContext(
30 scoped_ptr<net::ProxyConfigService> proxy_config_service);
31
32 private:
33 virtual ~URLRequestContext();
34
35 net::URLRequestContextStorage storage_;
36
37 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
38 };
39
40 class URLRequestContextGetter : public net::URLRequestContextGetter {
41 public:
42 URLRequestContextGetter(
43 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
44 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
45
46 // Overridden from net::URLRequestContextGetter:
47 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
48 virtual scoped_refptr<base::SingleThreadTaskRunner>
49 GetNetworkTaskRunner() const OVERRIDE;
50
51 protected:
52 virtual ~URLRequestContextGetter();
53
54 private:
55 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
56 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
57 scoped_ptr<net::URLRequestContext> url_request_context_;
58
59 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
60 };
61
62 } // namespace remoting
63
64 #endif // REMOTING_HOST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « remoting/host/setup/win/host_configurer.cc ('k') | remoting/host/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698