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

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

Issue 1854043002: convert //headless to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
14 #include "headless/public/headless_browser.h" 15 #include "headless/public/headless_browser.h"
15 #include "net/proxy/proxy_config_service.h" 16 #include "net/proxy/proxy_config_service.h"
16 #include "net/url_request/url_request_context_getter.h" 17 #include "net/url_request/url_request_context_getter.h"
17 #include "net/url_request/url_request_job_factory.h" 18 #include "net/url_request/url_request_job_factory.h"
18 19
19 namespace base { 20 namespace base {
20 class MessageLoop; 21 class MessageLoop;
21 } 22 }
22 23
(...skipping 24 matching lines...) Expand all
47 // net::URLRequestContextGetter implementation: 48 // net::URLRequestContextGetter implementation:
48 net::URLRequestContext* GetURLRequestContext() override; 49 net::URLRequestContext* GetURLRequestContext() override;
49 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() 50 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
50 const override; 51 const override;
51 52
52 net::HostResolver* host_resolver() const; 53 net::HostResolver* host_resolver() const;
53 54
54 protected: 55 protected:
55 ~HeadlessURLRequestContextGetter() override; 56 ~HeadlessURLRequestContextGetter() override;
56 57
57 scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate(); 58 std::unique_ptr<net::NetworkDelegate> CreateNetworkDelegate();
58 scoped_ptr<net::ProxyConfigService> GetProxyConfigService(); 59 std::unique_ptr<net::ProxyConfigService> GetProxyConfigService();
59 scoped_ptr<net::ProxyService> GetProxyService(); 60 std::unique_ptr<net::ProxyService> GetProxyService();
60 61
61 private: 62 private:
62 bool ignore_certificate_errors_; 63 bool ignore_certificate_errors_;
63 base::FilePath base_path_; 64 base::FilePath base_path_;
64 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 65 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
65 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 66 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
66 net::NetLog* net_log_; 67 net::NetLog* net_log_;
67 HeadlessBrowser::Options options_; 68 HeadlessBrowser::Options options_;
68 69
69 scoped_ptr<net::ProxyConfigService> proxy_config_service_; 70 std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
70 scoped_ptr<net::NetworkDelegate> network_delegate_; 71 std::unique_ptr<net::NetworkDelegate> network_delegate_;
71 scoped_ptr<net::URLRequestContextStorage> storage_; 72 std::unique_ptr<net::URLRequestContextStorage> storage_;
72 scoped_ptr<net::URLRequestContext> url_request_context_; 73 std::unique_ptr<net::URLRequestContext> url_request_context_;
73 content::ProtocolHandlerMap protocol_handlers_; 74 content::ProtocolHandlerMap protocol_handlers_;
74 content::URLRequestInterceptorScopedVector request_interceptors_; 75 content::URLRequestInterceptorScopedVector request_interceptors_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(HeadlessURLRequestContextGetter); 77 DISALLOW_COPY_AND_ASSIGN(HeadlessURLRequestContextGetter);
77 }; 78 };
78 79
79 } // namespace headless 80 } // namespace headless
80 81
81 #endif // HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_ 82 #endif // HEADLESS_LIB_BROWSER_HEADLESS_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_devtools.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