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

Side by Side Diff: headless/public/headless_browser.cc

Issue 1912673002: headless: Add support for host resolver mapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased again 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
« no previous file with comments | « headless/public/headless_browser.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 Builder& Builder::SetMessagePump(base::MessagePump* message_pump) { 45 Builder& Builder::SetMessagePump(base::MessagePump* message_pump) {
46 options_.message_pump = message_pump; 46 options_.message_pump = message_pump;
47 return *this; 47 return *this;
48 } 48 }
49 49
50 Builder& Builder::SetProxyServer(const net::HostPortPair& proxy_server) { 50 Builder& Builder::SetProxyServer(const net::HostPortPair& proxy_server) {
51 options_.proxy_server = proxy_server; 51 options_.proxy_server = proxy_server;
52 return *this; 52 return *this;
53 } 53 }
54 54
55 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) {
56 options_.host_resolver_rules = host_resolver_rules;
57 return *this;
58 }
59
55 Options Builder::Build() { 60 Options Builder::Build() {
56 return options_; 61 return options_;
57 } 62 }
58 63
59 } // namespace headless 64 } // namespace headless
OLDNEW
« no previous file with comments | « headless/public/headless_browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698