diff options
| author | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2023-02-15 09:22:08 -0300 |
|---|---|---|
| committer | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2023-02-15 09:22:08 -0300 |
| commit | 175e4dcf18bc6bfcd3b2584ad50e31aecb51d761 (patch) | |
| tree | 7392a5efa72c52a07ef2f43b12d6aad56489a919 | |
| parent | 1f28bf8185f2f2081b8e46dd7090791705eb454c (diff) | |
search-credit.patch: More aggressive user agent patching.stable-affiliate
The previous commit didn't work.
| -rw-r--r-- | build/chromium-patches/search-credit.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/build/chromium-patches/search-credit.patch b/build/chromium-patches/search-credit.patch index 9bafe9a..0276b06 100644 --- a/build/chromium-patches/search-credit.patch +++ b/build/chromium-patches/search-credit.patch @@ -70,6 +70,15 @@ Forwarded: not-needed --- a/content/common/user_agent.cc +++ b/content/common/user_agent.cc +@@ -30,7 +30,7 @@ + namespace { + + const char kFrozenUserAgentTemplate[] = +- "Mozilla/5.0 (%s) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s.0.0.0 " ++ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s.0.0.0 " + #if BUILDFLAG(IS_ANDROID) + "%s" + #endif @@ -64,7 +64,7 @@ #elif BUILDFLAG(IS_FUCHSIA) return "Fuchsia"; @@ -79,3 +88,24 @@ Forwarded: not-needed #else #error Unsupported platform #endif +@@ -295,7 +295,7 @@ + device_compat = mobile ? "Mobile " : ""; + #endif + std::string user_agent = +- base::StringPrintf(kFrozenUserAgentTemplate, GetUnifiedPlatform().c_str(), ++ base::StringPrintf(kFrozenUserAgentTemplate, + major_version.c_str() + #if BUILDFLAG(IS_ANDROID) + , +@@ -382,9 +382,9 @@ + // compatible with Safari, we hope!! + std::string user_agent; + base::StringAppendF(&user_agent, +- "Mozilla/5.0 (%s) AppleWebKit/537.36 (KHTML, like Gecko) " ++ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " + "%s Safari/537.36", +- os_info.c_str(), product.c_str()); ++ product.c_str()); + return user_agent; + } + |
