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

Side by Side Diff: headless/lib/browser/headless_url_request_context_getter.h

Issue 2841953002: headless: Add support for net logging (Closed)
Patch Set: CrOS build fix Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 class HeadlessBrowserContextOptions; 28 class HeadlessBrowserContextOptions;
29 29
30 class HeadlessURLRequestContextGetter : public net::URLRequestContextGetter { 30 class HeadlessURLRequestContextGetter : public net::URLRequestContextGetter {
31 public: 31 public:
32 HeadlessURLRequestContextGetter( 32 HeadlessURLRequestContextGetter(
33 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
34 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, 34 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
35 content::ProtocolHandlerMap* protocol_handlers, 35 content::ProtocolHandlerMap* protocol_handlers,
36 ProtocolHandlerMap context_protocol_handlers, 36 ProtocolHandlerMap context_protocol_handlers,
37 content::URLRequestInterceptorScopedVector request_interceptors, 37 content::URLRequestInterceptorScopedVector request_interceptors,
38 HeadlessBrowserContextOptions* options); 38 HeadlessBrowserContextOptions* options,
39 net::NetLog* net_log);
39 40
40 // net::URLRequestContextGetter implementation: 41 // net::URLRequestContextGetter implementation:
41 net::URLRequestContext* GetURLRequestContext() override; 42 net::URLRequestContext* GetURLRequestContext() override;
42 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() 43 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
43 const override; 44 const override;
44 45
45 net::HostResolver* host_resolver() const; 46 net::HostResolver* host_resolver() const;
46 47
47 protected: 48 protected:
48 ~HeadlessURLRequestContextGetter() override; 49 ~HeadlessURLRequestContextGetter() override;
49 50
50 private: 51 private:
51 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 52 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
52 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 53 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
53 54
54 // The |options| object given to the constructor is not guaranteed to outlive 55 // The |options| object given to the constructor is not guaranteed to outlive
55 // this class, so we make copies of the parts we need to access on the IO 56 // this class, so we make copies of the parts we need to access on the IO
56 // thread. 57 // thread.
57 std::string user_agent_; 58 std::string user_agent_;
58 std::string host_resolver_rules_; 59 std::string host_resolver_rules_;
59 net::HostPortPair proxy_server_; 60 net::HostPortPair proxy_server_;
60 61
61 std::unique_ptr<net::ProxyConfigService> proxy_config_service_; 62 std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
62 std::unique_ptr<net::URLRequestContext> url_request_context_; 63 std::unique_ptr<net::URLRequestContext> url_request_context_;
63 content::ProtocolHandlerMap protocol_handlers_; 64 content::ProtocolHandlerMap protocol_handlers_;
64 content::URLRequestInterceptorScopedVector request_interceptors_; 65 content::URLRequestInterceptorScopedVector request_interceptors_;
66 net::NetLog* net_log_; // Not owned.
65 67
66 DISALLOW_COPY_AND_ASSIGN(HeadlessURLRequestContextGetter); 68 DISALLOW_COPY_AND_ASSIGN(HeadlessURLRequestContextGetter);
67 }; 69 };
68 70
69 } // namespace headless 71 } // namespace headless
70 72
71 #endif // HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_ 73 #endif // HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_net_log.cc ('k') | headless/lib/browser/headless_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698