Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / chromedriver / net / url_request_context_getter.h
blob72adfc94c424242c70bd8a4b5a8bc343bcee8d3c
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.
5 #ifndef CHROME_TEST_CHROMEDRIVER_NET_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CHROME_TEST_CHROMEDRIVER_NET_URL_REQUEST_CONTEXT_GETTER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "net/url_request/url_request_context_getter.h"
14 namespace base {
15 class SingleThreadTaskRunner;
18 namespace net {
19 class URLRequestContext;
22 class URLRequestContextGetter : public net::URLRequestContextGetter {
23 public:
24 explicit URLRequestContextGetter(
25 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
27 // Overridden from net::URLRequestContextGetter:
28 net::URLRequestContext* GetURLRequestContext() override;
29 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
30 const override;
32 private:
33 ~URLRequestContextGetter() override;
35 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
37 // Only accessed on the IO thread.
38 scoped_ptr<net::URLRequestContext> url_request_context_;
40 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
43 #endif // CHROME_TEST_CHROMEDRIVER_NET_URL_REQUEST_CONTEXT_GETTER_H_