From 794de90e20aed6c2684c8d25b3750926aa3c8051 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 1 Mar 2021 16:09:00 +0100 Subject: Fixup user-agent override for new tabs again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just short-cut it. Change-Id: Ib1ffb39496ac8d022e5426d7ce211c6e44ecf2b5 Reviewed-by: Jüri Valdmann --- chromium/content/browser/renderer_host/navigation_request.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chromium/content/browser/renderer_host/navigation_request.h') diff --git a/chromium/content/browser/renderer_host/navigation_request.h b/chromium/content/browser/renderer_host/navigation_request.h index 8463d7bd60e..4b7b5fba93d 100644 --- a/chromium/content/browser/renderer_host/navigation_request.h +++ b/chromium/content/browser/renderer_host/navigation_request.h @@ -1081,7 +1081,15 @@ class CONTENT_EXPORT NavigationRequest base::Optional EnforceCOEP(); bool IsOverridingUserAgent() const { +#ifdef TOOLKIT_QT + if (!commit_params_->is_overriding_user_agent && !entry_overrides_ua_) + LOG(WARNING) << "UserAgent override lost"; + return true; // QtWebEngine always uses profile specific user-agent, and + // Chromium is _really_ broken when it comes to tracking _if_ overrides + // should be used, but not the overrides themselves +#else return commit_params_->is_overriding_user_agent || entry_overrides_ua_; +#endif } // Returns the user-agent override, or an empty string if one isn't set. -- cgit v1.2.1