From e8eec84aac0dc626770a483d503f7b16ab0dbe70 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 7 Jun 2019 14:18:23 +0200 Subject: [PATCH 1/3] Fix changing should_override_user_agent_in_new_tabs_ It wouldn't be updated if the custom user-agent didn't change. Change-Id: Ic31ef485e2cb84903f9b48cb9ad5f9f1a723eb92 Reviewed-by: Michal Klocek --- chromium/content/browser/web_contents/web_contents_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc index a2659263737..4c127f835d6 100644 --- a/chromium/content/browser/web_contents/web_contents_impl.cc +++ b/chromium/content/browser/web_contents/web_contents_impl.cc @@ -1230,11 +1230,11 @@ WebUI* WebContentsImpl::GetCommittedWebUI() const { void WebContentsImpl::SetUserAgentOverride(const std::string& override, bool override_in_new_tabs) { + should_override_user_agent_in_new_tabs_ = override_in_new_tabs; + if (GetUserAgentOverride() == override) return; - should_override_user_agent_in_new_tabs_ = override_in_new_tabs; - renderer_preferences_.user_agent_override = override; // Send the new override string to the renderer. -- 2.21.0