Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 55834876 authored by Carmelo Messina's avatar Carmelo Messina
Browse files

Drop patch in 144

parent cb29ab20
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
Do-not-link-with-libatomic.patch
Do-not-check-for-the-presence-of-use-remoteexec.patch
bromite-build-utils.patch
Add-cromite-flags-support.patch
Force-use-vpython3-for-some-scripts.patch
@@ -10,7 +9,6 @@ Restore-chrome-password-store.patch
Remove-EV-certificates.patch
do-not-hide-.orig-files.patch
do-not-add-suffix-to-package-name.patch
exit-on-failure-of-inclusion.patch
Move-some-account-settings-back-to-privacy-settings.patch
kill-Vision.patch
kill-Location-fall-back-to-system.patch
@@ -99,7 +97,6 @@ Block-gateway-attacks-via-websockets.patch
Enable-darken-websites-checkbox-in-themes.patch
Remove-blocklisted-URLs-upon-bookmark-creation.patch
Disable-the-DIAL-repeating-discovery.patch
Block-qjz9zk-or-trk-requests.patch
Hardening-against-incognito-mode-detection.patch
Restore-Simplified-NTP-launch.patch
Add-option-to-use-home-page-as-NTP.patch
@@ -156,7 +153,6 @@ Enable-Certificate-Transparency.patch
Invalidate-components-public-key.patch
Improve-plain-text-rendering-on-mobile.patch
Remove-segmentation-platform.patch
Follow-only-system-dark-mode.patch
Remove-window-name-on-cross-origin-navigation.patch
Remove-preload-of-com.google.android.gms.fonts.patch
Partition-Blink-memory-cache.patch
@@ -310,7 +306,6 @@ Disable-Sticky-User-Activation-Across-Same-Origin-Navigation.patch
Supporting-Dangling-Ptr-Detection-via-BackupRefPtr.patch

# temporary or wip patches
Temp-PerformanceNavigationTiming-privacy-fix.patch
Temp-disable-predictive-back-gesture.patch
TEMP-Add-a-log-to-track-strange-behavior.patch
Temp-guard-FileSystemAccessPersistentPermissions.patch
@@ -331,5 +326,4 @@ Eyeo-Adblock-for-Cromite.patch

# extension patches
Experimental-support-for-extensions-on-Android.patch
Backport-v144-android-extensions-changes.patch
Enable-extension-in-incognito.patch
+0 −954

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −277
Original line number Diff line number Diff line
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 30 Oct 2019 11:50:13 +0100
Subject: Block 'qjz9zk' or 'trk:' requests

An info bar is displayed unless the --disable-trkbar command-line flag or the chrome://flag option is used.
This patch is based on Iridium's 'net: add "trk:" scheme and help identify URLs being retrieved'

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 .../chrome_autocomplete_scheme_classifier.cc  |  1 +
 chrome/browser/history/history_utils.cc       |  1 +
 chrome/browser/ui/singleton_tabs.cc           |  5 ++++
 .../omnibox/browser/autocomplete_input.cc     |  8 ++++-
 components/url_formatter/url_fixer.cc         |  4 +++
 .../child_process_security_policy_impl.cc     |  1 +
 net/BUILD.gn                                  |  2 ++
 net/url_request/trk_protocol_handler.cc       | 25 ++++++++++++++++
 net/url_request/trk_protocol_handler.h        | 30 +++++++++++++++++++
 net/url_request/url_request.cc                |  8 +++++
 .../url_request_context_builder.cc            |  3 ++
 url/url_constants.h                           |  1 +
 url/url_util.cc                               |  2 ++
 13 files changed, 90 insertions(+), 1 deletion(-)
 create mode 100644 net/url_request/trk_protocol_handler.cc
 create mode 100644 net/url_request/trk_protocol_handler.h

diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
--- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
@@ -72,6 +72,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
   if (base::IsStringASCII(scheme) &&
       (ProfileIOData::IsHandledProtocol(scheme) ||
        base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) ||
+       base::EqualsCaseInsensitiveASCII(scheme, url::kTraceScheme) ||
        base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) ||
        base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme))) {
     return metrics::OmniboxInputType::URL;
diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/history_utils.cc
--- a/chrome/browser/history/history_utils.cc
+++ b/chrome/browser/history/history_utils.cc
@@ -22,6 +22,7 @@ bool CanAddURLToHistory(const GURL& url) {
       url.SchemeIs(content::kChromeUIScheme) ||
       url.SchemeIs(content::kChromeUIUntrustedScheme) ||
       url.SchemeIs(content::kViewSourceScheme) ||
+      url.SchemeIs(url::kTraceScheme) ||
       url.SchemeIs(chrome::kChromeNativeScheme) ||
       url.SchemeIs(chrome::kChromeSearchScheme) ||
       url.SchemeIs(dom_distiller::kDomDistillerScheme))
diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc
--- a/chrome/browser/ui/singleton_tabs.cc
+++ b/chrome/browser/ui/singleton_tabs.cc
@@ -144,6 +144,11 @@ int GetIndexOfExistingTab(BrowserWindowInterface* browser,
       continue;
     }
 
+    // trk: URLs must not be rewritten
+    if (tab_url.SchemeIs(url::kTraceScheme)) {
+      continue;
+    }
+
     GURL rewritten_tab_url = tab_url;
     content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
         &rewritten_tab_url, browser->GetProfile());
diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnibox/browser/autocomplete_input.cc
--- a/components/omnibox/browser/autocomplete_input.cc
+++ b/components/omnibox/browser/autocomplete_input.cc
@@ -92,10 +92,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) {
 bool HasScheme(const std::u16string& input, const char* scheme) {
   std::string utf8_input(base::UTF16ToUTF8(input));
   url::Component view_source_scheme;
+
+  if (url::FindAndCompareScheme(utf8_input, url::kTraceScheme, &view_source_scheme)) {
+    return false;
+  }
   if (url::FindAndCompareScheme(utf8_input, kViewSourceScheme,
                                 &view_source_scheme)) {
     utf8_input.erase(0, view_source_scheme.end() + 1);
   }
+
   return url::FindAndCompareScheme(utf8_input, scheme, nullptr);
 }
 
@@ -580,7 +585,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
   // For the view-source and blob schemes, we should emphasize the host of the
   // URL qualified by the view-source or blob prefix.
   if ((base::EqualsCaseInsensitiveASCII(scheme_str, kViewSourceScheme) ||
-       base::EqualsCaseInsensitiveASCII(scheme_str, url::kBlobScheme)) &&
+       base::EqualsCaseInsensitiveASCII(scheme_str, url::kBlobScheme) ||
+       base::EqualsCaseInsensitiveASCII(scheme_str, url::kTraceScheme)) &&
       (static_cast<int>(text.length()) > after_scheme_and_colon)) {
     // Obtain the URL prefixed by view-source or blob and parse it.
     std::u16string real_url(text.substr(after_scheme_and_colon));
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc
--- a/components/url_formatter/url_fixer.cc
+++ b/components/url_formatter/url_fixer.cc
@@ -598,6 +598,10 @@ GURL FixupURLInternal(const std::string& text,
     }
   }
 
