mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-29 02:52:19 +01:00
Support configuration of the "Accept-Language" HTTP header globally or on a per-browser basis using new CefSettings.accept_language_list and CefBrowserSettings.accept_language_list members (issue #318).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2034 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
f67b6fecaf
commit
80128453c3
@ -145,14 +145,9 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
new net::DefaultChannelIDStore(NULL),
|
||||
base::WorkerPool::GetTaskRunner(true))));
|
||||
|
||||
std::string accept_language;
|
||||
if (settings.accept_language_list.length > 0) {
|
||||
accept_language =
|
||||
net::HttpUtil::GenerateAcceptLanguageHeader(
|
||||
CefString(&settings.accept_language_list));
|
||||
} else {
|
||||
accept_language = "en-US,en";
|
||||
}
|
||||
const std::string& accept_language =
|
||||
settings.accept_language_list.length > 0 ?
|
||||
CefString(&settings.accept_language_list): "en-US,en";
|
||||
storage_->set_http_user_agent_settings(
|
||||
new CefHttpUserAgentSettings(accept_language));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user