Skip to content

Commit

Permalink
Implement HeadlessContentBrowserClient::GetAcceptLangs();
Browse files Browse the repository at this point in the history
This method was previously unused, but with the network service moving
out of process, the speech recognition code will now need to use it.

No idea if we use speech recognition on headless (Though it does seem
unlikely), so this may not be needed?

Bug: 841445
Change-Id: I2c75a53663f46ddfbbd14aeac4ab3d6686d7d6e0
Reviewed-on: https://chromium-review.googlesource.com/1145711
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578128}
  • Loading branch information
Matt Menke authored and Commit Bot committed Jul 25, 2018
1 parent b0efc66 commit 7d3232c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions headless/lib/browser/headless_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches(
}
}

std::string HeadlessContentBrowserClient::GetAcceptLangs(
content::BrowserContext* context) {
return browser_->options()->accept_language;
}

void HeadlessContentBrowserClient::AllowCertificateError(
content::WebContents* web_contents,
int cert_error,
Expand Down
5 changes: 1 addition & 4 deletions headless/lib/browser/headless_content_browser_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
#endif
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override;

std::string GetAcceptLangs(content::BrowserContext* context) override;
void AllowCertificateError(
content::WebContents* web_contents,
int cert_error,
Expand All @@ -51,15 +51,12 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
bool expired_previous_decision,
const base::Callback<void(content::CertificateRequestResultType)>&
callback) override;

void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;

void ResourceDispatcherHostCreated() override;

bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
const GURL& effective_site_url) override;

Expand Down

0 comments on commit 7d3232c

Please sign in to comment.