Make castv2 performance test work.
[chromium-blink-merge.git] / chrome / service / net / service_url_request_context_getter.h
blobcd50265845eba18f5c317da9d6d856c475c90954
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
3 // found in the LICENSE file.
5 #ifndef CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_GETTER_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "net/cookies/cookie_monster.h"
12 #include "net/disk_cache/disk_cache.h"
13 #include "net/dns/host_resolver.h"
14 #include "net/ftp/ftp_network_layer.h"
15 #include "net/http/http_auth_handler_factory.h"
16 #include "net/http/http_cache.h"
17 #include "net/http/http_network_layer.h"
18 #include "net/ssl/ssl_config_service_defaults.h"
19 #include "net/url_request/url_request_context.h"
20 #include "net/url_request/url_request_context_getter.h"
21 #include "net/url_request/url_request_context_storage.h"
23 namespace base {
24 class MessageLoopProxy;
27 namespace net {
28 class ProxyConfigService;
31 class ServiceURLRequestContextGetter : public net::URLRequestContextGetter {
32 public:
33 net::URLRequestContext* GetURLRequestContext() override;
34 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
35 const override;
37 void set_user_agent(const std::string& ua) {
38 user_agent_ = ua;
40 std::string user_agent() const {
41 return user_agent_;
44 private:
45 friend class ServiceProcess;
46 ServiceURLRequestContextGetter();
47 ~ServiceURLRequestContextGetter() override;
49 std::string user_agent_;
50 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
51 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
52 scoped_ptr<net::URLRequestContext> url_request_context_;
55 #endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_GETTER_H_