Commit 6d4a80f3 authored by Tim Volodine's avatar Tim Volodine Committed by Commit Bot

[AW] Make sure to expand accept languages (NS code path)

AcceptLanguageTests have been updated recently [1] to ensure expanded
accept languages header. This patch ensure this also happens in the
Network Service code path.

Impacted tests (fixed by this patch):
- org.chromium.android_webview.test.AcceptLanguageTest#testAcceptLanguage
- org.chromium.android_webview.test.AcceptLanguageTest#testAcceptLanguagesWithenUS

Note:
- verified on android_mojo bot (see tryjobs this patch)
- should also fix the [Mojo Android] fyi waterfall bot [2].

[1] https://crrev.com/c/1286936
[2] https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mojo%20Android

BUG=893561,841556

Change-Id: I638b8ce855fea1a60ccaf623c559f53c1408154d
Reviewed-on: https://chromium-review.googlesource.com/c/1314594
Commit-Queue: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605071}
parent 0211ba47
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "content/public/common/renderer_preferences.h" #include "content/public/common/renderer_preferences.h"
#include "content/public/common/web_preferences.h" #include "content/public/common/web_preferences.h"
#include "jni/AwSettings_jni.h" #include "jni/AwSettings_jni.h"
#include "net/http/http_util.h"
#include "services/network/public/cpp/features.h" #include "services/network/public/cpp/features.h"
#include "ui/gfx/font_render_params.h" #include "ui/gfx/font_render_params.h"
...@@ -256,7 +257,7 @@ void AwSettings::UpdateRendererPreferencesLocked( ...@@ -256,7 +257,7 @@ void AwSettings::UpdateRendererPreferencesLocked(
content::StoragePartition* storage_partition = content::StoragePartition* storage_partition =
content::BrowserContext::GetDefaultStoragePartition(aw_browser_context); content::BrowserContext::GetDefaultStoragePartition(aw_browser_context);
storage_partition->GetNetworkContext()->SetAcceptLanguage( storage_partition->GetNetworkContext()->SetAcceptLanguage(
prefs->accept_languages); net::HttpUtil::ExpandLanguageList(prefs->accept_languages));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment