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

Side by Side Diff: headless/lib/browser/headless_browser_context_impl.cc

Issue 2777783002: Remove user agent from HeadlessBrowserContextOptions. (Closed)
Patch Set: Remove --user-agent flag 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
« no previous file with comments | « no previous file | headless/lib/browser/headless_browser_context_options.h » ('j') | 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 "headless/lib/browser/headless_browser_context_impl.h" 5 #include "headless/lib/browser/headless_browser_context_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 HeadlessBrowserContext::Builder::Builder(Builder&&) = default; 307 HeadlessBrowserContext::Builder::Builder(Builder&&) = default;
308 308
309 HeadlessBrowserContext::Builder& 309 HeadlessBrowserContext::Builder&
310 HeadlessBrowserContext::Builder::SetProtocolHandlers( 310 HeadlessBrowserContext::Builder::SetProtocolHandlers(
311 ProtocolHandlerMap protocol_handlers) { 311 ProtocolHandlerMap protocol_handlers) {
312 options_->protocol_handlers_ = std::move(protocol_handlers); 312 options_->protocol_handlers_ = std::move(protocol_handlers);
313 return *this; 313 return *this;
314 } 314 }
315 315
316 HeadlessBrowserContext::Builder& HeadlessBrowserContext::Builder::SetUserAgent(
317 const std::string& user_agent) {
318 options_->user_agent_ = user_agent;
319 return *this;
320 }
321
322 HeadlessBrowserContext::Builder& 316 HeadlessBrowserContext::Builder&
323 HeadlessBrowserContext::Builder::SetProductNameAndVersion( 317 HeadlessBrowserContext::Builder::SetProductNameAndVersion(
324 const std::string& product_name_and_version) { 318 const std::string& product_name_and_version) {
325 options_->product_name_and_version_ = product_name_and_version; 319 options_->product_name_and_version_ = product_name_and_version;
326 return *this; 320 return *this;
327 } 321 }
328 322
329 HeadlessBrowserContext::Builder& 323 HeadlessBrowserContext::Builder&
330 HeadlessBrowserContext::Builder::SetProxyServer( 324 HeadlessBrowserContext::Builder::SetProxyServer(
331 const net::HostPortPair& proxy_server) { 325 const net::HostPortPair& proxy_server) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 HeadlessBrowserContext::Builder::MojoBindings::MojoBindings() {} 406 HeadlessBrowserContext::Builder::MojoBindings::MojoBindings() {}
413 407
414 HeadlessBrowserContext::Builder::MojoBindings::MojoBindings( 408 HeadlessBrowserContext::Builder::MojoBindings::MojoBindings(
415 const std::string& mojom_name, 409 const std::string& mojom_name,
416 const std::string& js_bindings) 410 const std::string& js_bindings)
417 : mojom_name(mojom_name), js_bindings(js_bindings) {} 411 : mojom_name(mojom_name), js_bindings(js_bindings) {}
418 412
419 HeadlessBrowserContext::Builder::MojoBindings::~MojoBindings() {} 413 HeadlessBrowserContext::Builder::MojoBindings::~MojoBindings() {}
420 414
421 } // namespace headless 415 } // namespace headless
OLDNEW
« no previous file with comments | « no previous file | headless/lib/browser/headless_browser_context_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698