| OLD | NEW |
| 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 #include "content/public/common/user_agent.h" | 5 #include "content/public/common/user_agent.h" |
| 6 #include "headless/public/headless_browser.h" | 6 #include "headless/public/headless_browser.h" |
| 7 #include "net/url_request/url_request_context_getter.h" | 7 #include "net/url_request/url_request_context_getter.h" |
| 8 | 8 |
| 9 using Options = headless::HeadlessBrowser::Options; | 9 using Options = headless::HeadlessBrowser::Options; |
| 10 using Builder = headless::HeadlessBrowser::Options::Builder; | 10 using Builder = headless::HeadlessBrowser::Options::Builder; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 Builder& Builder::SetProxyServer(const net::HostPortPair& proxy_server) { | 51 Builder& Builder::SetProxyServer(const net::HostPortPair& proxy_server) { |
| 52 options_.proxy_server = proxy_server; | 52 options_.proxy_server = proxy_server; |
| 53 return *this; | 53 return *this; |
| 54 } | 54 } |
| 55 | 55 |
| 56 Builder& Builder::SetSingleProcessMode(bool single_process_mode) { | 56 Builder& Builder::SetSingleProcessMode(bool single_process_mode) { |
| 57 options_.single_process_mode = single_process_mode; | 57 options_.single_process_mode = single_process_mode; |
| 58 return *this; | 58 return *this; |
| 59 } | 59 } |
| 60 | 60 |
| 61 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) { |
| 62 options_.host_resolver_rules = host_resolver_rules; |
| 63 return *this; |
| 64 } |
| 65 |
| 61 Options Builder::Build() { | 66 Options Builder::Build() { |
| 62 return options_; | 67 return options_; |
| 63 } | 68 } |
| 64 | 69 |
| 65 } // namespace headless | 70 } // namespace headless |
| OLD | NEW |