Clean-up: Removes gfx::FontList::GetStringWidth(text).
[chromium-blink-merge.git] / remoting / base / url_request_context.h
blob6ce2d572b6722c8c1e9b8e411b43adb7f41cbc3e
1 // Copyright 2013 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.
5 #ifndef REMOTING_BASE_URL_REQUEST_CONTEXT_H_
6 #define REMOTING_BASE_URL_REQUEST_CONTEXT_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/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"
18 namespace base {
19 class MessageLoopProxy;
20 } // namespace base
22 namespace remoting {
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);
32 private:
33 virtual ~URLRequestContext();
35 net::URLRequestContextStorage storage_;
37 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
40 class URLRequestContextGetter : public net::URLRequestContextGetter {
41 public:
42 URLRequestContextGetter(
43 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
45 // Overridden from net::URLRequestContextGetter:
46 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
47 virtual scoped_refptr<base::SingleThreadTaskRunner>
48 GetNetworkTaskRunner() const OVERRIDE;
50 protected:
51 virtual ~URLRequestContextGetter();
53 private:
54 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
55 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
56 scoped_ptr<net::URLRequestContext> url_request_context_;
58 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
61 } // namespace remoting
63 #endif // REMOTING_BASE_URL_REQUEST_CONTEXT_H_