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

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

Issue 2187473002: [headless] Add option to disable sandbox from API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 #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 7
8 using Options = headless::HeadlessBrowser::Options; 8 using Options = headless::HeadlessBrowser::Options;
9 using Builder = headless::HeadlessBrowser::Options::Builder; 9 using Builder = headless::HeadlessBrowser::Options::Builder;
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) { 57 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) {
58 options_.host_resolver_rules = host_resolver_rules; 58 options_.host_resolver_rules = host_resolver_rules;
59 return *this; 59 return *this;
60 } 60 }
61 61
62 Builder& Builder::SetSingleProcessMode(bool single_process_mode) { 62 Builder& Builder::SetSingleProcessMode(bool single_process_mode) {
63 options_.single_process_mode = single_process_mode; 63 options_.single_process_mode = single_process_mode;
64 return *this; 64 return *this;
65 } 65 }
66 66
67 Builder& Builder::SetDisableSandbox(bool disable_sandbox) {
68 options_.disable_sandbox = disable_sandbox;
69 return *this;
70 }
71
67 Builder& Builder::SetProtocolHandlers(ProtocolHandlerMap protocol_handlers) { 72 Builder& Builder::SetProtocolHandlers(ProtocolHandlerMap protocol_handlers) {
68 options_.protocol_handlers = std::move(protocol_handlers); 73 options_.protocol_handlers = std::move(protocol_handlers);
69 return *this; 74 return *this;
70 } 75 }
71 76
72 Options Builder::Build() { 77 Options Builder::Build() {
73 return std::move(options_); 78 return std::move(options_);
74 } 79 }
75 80
76 } // namespace headless 81 } // namespace headless
OLDNEW
« headless/public/headless_browser.h ('K') | « headless/public/headless_browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698