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

Commit 7a3d26df authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Browser: Adapt patches for upstream changes

parent c6a371a9
Loading
Loading
Loading
Loading
Loading

bromite @ 5b6a7442

Original line number Diff line number Diff line
Subproject commit fb5839d5ebb91408fcea203a3d9dca98074d088e
Subproject commit 5b6a7442e0c41d682efd0670755240f08563225a
+5 −5
Original line number Diff line number Diff line
From 0378fc8c8bbb272aae00228baa5ab5a1b0a251cc Mon Sep 17 00:00:00 2001
From 013fbab37c4c5288cf0163bb3f88de0a58e06211 Mon Sep 17 00:00:00 2001
From: Aayush Gupta <theimpulson@e.email>
Date: Fri, 26 Nov 2021 08:03:13 +0000
Subject: [PATCH] Browser: Add provider to share default search engine
@@ -12,11 +12,11 @@ Signed-off-by: Aayush Gupta <theimpulson@e.email>
 create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/provider/SearchEngineProvider.java

diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 0a551fa3a9355..970b3c15b3032 100644
index e2cf845e088ff..fdea2d7c83b21 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -1291,6 +1291,12 @@ by a child template that "extends" this file.
           tools:ignore="ExportedContentProvider">
@@ -1276,6 +1276,12 @@ by a child template that "extends" this file.
                   android:readPermission="android.permission.GLOBAL_SEARCH" />
       </provider>
 
+      <!-- Provider for search engine data. -->
@@ -114,7 +114,7 @@ index 0000000000000..299562413fe05
+    }
+}
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index bfb9dcf529f47..89c23938b600d 100644
index c4e4b7360ecd2..697a0e4ef4ad3 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -62,3 +62,4 @@ if (enable_arcore) {
+9 −9
Original line number Diff line number Diff line
From dcc6519ff3ee725852c328ba9e4eccfdd5b09a46 Mon Sep 17 00:00:00 2001
From 53a12891438279dd934039596fdc4c6e43632f17 Mon Sep 17 00:00:00 2001
From: Aayush Gupta <aayushgupta219@gmail.com>
Date: Mon, 29 Nov 2021 03:54:44 +0000
Subject: [PATCH] Browser: Hide and disable touch to search option
@@ -10,10 +10,10 @@ Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
index e97fc3ceb1a1d..c7d994cdf2186 100644
index 881077bbeb57c..6c0775a58c758 100644
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -87,7 +87,8 @@
@@ -92,7 +92,8 @@
       <org.chromium.components.browser_ui.settings.ChromeBasePreference
           android:key="contextual_search"
           android:title="@string/contextual_search_title"
@@ -24,20 +24,20 @@ index e97fc3ceb1a1d..c7d994cdf2186 100644
 
 </PreferenceScreen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPreferenceFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPreferenceFragment.java
index cbf437162aa4e..88d12b734fa71 100644
index 27f7461a76ad7..58c41debb8450 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPreferenceFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPreferenceFragment.java
@@ -39,8 +39,9 @@ public class ContextualSearchPreferenceFragment extends PreferenceFragmentCompat
         ChromeSwitchPreference contextualSearchSwitch =
                 (ChromeSwitchPreference) findPreference(PREF_CONTEXTUAL_SEARCH_SWITCH);
@@ -44,8 +44,9 @@ public class ContextualSearchPreferenceFragment extends PreferenceFragmentCompat
         ChromeSwitchPreference seeBetterResultsSwitch =
                 (ChromeSwitchPreference) findPreference(PREF_WAS_FULLY_ENABLED_SWITCH);
 
-        boolean isContextualSearchEnabled = !ContextualSearchManager.isContextualSearchDisabled();
-        boolean isContextualSearchEnabled = !ContextualSearchPolicy.isContextualSearchDisabled();
+        boolean isContextualSearchEnabled = false;
         contextualSearchSwitch.setChecked(isContextualSearchEnabled);
+        contextualSearchSwitch.setEnabled(isContextualSearchEnabled);
 
         contextualSearchSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
             ContextualSearchManager.setContextualSearchState((boolean) newValue);
             ContextualSearchPolicy.setContextualSearchState((boolean) newValue);
-- 
2.25.1
+1095 −35

File changed.

Preview size limit exceeded, changes collapsed.

+40 −40
Original line number Diff line number Diff line
From dec0eb143230075aa835bfc57b60938882311584 Mon Sep 17 00:00:00 2001
From 92185208470f80390753e0baec20e58fa5e3adcf Mon Sep 17 00:00:00 2001
From: Aayush Gupta <theimpulson@e.email>
Date: Fri, 3 Dec 2021 11:36:39 +0000
Date: Tue, 7 Dec 2021 05:13:23 +0000
Subject: [PATCH] Revert "Bromite auto updater"

This reverts commit 91c238db7f7d764f8866dc19490d7ee2c54636a0.
This reverts commit a81c84422e68eb99c27aa840bdb5c746622315c2.
---
 .../java/templates/BuildConfig.template       |   2 -
 build/config/android/rules.gni                |   3 -
@@ -41,10 +41,10 @@ index 68b023ab9e010..8953ad5ca1775 100644
-    public static MAYBE_FINAL String BUILD_TARGET_CPU = _BUILD_TARGET_CPU;
 }
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 33bdafd09ef6a..3372f4908de28 100644
index 255787694882a..4d0e9c4bf9058 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1967,9 +1967,6 @@ if (enable_java_templates) {
@@ -1970,9 +1970,6 @@ if (enable_java_templates) {
           ]
         }
       }