+  if (scheme == url::kTraceScheme) {
+    return GURL();
+  }
+
   // We handle the file scheme separately.
   if (scheme == url::kFileScheme) {
     return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -969,6 +969,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl()
   RegisterPseudoScheme(url::kJavaScriptScheme);
   RegisterPseudoScheme(kViewSourceScheme);
   RegisterPseudoScheme(kGoogleChromeScheme);
+  RegisterWebSafeScheme(url::kTraceScheme);
 }
 
 ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() = default;
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1147,6 +1147,8 @@ component("net") {
     "url_request/url_request_http_job.cc",
     "url_request/url_request_http_job.h",
     "url_request/url_request_interceptor.cc",
+    "url_request/trk_protocol_handler.cc",
+    "url_request/trk_protocol_handler.h",
     "url_request/url_request_interceptor.h",
     "url_request/url_request_job.cc",
     "url_request/url_request_job.h",
diff --git a/net/url_request/trk_protocol_handler.cc b/net/url_request/trk_protocol_handler.cc
new file mode 100644
--- /dev/null
+++ b/net/url_request/trk_protocol_handler.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/url_request/trk_protocol_handler.h"
+
+#include "base/logging.h"
+#include "net/base/net_errors.h"
+#include "net/url_request/url_request_error_job.h"
+
+namespace net {
+
+TrkProtocolHandler::TrkProtocolHandler() = default;
+
+std::unique_ptr<URLRequestJob> TrkProtocolHandler::CreateJob(
+    URLRequest* request) const {
+  LOG(ERROR) << "Blocked URL in TrkProtocolHandler: " << request->original_url();
+  return std::make_unique<URLRequestErrorJob>(request, ERR_BLOCKED_BY_CLIENT);
+}
+
+bool TrkProtocolHandler::IsSafeRedirectTarget(const GURL& location) const {
+  return true;
+}
+
+}  // namespace net
diff --git a/net/url_request/trk_protocol_handler.h b/net/url_request/trk_protocol_handler.h
new file mode 100644
--- /dev/null
+++ b/net/url_request/trk_protocol_handler.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_
+#define NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_
+
+#include "base/compiler_specific.h"
+#include "net/base/net_export.h"
+#include "net/url_request/url_request_job_factory.h"
+
+namespace net {
+
+class URLRequestJob;
+
+// Implements a ProtocolHandler for Trk jobs.
+class NET_EXPORT TrkProtocolHandler
+    : public URLRequestJobFactory::ProtocolHandler {
+ public:
+  TrkProtocolHandler(const TrkProtocolHandler&) = delete;
+  TrkProtocolHandler& operator=(const TrkProtocolHandler&) = delete;
+
+  TrkProtocolHandler();
+  std::unique_ptr<URLRequestJob> CreateJob(URLRequest* request) const override;
+  bool IsSafeRedirectTarget(const GURL& location) const override;
+};
+
+}  // namespace net
+
+#endif  // NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -15,6 +15,7 @@
 #include "base/notreached.h"
 #include "base/rand_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/strings/string_util.h"
 #include "base/synchronization/lock.h"
 #include "base/task/single_thread_task_runner.h"
 #include "base/types/optional_util.h"
@@ -55,6 +56,7 @@
 #include "net/url_request/url_request_redirect_job.h"
 #include "url/gurl.h"
 #include "url/origin.h"
+#include "url/url_constants.h"
 
 namespace net {
 
@@ -650,6 +652,12 @@ URLRequest::URLRequest(base::PassKey<URLRequestContext> pass_key,
   // Sanity check out environment.
   DCHECK(base::SingleThreadTaskRunner::HasCurrentDefault());
 
+  if (!url.SchemeIs(url::kTraceScheme) &&
+      base::EndsWith(url.host(), "qjz9zk", base::CompareCase::INSENSITIVE_ASCII)) {
+    LOG(ERROR) << "Block URL in URLRequest: " << url;
+    url_chain_[0] = GURL(url::kTraceScheme + (":" + url.possibly_invalid_spec()));
+  }
+
   context->url_requests()->insert(this);
   net_log_.BeginEvent(NetLogEventType::REQUEST_ALIVE,
                       [&](NetLogCaptureMode capture_mode) {
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -55,6 +55,7 @@
 #include "net/socket/network_binding_client_socket_factory.h"
 #include "net/ssl/ssl_config_service_defaults.h"
 #include "net/url_request/static_http_user_agent_settings.h"
+#include "net/url_request/trk_protocol_handler.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_job_factory.h"
 #include "url/url_constants.h"
@@ -619,6 +620,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
     job_factory->SetProtocolHandler(scheme_handler.first,
                                     std::move(scheme_handler.second));
   }
+  job_factory->SetProtocolHandler(url::kTraceScheme,
+                                  std::make_unique<TrkProtocolHandler>());
   protocol_handlers_.clear();
 
   context->set_job_factory(std::move(job_factory));
diff --git a/url/url_constants.h b/url/url_constants.h
--- a/url/url_constants.h
+++ b/url/url_constants.h
@@ -34,6 +34,7 @@ inline constexpr char16_t kDataScheme16[] = u"data";
 inline constexpr char kDrivefsScheme[] = "drivefs";
 inline constexpr char kFileScheme[] = "file";
 inline constexpr char16_t kFileScheme16[] = u"file";
+inline constexpr char kTraceScheme[] = "trk";
 inline constexpr char kFileSystemScheme[] = "filesystem";
 inline constexpr char16_t kFileSystemScheme16[] = u"filesystem";
 inline constexpr char kFtpScheme[] = "ftp";
diff --git a/url/url_util.cc b/url/url_util.cc
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -54,6 +54,7 @@ struct SchemeRegistry {
   std::vector<SchemeWithType> standard_schemes = {
       {kHttpsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
       {kHttpScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
+      {kTraceScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
       // Yes, file URLs can have a hostname, so file URLs should be handled as
       // "standard". File URLs never have a port as specified by the SchemeType
       // field.  Unlike other SCHEME_WITH_HOST schemes, the 'host' in a file
@@ -99,6 +100,7 @@ struct SchemeRegistry {
       kAboutScheme,
       kJavaScriptScheme,
       kDataScheme,
+      kTraceScheme,
   };
 
   // Schemes that can be sent CORS requests.
--
+0 −18
Original line number Diff line number Diff line
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 3 Mar 2025 12:04:53 +0000
Subject: Do not check for the presence of use_remoteexec

---
 build/toolchain/remoteexec_defaults.gni | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/toolchain/remoteexec_defaults.gni b/build/toolchain/remoteexec_defaults.gni
--- a/build/toolchain/remoteexec_defaults.gni
+++ b/build/toolchain/remoteexec_defaults.gni
@@ -1,4 +1,4 @@
 # rbe.gni and autoninja.py will read this file to get the default
 # value of use_reclient.
 use_reclient_on_siso = false
-use_reclient_on_ninja = true
+use_reclient_on_ninja = false
--
+0 −24
Original line number Diff line number Diff line
From: krlvm <51774833+krlvm@users.noreply.github.com>
Date: Mon, 4 Jul 2022 16:14:37 +0300
Subject: Follow only system dark mode

Follow only system dark mode preference when theme is set to system default

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 .../browser/night_mode/GlobalNightModeStateController.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
--- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
+++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
@@ -128,7 +128,7 @@ class GlobalNightModeStateController
     }
 
     private void updateNightMode() {
-        boolean powerSaveModeOn = mPowerSaveModeMonitor.powerSavingIsOn();
+        boolean powerSaveModeOn = false;
         final int theme = NightModeUtils.getThemeSetting();
         final boolean newNightModeOn =
                 (theme == ThemeType.SYSTEM_DEFAULT
--
Loading