@@ -55,10 +55,10 @@ index 33bdafd09ef6a..3372f4908de28 100644
   }
 
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
index 7420effacf5b7..bbe6bc7097557 100644
index abcb8f93ad4bb..2e60f21e89cad 100644
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -887,7 +887,6 @@ chrome_java_sources = [
@@ -892,7 +892,6 @@ chrome_java_sources = [
   "java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java",
   "java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java",
   "java/src/org/chromium/chrome/browser/omaha/inline/NoopInlineUpdateController.java",
@@ -304,10 +304,10 @@ index ab14ab63f26d4..4ae16623548a0 100644
 
             return status;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
index 40b05688c17a1..2b342b05a0c44 100644
index 425b7fe17a863..6d21fb304fdd7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
@@ -43,8 +43,7 @@ public class VersionNumberGetter {
@@ -42,8 +42,7 @@ public class VersionNumberGetter {
     private static VersionNumberGetter sInstanceForTests;
 
     /** If false, OmahaClient will never report that a newer version is available. */
@@ -546,10 +546,10 @@ index 8216247669b02..70248ff38c85c 100644
     }
 }
diff --git a/chrome/browser/endpoint_fetcher/BUILD.gn b/chrome/browser/endpoint_fetcher/BUILD.gn
index e398662f6e844..0cb315027454a 100644
index e7cd627fedc49..2cb20bb91397c 100644
--- a/chrome/browser/endpoint_fetcher/BUILD.gn
+++ b/chrome/browser/endpoint_fetcher/BUILD.gn
@@ -14,7 +14,6 @@ android_library("java") {
@@ -15,7 +15,6 @@ android_library("java") {
   sources = [
     "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java",
     "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointResponse.java",
@@ -557,7 +557,7 @@ index e398662f6e844..0cb315027454a 100644
   ]
   annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
 }
@@ -23,6 +22,5 @@ generate_jni("jni_headers") {
@@ -24,6 +23,5 @@ generate_jni("jni_headers") {
   sources = [
     "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java",
     "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointResponse.java",
@@ -565,7 +565,7 @@ index e398662f6e844..0cb315027454a 100644
   ]
 }
diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
index 34722bec17b6d..c59a274c6818e 100644
index 7f400ae7d5ca3..baa4e7fbb1c0c 100644
--- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
@@ -26,15 +26,10 @@
@@ -584,7 +584,7 @@ index 34722bec17b6d..c59a274c6818e 100644
 namespace {
 const char kContentTypeKey[] = "Content-Type";
 const char kDeveloperKey[] = "X-Developer-Key";
@@ -156,19 +151,6 @@ EndpointFetcher::EndpointFetcher(
@@ -160,19 +155,6 @@ EndpointFetcher::EndpointFetcher(
       identity_manager_(nullptr),
       sanitize_response_(true) {}
 
@@ -604,8 +604,8 @@ index 34722bec17b6d..c59a274c6818e 100644
 EndpointFetcher::~EndpointFetcher() = default;
 
 void EndpointFetcher::Fetch(EndpointFetcherCallback endpoint_fetcher_callback) {
@@ -298,77 +280,6 @@ void EndpointFetcher::OnSanitizationResult(
   std::move(endpoint_fetcher_callback).Run(std::move(response));
@@ -310,77 +292,6 @@ std::string EndpointFetcher::GetUrlForTesting() {
   return url_.spec();
 }
 
-void EndpointFetcher::PerformHeadRequest(
@@ -682,7 +682,7 @@ index 34722bec17b6d..c59a274c6818e 100644
 #if defined(OS_ANDROID)
 namespace {
 static void OnEndpointFetcherComplete(
@@ -385,25 +296,6 @@ static void OnEndpointFetcherComplete(
@@ -397,25 +308,6 @@ static void OnEndpointFetcherComplete(
                        base::android::AttachCurrentThread(),
                        std::move(endpoint_response->response))));
 }
@@ -708,7 +708,7 @@ index 34722bec17b6d..c59a274c6818e 100644
 }  // namespace
 
 // TODO(crbug.com/1077537) Create a KeyProvider so
@@ -489,25 +381,4 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
@@ -505,25 +397,4 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
       nullptr);
 }
 
@@ -735,7 +735,7 @@ index 34722bec17b6d..c59a274c6818e 100644
-
 #endif  // defined(OS_ANDROID)
diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
index 61bfd30116efc..ecf0f3cc84e6d 100644
index 3d6e3eac74cfe..495809463ede9 100644
--- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
@@ -14,8 +14,6 @@
@@ -769,9 +769,9 @@ index 61bfd30116efc..ecf0f3cc84e6d 100644
   // Used for tests. Can be used if caller constructs their own
   // url_loader_factory and identity_manager.
   EndpointFetcher(
@@ -123,10 +113,6 @@ class EndpointFetcher {
   virtual void PerformRequest(EndpointFetcherCallback endpoint_fetcher_callback,
                               const char* key);
@@ -127,10 +117,6 @@ class EndpointFetcher {
 
   std::string GetUrlForTesting();
 
-  virtual void PerformHeadRequest(EndpointFetcherCallback endpoint_fetcher_callback,
-                                  const char* key,
@@ -780,7 +780,7 @@ index 61bfd30116efc..ecf0f3cc84e6d 100644
  protected:
   // Used for Mock only. see MockEndpointFetcher class.
   explicit EndpointFetcher(
@@ -140,10 +126,6 @@ class EndpointFetcher {
@@ -144,10 +130,6 @@ class EndpointFetcher {
                          std::unique_ptr<std::string> response_body);
   void OnSanitizationResult(EndpointFetcherCallback endpoint_fetcher_callback,
                             data_decoder::JsonSanitizer::Result result);
@@ -791,7 +791,7 @@ index 61bfd30116efc..ecf0f3cc84e6d 100644
 
   enum AuthType { CHROME_API_KEY, OAUTH, NO_AUTH };
   AuthType auth_type_;
@@ -151,7 +133,7 @@ class EndpointFetcher {
@@ -155,7 +137,7 @@ class EndpointFetcher {
   // Members set in constructor to be passed to network::ResourceRequest or
   // network::SimpleURLLoader.
   const std::string oauth_consumer_name_;
@@ -800,7 +800,7 @@ index 61bfd30116efc..ecf0f3cc84e6d 100644
   const std::string http_method_;
   const std::string content_type_;
   int64_t timeout_ms_;
@@ -170,9 +152,6 @@ class EndpointFetcher {
@@ -175,9 +157,6 @@ class EndpointFetcher {
       access_token_fetcher_;
   std::unique_ptr<network::SimpleURLLoader> simple_url_loader_;
 
@@ -811,11 +811,11 @@ index 61bfd30116efc..ecf0f3cc84e6d 100644
 };
 
diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
index 9861bd04d92c9..59245c4110e6d 100644
index 48bd1e70c4b9e..120a06cf8e799 100644
--- a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
+++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
@@ -68,14 +68,6 @@ public final class EndpointFetcher {
                 profile, url, httpsMethod, contentType, postData, timeout, headers, callback);
@@ -70,14 +70,6 @@ public final class EndpointFetcher {
                 postData, timeout, headers, annotation.getHashCode(), callback);
     }
 
-    @MainThread
@@ -829,10 +829,10 @@ index 9861bd04d92c9..59245c4110e6d 100644
     @NativeMethods
     public interface Natives {
         void nativeFetchOAuth(Profile profile, String oathConsumerName, String url,
@@ -86,8 +78,5 @@ public final class EndpointFetcher {
@@ -88,8 +80,5 @@ public final class EndpointFetcher {
                 int annotationHashCode, Callback<EndpointResponse> callback);
         void nativeFetchWithNoAuth(Profile profile, String url, int annotationHashCode,
                 Callback<EndpointResponse> callback);
         void nativeFetchWithNoAuth(
                 Profile profile, String url, Callback<EndpointResponse> callback);
-        void nativeHeadWithNoAuth(
-                Profile profile, String url, long timeout, boolean allow_redirect,
-                Callback<EndpointHeaderResponse> callback);
@@ -876,10 +876,10 @@ index a7bd35381ccd1..0000000000000
-    }
-}
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 2529ee68dd078..6e1587ebad70b 100644
index e1cfd9a529a6a..2afebf9db9118 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2037,7 +2037,7 @@
@@ -2079,7 +2079,7 @@
   {
     "name": "enable-inline-update-flow",
     "owners": [ "nyquist", "dtrainor" ],
@@ -889,10 +889,10 @@ index 2529ee68dd078..6e1587ebad70b 100644
   {
     "name": "enable-input-event-logging",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 0e6516722b74d..79882d166078e 100644
index 2e900680297d3..63b142461f7a5 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3588,9 +3588,10 @@ const char kVoiceButtonInTopToolbarDescription[] =
@@ -3697,9 +3697,10 @@ const char kVoiceButtonInTopToolbarDescription[] =
     "Enables showing the voice search button in the top toolbar. Enabling "
     "Adaptive Button overrides this.";
 
@@ -906,10 +906,10 @@ index 0e6516722b74d..79882d166078e 100644
     "to install.";
 
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
index 01156d53fcb84..158b97c16ca5c 100644
index a9e56ffb43d5e..4d88f3e5858af 100644
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -627,7 +627,7 @@ const base::Feature kIncognitoScreenshot{"IncognitoScreenshot",
@@ -644,7 +644,7 @@ const base::Feature kIncognitoScreenshot{"IncognitoScreenshot",
                                          base::FEATURE_DISABLED_BY_DEFAULT};
 
 const base::Feature kInlineUpdateFlow{"InlineUpdateFlow",
@@ -919,10 +919,10 @@ index 01156d53fcb84..158b97c16ca5c 100644
 const base::Feature kInstantStart{"InstantStart",
                                   base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
index 2ee17e8976b2a..bec8f70580640 100644
index 9408db809dd0e..2677e221c174c 100644
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1668,12 +1668,6 @@ Your Google account may have other forms of browsing history like searches and a
@@ -1712,12 +1712,6 @@ Your Google account may have other forms of browsing history like searches and a
       <message name="IDS_DEPRECATION_WARNING" desc="Warning about Chrome updates no longer being supported">
         Chrome updates are no longer supported for this version of Android
       </message>
@@ -935,7 +935,7 @@ index 2ee17e8976b2a..bec8f70580640 100644
 
       <!-- Account management UI strings. -->
       <message name="IDS_ACCOUNT_MANAGEMENT_TITLE" desc="Header title for the account management screen. [CHAR_LIMIT=32]">
@@ -3161,7 +3155,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
@@ -3234,7 +3228,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
 
       <!-- Main menu items -->
       <message name="IDS_MENU_UPDATE" desc="Menu item for updating chrome. [CHAR_LIMIT=24]">