Patches for v129 - final version (#1458)
This commit is contained in:
@@ -31,7 +31,6 @@ use_sysroot=false
|
||||
webview_includes_weblayer=false
|
||||
enable_arcore=false
|
||||
enable_openxr=false
|
||||
enable_feed_v2=false
|
||||
enable_cardboard=false
|
||||
is_high_end_android=true
|
||||
|
||||
|
||||
@@ -1080,7 +1080,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+const std::string BookmarkBridge::FileSelectedImpl(const base::FilePath& path) {
|
||||
+ base::File file;
|
||||
+ if (path.IsContentUri()) {
|
||||
+ file = base::OpenContentUriForRead(path);
|
||||
+ file = base::OpenContentUri(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
+ } else {
|
||||
+ file.Initialize(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
+ }
|
||||
|
||||
@@ -606,8 +606,8 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per
|
||||
+ TextView lifetimeOptionsText = new TextView(context);
|
||||
+ lifetimeOptionsText.setText(context.getString(
|
||||
+ org.chromium.components.permissions.R.string.session_permissions_title));
|
||||
+ ApiCompatibilityUtils.setTextAppearance(
|
||||
+ lifetimeOptionsText, R.style.TextAppearance_TextMedium_Primary);
|
||||
+ lifetimeOptionsText.setTextAppearance(
|
||||
+ lifetimeOptionsText.getContext(), R.style.TextAppearance_TextMedium_Primary);
|
||||
+
|
||||
+ LinearLayout.LayoutParams lifetimeOptionsTextLayoutParams =
|
||||
+ new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
|
||||
@@ -54,7 +54,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -2724,6 +2724,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -2720,6 +2720,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
return doOpenWebApk(currentTab);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -313,6 +313,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
@@ -312,6 +312,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&kTabGroupCreationDialogAndroid,
|
||||
&kTabGroupParityAndroid,
|
||||
&kTabletTabSwitcherLongPressMenu,
|
||||
@@ -541,7 +541,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t
|
||||
+ if (!do_not_show_context_menu &&
|
||||
+ base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
|
||||
+ if (auto* anchor_element = DynamicTo<HTMLAnchorElement>(result.URLElement())) {
|
||||
+ MouseEvent event;
|
||||
+ MouseEvent& event = *MouseEvent::Create();
|
||||
+ event.SetTarget(mouse_event->target());
|
||||
+ anchor_element->HandleClick(event, /*do_not_show_context_menu*/true);
|
||||
+ return true;
|
||||
|
||||
@@ -6,8 +6,8 @@ Allow documentPiP api use only with content setting popup allowed
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../picture_in_picture_controller_impl.cc | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
.../picture_in_picture_controller_impl.cc | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc
|
||||
--- a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc
|
||||
@@ -20,14 +20,13 @@ diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/pict
|
||||
#include "third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_event.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
@@ -377,6 +378,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow(
|
||||
@@ -377,6 +378,12 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow(
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!opener.GetFrame()->Loader().GetDocumentLoader()->GetContentSettings()->allow_popup) {
|
||||
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotAllowedError,
|
||||
+ "Document PiP requires user popup permission");
|
||||
+ resolver->Reject(exception_state);
|
||||
+ resolver->RejectWithDOMException(DOMExceptionCode::kNotAllowedError,
|
||||
+ "Document PiP requires user popup permission");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -33,7 +33,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../flags/android/adblock_native_gateway.cc | 31 ++
|
||||
.../browser/flags/AdBlockNativeGateway.java | 30 ++
|
||||
.../net/system_network_context_manager.cc | 4 +
|
||||
.../sessions/session_restore_android.cc | 6 +-
|
||||
.../sessions/session_restore_android.cc | 7 +-
|
||||
.../strings/android_chrome_strings.grd | 14 +
|
||||
chrome/common/pref_names.h | 5 +
|
||||
.../strings/android/site_settings.grdp | 3 +
|
||||
@@ -51,8 +51,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/subresource_filter_features.cc | 116 +-------
|
||||
.../core/browser/verified_ruleset_dealer.cc | 4 +
|
||||
.../core/common/indexed_ruleset.cc | 5 +-
|
||||
.../Bromite-subresource-adblocker.inc | 3 +
|
||||
40 files changed, 1256 insertions(+), 129 deletions(-)
|
||||
39 files changed, 1254 insertions(+), 129 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/adblock_editor.xml
|
||||
create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
@@ -63,7 +62,6 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
create mode 100644 components/component_updater/adblock_updater_service.h
|
||||
create mode 100644 components/component_updater/download_filters_task.cc
|
||||
create mode 100644 components/component_updater/download_filters_task.h
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
@@ -688,14 +686,15 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
|
||||
diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser/sessions/session_restore_android.cc
|
||||
--- a/chrome/browser/sessions/session_restore_android.cc
|
||||
+++ b/chrome/browser/sessions/session_restore_android.cc
|
||||
@@ -57,8 +57,10 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab(
|
||||
@@ -57,8 +57,11 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab(
|
||||
DCHECK(current_tab);
|
||||
// If swapped, return the current tab's most up-to-date web contents.
|
||||
if (disposition == WindowOpenDisposition::CURRENT_TAB) {
|
||||
- current_tab->SwapWebContents(std::move(new_web_contents), false, false);
|
||||
- return current_tab->web_contents();
|
||||
+ int active_tab_index = tab_model->GetActiveIndex();
|
||||
+ tab_model->CreateTab(current_tab, new_web_contents.release());
|
||||
+ tab_model->CreateTab(current_tab, new_web_contents.release(),
|
||||
+ disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB);
|
||||
+ tab_model->CloseTabAt(active_tab_index);
|
||||
+ return raw_new_web_contents;
|
||||
}
|
||||
@@ -1986,12 +1985,4 @@ diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/comp
|
||||
return flat::VerifyIndexedRulesetBuffer(verifier)
|
||||
? VerifyStatus::kChecksumFailVerifierPass
|
||||
: VerifyStatus::kChecksumFailVerifierFail;
|
||||
diff --git a/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/third_party/blink/common/features_cc/Bromite-subresource-adblocker.inc
|
||||
@@ -0,0 +1,3 @@
|
||||
+SET_CROMITE_FEATURE_ENABLED(kAutomaticLazyFrameLoadingToAds);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbeds);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbedUrls);
|
||||
--
|
||||
|
||||
@@ -157,7 +157,7 @@ diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party
|
||||
#include "base/strings/string_util.h"
|
||||
#include "services/network/public/cpp/client_hints.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
+#include "third_party/blink/public/common/features_generated.h"
|
||||
#include "third_party/blink/public/common/permissions_policy/permissions_policy.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
@@ -170,7 +170,7 @@ diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party
|
||||
case network::mojom::WebClientHintsType::kUAMobile:
|
||||
case network::mojom::WebClientHintsType::kUAPlatform:
|
||||
- return true;
|
||||
+ return RuntimeEnabledFeatures::UserAgentClientHintEnabled();
|
||||
+ return base::FeatureList::IsEnabled(blink::features::kUserAgentClientHint);
|
||||
+ case network::mojom::WebClientHintsType::kSaveData:
|
||||
+ return false;
|
||||
default:
|
||||
|
||||
@@ -64,7 +64,7 @@ Require: bromite-build-utils.patch
|
||||
.../core/browser/website_settings_info.h | 38 ++
|
||||
.../core/browser/website_settings_registry.cc | 6 +
|
||||
.../core/browser/website_settings_registry.h | 1 +
|
||||
.../content_settings/core/common/BUILD.gn | 7 +
|
||||
.../content_settings/core/common/BUILD.gn | 8 +
|
||||
.../bromite_content_settings/placeholder.txt | 1 +
|
||||
.../core/common/content_settings.cc | 30 +-
|
||||
.../core/common/content_settings.h | 12 +
|
||||
@@ -83,7 +83,7 @@ Require: bromite-build-utils.patch
|
||||
.../platform/web_content_settings_client.h | 9 +
|
||||
.../execution_context/execution_context.cc | 16 +
|
||||
.../execution_context/execution_context.h | 5 +
|
||||
72 files changed, 1867 insertions(+), 95 deletions(-)
|
||||
72 files changed, 1868 insertions(+), 95 deletions(-)
|
||||
create mode 100644 components/browser_ui/settings/android/java/res/layout/preference_spinner_single_widget.xml
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
@@ -1092,9 +1092,9 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/ch
|
||||
#include "ui/views/view.h"
|
||||
|
||||
+#include "components/content_settings/core/browser/website_settings_registry.h"
|
||||
+#include "chrome/browser/ui/views/controls/md_text_button_with_down_arrow.h"
|
||||
+#include "ui/base/models/simple_menu_model.h"
|
||||
+#include "ui/views/controls/menu/menu_runner.h"
|
||||
+#include "ui/views/controls/button/md_text_button_with_down_arrow.h"
|
||||
+
|
||||
class ChromePageInfoUiDelegate;
|
||||
class PageInfoNavigationHandler;
|
||||
@@ -2938,6 +2938,14 @@ diff --git a/components/content_settings/core/common/BUILD.gn b/components/conte
|
||||
}
|
||||
|
||||
source_set("unit_tests") {
|
||||
@@ -90,6 +97,7 @@ mojom("content_settings_types") {
|
||||
sources = [ "content_settings_types.mojom" ]
|
||||
|
||||
public_deps = [ "//mojo/public/mojom/base" ]
|
||||
+ parser_deps = [ ":bromite_content_settings" ]
|
||||
|
||||
webui_module_path = "/"
|
||||
generate_legacy_js_bindings = true
|
||||
diff --git a/components/content_settings/core/common/bromite_content_settings/placeholder.txt b/components/content_settings/core/common/bromite_content_settings/placeholder.txt
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
||||
@@ -4,9 +4,28 @@ Subject: Disable Feeback Collector
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
chrome/browser/feedback/BUILD.gn | 8 +++---
|
||||
.../browser/feedback/FeedbackCollector.java | 28 ++-----------------
|
||||
1 file changed, 3 insertions(+), 25 deletions(-)
|
||||
2 files changed, 7 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/feedback/BUILD.gn b/chrome/browser/feedback/BUILD.gn
|
||||
--- a/chrome/browser/feedback/BUILD.gn
|
||||
+++ b/chrome/browser/feedback/BUILD.gn
|
||||
@@ -15,10 +15,10 @@ source_set("feedback") {
|
||||
public_deps = []
|
||||
deps = []
|
||||
if (is_android) {
|
||||
- sources += [
|
||||
- "android/family_info_feedback_source.cc",
|
||||
- "android/family_info_feedback_source.h",
|
||||
- ]
|
||||
+ # sources += [
|
||||
+ # "android/family_info_feedback_source.cc",
|
||||
+ # "android/family_info_feedback_source.h",
|
||||
+ # ]
|
||||
public_deps += [
|
||||
"//components/supervised_user/core/browser",
|
||||
"//components/supervised_user/core/browser:fetcher",
|
||||
diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java
|
||||
--- a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java
|
||||
+++ b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java
|
||||
|
||||
@@ -4,100 +4,70 @@ Subject: Disable feeds support by default
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/browser/feed/android/web_feed_bridge.cc | 18 ++++++++++++++++++
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
||||
.../feed/core/shared_prefs/pref_names.cc | 2 +-
|
||||
components/feed/feed_feature_list.cc | 3 +++
|
||||
4 files changed, 23 insertions(+), 2 deletions(-)
|
||||
.../browser/feed/android/web_feed_bridge.cc | 28 +++----------------
|
||||
.../feed/core/shared_prefs/pref_names.cc | 2 +-
|
||||
components/feed/feed_feature_list.cc | 3 ++
|
||||
3 files changed, 8 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/feed/android/web_feed_bridge.cc b/chrome/browser/feed/android/web_feed_bridge.cc
|
||||
--- a/chrome/browser/feed/android/web_feed_bridge.cc
|
||||
+++ b/chrome/browser/feed/android/web_feed_bridge.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "components/country_codes/country_codes.h"
|
||||
+#include "components/feed/buildflags.h"
|
||||
#include "components/feed/core/v2/config.h"
|
||||
#include "components/feed/core/v2/public/feed_service.h"
|
||||
#include "components/feed/core/v2/public/types.h"
|
||||
@@ -81,10 +82,14 @@ base::android::ScopedJavaLocalRef<jbyteArray> ToJavaWebFeedId(
|
||||
@@ -81,10 +81,7 @@ base::android::ScopedJavaLocalRef<jbyteArray> ToJavaWebFeedId(
|
||||
}
|
||||
|
||||
WebFeedSubscriptions* GetSubscriptions() {
|
||||
+#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
Profile* profile = ProfileManager::GetLastUsedProfile();
|
||||
if (!profile)
|
||||
return nullptr;
|
||||
return GetSubscriptionsForProfile(profile);
|
||||
+#else
|
||||
- Profile* profile = ProfileManager::GetLastUsedProfile();
|
||||
- if (!profile)
|
||||
- return nullptr;
|
||||
- return GetSubscriptionsForProfile(profile);
|
||||
+ return nullptr;
|
||||
+#endif
|
||||
}
|
||||
|
||||
FeedApi* GetStream() {
|
||||
@@ -220,10 +225,14 @@ static void JNI_WebFeedBridge_FollowWebFeed(
|
||||
@@ -220,10 +217,7 @@ static void JNI_WebFeedBridge_FollowWebFeed(
|
||||
return;
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
FollowWebFeed(
|
||||
page_info.web_contents,
|
||||
static_cast<feedwire::webfeed::WebFeedChangeReason>(change_reason),
|
||||
std::move(callback));
|
||||
+#else
|
||||
- FollowWebFeed(
|
||||
- page_info.web_contents,
|
||||
- static_cast<feedwire::webfeed::WebFeedChangeReason>(change_reason),
|
||||
- std::move(callback));
|
||||
+ std::move(callback).Run({});
|
||||
+#endif
|
||||
}
|
||||
|
||||
static jboolean JNI_WebFeedBridge_IsCormorantEnabledForLocale(JNIEnv* env) {
|
||||
@@ -264,11 +273,16 @@ static void JNI_WebFeedBridge_UnfollowWebFeed(
|
||||
@@ -264,11 +258,7 @@ static void JNI_WebFeedBridge_UnfollowWebFeed(
|
||||
auto callback =
|
||||
AdaptCallbackForJava<WebFeedSubscriptions::UnfollowWebFeedResult>(
|
||||
env, j_callback);
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
UnfollowWebFeed(
|
||||
ToNativeWebFeedId(env, webFeedId),
|
||||
/*is_durable_request=*/is_durable,
|
||||
static_cast<feedwire::webfeed::WebFeedChangeReason>(change_reason),
|
||||
std::move(callback));
|
||||
+#else
|
||||
- UnfollowWebFeed(
|
||||
- ToNativeWebFeedId(env, webFeedId),
|
||||
- /*is_durable_request=*/is_durable,
|
||||
- static_cast<feedwire::webfeed::WebFeedChangeReason>(change_reason),
|
||||
- std::move(callback));
|
||||
+ std::move(callback).Run({});
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void JNI_WebFeedBridge_FindWebFeedInfoForPage(
|
||||
@@ -280,6 +294,7 @@ static void JNI_WebFeedBridge_FindWebFeedInfoForPage(
|
||||
@@ -279,17 +269,7 @@ static void JNI_WebFeedBridge_FindWebFeedInfoForPage(
|
||||
base::OnceCallback<void(WebFeedMetadata)> callback =
|
||||
AdaptCallbackForJava<WebFeedMetadata>(env, j_callback);
|
||||
|
||||
PageInformation page_info = ToNativePageInformation(env, pageInfo);
|
||||
+#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
// Make sure web_contents is not NULL since the user might navigate away from
|
||||
// the current tab that is requested to find info.
|
||||
if (!page_info.web_contents) {
|
||||
@@ -290,6 +305,9 @@ static void JNI_WebFeedBridge_FindWebFeedInfoForPage(
|
||||
page_info.web_contents,
|
||||
static_cast<WebFeedPageInformationRequestReason>(reason),
|
||||
std::move(callback));
|
||||
+#else
|
||||
- PageInformation page_info = ToNativePageInformation(env, pageInfo);
|
||||
- // Make sure web_contents is not NULL since the user might navigate away from
|
||||
- // the current tab that is requested to find info.
|
||||
- if (!page_info.web_contents) {
|
||||
- std::move(callback).Run({});
|
||||
- return;
|
||||
- }
|
||||
- FindWebFeedInfoForPage(
|
||||
- page_info.web_contents,
|
||||
- static_cast<WebFeedPageInformationRequestReason>(reason),
|
||||
- std::move(callback));
|
||||
+ std::move(callback).Run({});
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void JNI_WebFeedBridge_FindWebFeedInfoForWebFeedId(
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -2695,7 +2695,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
syncer::SyncPrefs::MaybeMigrateAutofillToPerAccountPref(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_FEED_V2)
|
||||
// Added 06/2024
|
||||
feed::prefs::MigrateObsoleteFeedExperimentPref_Jun_2024(profile_prefs);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/core/shared_prefs/pref_names.cc
|
||||
--- a/components/feed/core/shared_prefs/pref_names.cc
|
||||
+++ b/components/feed/core/shared_prefs/pref_names.cc
|
||||
|
||||
@@ -4,14 +4,32 @@ Subject: Disable some signed exchange features
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../Disable-some-signed-exchange-features.inc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc
|
||||
chrome/browser/chrome_content_browser_client.cc | 2 +-
|
||||
content/browser/web_package/signed_exchange_utils.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc b/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-some-signed-exchange-features.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kSignedHTTPExchange);
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1613,7 +1613,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
site_isolation::prefs::kWebTriggeredIsolatedOrigins);
|
||||
registry->RegisterDictionaryPref(
|
||||
prefs::kDevToolsBackgroundServicesExpirationDict);
|
||||
- registry->RegisterBooleanPref(prefs::kSignedHTTPExchangeEnabled, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kSignedHTTPExchangeEnabled, false);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
registry->RegisterBooleanPref(prefs::kAutoplayAllowed, false);
|
||||
registry->RegisterListPref(prefs::kAutoplayAllowlist);
|
||||
diff --git a/content/browser/web_package/signed_exchange_utils.cc b/content/browser/web_package/signed_exchange_utils.cc
|
||||
--- a/content/browser/web_package/signed_exchange_utils.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_utils.cc
|
||||
@@ -51,7 +51,7 @@ void ReportErrorAndTraceEvent(
|
||||
}
|
||||
|
||||
bool IsSignedExchangeHandlingEnabled(BrowserContext* context) {
|
||||
- return GetContentClient()->browser()->AllowSignedExchange(context);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool IsSignedExchangeReportingForDistributorsEnabled() {
|
||||
--
|
||||
|
||||
@@ -34,12 +34,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../autofill/AutofillManagerWrapper.java | 5 +-
|
||||
.../components/autofill/AutofillProvider.java | 7 ++
|
||||
.../BrowserSelectionActionMenuDelegate.java | 62 ++++++++++++++
|
||||
.../browser/content_autofill_driver.cc | 13 +++
|
||||
.../browser/content_autofill_driver.cc | 11 +++
|
||||
.../content/browser/content_autofill_driver.h | 10 +++
|
||||
.../content_autofill_driver_factory.cc | 12 +++
|
||||
.../content/renderer/autofill_agent.cc | 6 ++
|
||||
.../renderer/password_autofill_agent.cc | 5 +-
|
||||
.../autofill/core/browser/autofill_driver.h | 2 +
|
||||
.../core/browser/autofill_driver_factory.cc | 4 +
|
||||
.../autofill/core/browser/autofill_manager.h | 2 +
|
||||
.../core/browser/browser_autofill_manager.cc | 2 +
|
||||
.../core/browser/browser_autofill_manager.h | 2 +
|
||||
@@ -47,7 +48,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../autofill/core/common/autofill_features.h | 22 -----
|
||||
.../autofill/core/common/autofill_prefs.cc | 4 +-
|
||||
.../autofill/core/common/autofill_prefs.h | 5 ++
|
||||
32 files changed, 268 insertions(+), 167 deletions(-)
|
||||
33 files changed, 270 insertions(+), 167 deletions(-)
|
||||
create mode 100644 components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
@@ -736,16 +737,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
|
||||
},
|
||||
source, Lift(source, std::forward<ActualArgs>(args))...);
|
||||
}
|
||||
@@ -262,6 +269,8 @@ ContentAutofillDriver::ContentAutofillDriver(
|
||||
|
||||
ContentAutofillDriver::~ContentAutofillDriver() {
|
||||
owner_->router().UnregisterDriver(*this, /*driver_is_dying=*/true);
|
||||
+ if (secondary_autofill_manager_)
|
||||
+ secondary_autofill_manager_->Reset();
|
||||
}
|
||||
|
||||
void ContentAutofillDriver::Reset(ContentAutofillDriverFactoryPassKey) {
|
||||
@@ -604,6 +613,10 @@ ContentAutofillDriver::GetAutofillAgent() {
|
||||
@@ -604,6 +611,10 @@ ContentAutofillDriver::GetAutofillAgent() {
|
||||
return autofill_agent_;
|
||||
}
|
||||
|
||||
@@ -874,6 +866,20 @@ diff --git a/components/autofill/core/browser/autofill_driver.h b/components/aut
|
||||
// Returns whether the AutofillDriver instance is associated with an active
|
||||
// frame in the MPArch sense.
|
||||
virtual bool IsActive() const = 0;
|
||||
diff --git a/components/autofill/core/browser/autofill_driver_factory.cc b/components/autofill/core/browser/autofill_driver_factory.cc
|
||||
--- a/components/autofill/core/browser/autofill_driver_factory.cc
|
||||
+++ b/components/autofill/core/browser/autofill_driver_factory.cc
|
||||
@@ -25,6 +25,10 @@ void AutofillDriverFactory::SetLifecycleStateAndNotifyObservers(
|
||||
}
|
||||
driver.GetAutofillManager().OnAutofillDriverLifecycleStateChanged(
|
||||
old_state, new_state, /*pass_key=*/{});
|
||||
+ if (auto secondary = driver.secondary_autofill_manager()) {
|
||||
+ secondary->OnAutofillDriverLifecycleStateChanged(
|
||||
+ old_state, new_state, /*pass_key=*/{});
|
||||
+ }
|
||||
}
|
||||
|
||||
} // namespace autofill
|
||||
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
|
||||
--- a/components/autofill/core/browser/autofill_manager.h
|
||||
+++ b/components/autofill/core/browser/autofill_manager.h
|
||||
|
||||
@@ -54,7 +54,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../java/res/layout/scripts_preference.xml | 40 +
|
||||
.../android/java/res/values/dimens.xml | 11 +
|
||||
.../java/res/xml/userscripts_preferences.xml | 34 +
|
||||
.../user_scripts/UserScriptsUtils.java | 87 ++
|
||||
.../user_scripts/UserScriptsUtils.java | 88 ++
|
||||
.../user_scripts/FragmentWindowAndroid.java | 90 ++
|
||||
.../user_scripts/IUserScriptsUtils.java | 22 +
|
||||
.../components/user_scripts/ScriptInfo.java | 37 +
|
||||
@@ -74,7 +74,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../user-script-ui/user-scripts-ui.js | 9 +
|
||||
.../browser/ui/user_scripts_ui.cc | 146 ++++
|
||||
.../user_scripts/browser/ui/user_scripts_ui.h | 37 +
|
||||
.../browser/user_script_loader.cc | 708 +++++++++++++++
|
||||
.../browser/user_script_loader.cc | 706 +++++++++++++++
|
||||
.../user_scripts/browser/user_script_loader.h | 168 ++++
|
||||
.../browser/user_script_pref_info.cc | 34 +
|
||||
.../browser/user_script_pref_info.h | 72 ++
|
||||
@@ -85,7 +85,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/user_scripts/common/BUILD.gn | 48 ++
|
||||
components/user_scripts/common/constants.h | 15 +
|
||||
components/user_scripts/common/error_utils.cc | 54 ++
|
||||
components/user_scripts/common/error_utils.h | 24 +
|
||||
components/user_scripts/common/error_utils.h | 22 +
|
||||
.../common/extension_message_generator.cc | 29 +
|
||||
.../common/extension_message_generator.h | 11 +
|
||||
.../user_scripts/common/extension_messages.cc | 40 +
|
||||
@@ -93,15 +93,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/user_scripts/common/host_id.cc | 31 +
|
||||
components/user_scripts/common/host_id.h | 35 +
|
||||
.../user_scripts/common/script_constants.h | 33 +
|
||||
components/user_scripts/common/url_pattern.cc | 803 ++++++++++++++++++
|
||||
components/user_scripts/common/url_pattern.h | 303 +++++++
|
||||
components/user_scripts/common/url_pattern.cc | 802 ++++++++++++++++++
|
||||
components/user_scripts/common/url_pattern.h | 302 +++++++
|
||||
.../user_scripts/common/url_pattern_set.cc | 335 ++++++++
|
||||
.../user_scripts/common/url_pattern_set.h | 160 ++++
|
||||
components/user_scripts/common/user_script.cc | 329 +++++++
|
||||
components/user_scripts/common/user_script.h | 403 +++++++++
|
||||
components/user_scripts/common/user_script.h | 402 +++++++++
|
||||
.../common/user_scripts_features.cc | 32 +
|
||||
.../common/user_scripts_features.h | 36 +
|
||||
components/user_scripts/common/view_type.cc | 39 +
|
||||
components/user_scripts/common/view_type.cc | 37 +
|
||||
components/user_scripts/common/view_type.h | 48 ++
|
||||
components/user_scripts/renderer/BUILD.gn | 65 ++
|
||||
.../renderer/extension_frame_helper.cc | 95 +++
|
||||
@@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../Experimental-user-scripts-support.inc | 13 +
|
||||
ipc/ipc_message_start.h | 1 +
|
||||
tools/gritsettings/resource_ids.spec | 6 +
|
||||
108 files changed, 9484 insertions(+), 2 deletions(-)
|
||||
108 files changed, 9476 insertions(+), 2 deletions(-)
|
||||
create mode 100644 components/user_scripts/README.md
|
||||
create mode 100755 components/user_scripts/android/BUILD.gn
|
||||
create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml
|
||||
@@ -1229,7 +1229,7 @@ diff --git a/components/user_scripts/android/java/src/org/chromium/chrome/browse
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/android/java/src/org/chromium/chrome/browser/user_scripts/UserScriptsUtils.java
|
||||
@@ -0,0 +1,87 @@
|
||||
@@ -0,0 +1,88 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -1260,6 +1260,7 @@ new file mode 100755
|
||||
+import org.chromium.base.IntentUtils;
|
||||
+
|
||||
+import org.chromium.chrome.browser.IntentHandler;
|
||||
+import org.chromium.chrome.browser.settings.SettingsLauncherFactory;
|
||||
+import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsLauncher;
|
||||
+
|
||||
@@ -1297,7 +1298,7 @@ new file mode 100755
|
||||
+
|
||||
+ if (visibleName.toUpperCase().endsWith(".USER.JS") == false) return false;
|
||||
+
|
||||
+ SettingsLauncher settingsLauncher = new SettingsLauncherImpl();
|
||||
+ SettingsLauncher settingsLauncher = SettingsLauncherFactory.createSettingsLauncher();
|
||||
+ Intent intent = settingsLauncher.createSettingsActivityIntent(
|
||||
+ context, UserScriptsPreferences.class,
|
||||
+ UserScriptsPreferences.createFragmentArgsForInstall(filePath));
|
||||
@@ -2831,7 +2832,7 @@ diff --git a/components/user_scripts/browser/user_script_loader.cc b/components/
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/browser/user_script_loader.cc
|
||||
@@ -0,0 +1,708 @@
|
||||
@@ -0,0 +1,706 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -2880,8 +2881,6 @@ new file mode 100755
|
||||
+#include "content/public/browser/browser_context.h"
|
||||
+#include "content/public/browser/browser_task_traits.h"
|
||||
+#include "content/public/browser/browser_thread.h"
|
||||
+#include "content/public/browser/notification_service.h"
|
||||
+#include "content/public/browser/notification_types.h"
|
||||
+#include "content/public/browser/render_process_host.h"
|
||||
+#include "ui/shell_dialogs/selected_file_info.h"
|
||||
+#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
@@ -3052,7 +3051,7 @@ new file mode 100755
|
||||
+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts))
|
||||
+ LOG(INFO) << "UserScriptLoader: path " << user_script_path << " is a content uri";
|
||||
+
|
||||
+ infile = OpenContentUriForRead(user_script_path);
|
||||
+ infile = OpenContentUri(user_script_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
+ } else {
|
||||
+ infile = base::File(user_script_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
+ }
|
||||
@@ -4462,7 +4461,7 @@ diff --git a/components/user_scripts/common/error_utils.h b/components/user_scri
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/error_utils.h
|
||||
@@ -0,0 +1,24 @@
|
||||
@@ -0,0 +1,22 @@
|
||||
+// Copyright (c) 2011 The 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.
|
||||
@@ -4472,8 +4471,6 @@ new file mode 100755
|
||||
+
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace user_scripts {
|
||||
+
|
||||
+class ErrorUtils {
|
||||
@@ -4775,7 +4772,7 @@ diff --git a/components/user_scripts/common/url_pattern.cc b/components/user_scr
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/url_pattern.cc
|
||||
@@ -0,0 +1,803 @@
|
||||
@@ -0,0 +1,802 @@
|
||||
+// Copyright (c) 2012 The 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.
|
||||
@@ -4790,7 +4787,6 @@ new file mode 100755
|
||||
+#include "base/strings/pattern.h"
|
||||
+#include "base/strings/strcat.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_split.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/stringprintf.h"
|
||||
@@ -5583,7 +5579,7 @@ diff --git a/components/user_scripts/common/url_pattern.h b/components/user_scri
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/url_pattern.h
|
||||
@@ -0,0 +1,303 @@
|
||||
@@ -0,0 +1,302 @@
|
||||
+// Copyright (c) 2012 The 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.
|
||||
@@ -5595,7 +5591,6 @@ new file mode 100755
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
||||
+#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
+
|
||||
@@ -6730,7 +6725,7 @@ diff --git a/components/user_scripts/common/user_script.h b/components/user_scri
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/user_script.h
|
||||
@@ -0,0 +1,403 @@
|
||||
@@ -0,0 +1,402 @@
|
||||
+// Copyright 2013 The 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.
|
||||
@@ -6743,7 +6738,6 @@ new file mode 100755
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/files/file_path.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "script_constants.h"
|
||||
+#include "host_id.h"
|
||||
+#include "url_pattern.h"
|
||||
@@ -7216,15 +7210,13 @@ diff --git a/components/user_scripts/common/view_type.cc b/components/user_scrip
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/view_type.cc
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -0,0 +1,37 @@
|
||||
+// Copyright (c) 2012 The 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 "view_type.h"
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace user_scripts {
|
||||
+
|
||||
+bool GetViewTypeFromString(const std::string& view_type,
|
||||
|
||||
@@ -85,7 +85,7 @@ deactivation of all pop-ups (default disabled)
|
||||
.../core/converter/parser/url_filter.cc | 10 +-
|
||||
.../converter/parser/url_filter_options.cc | 21 +-
|
||||
.../converter/parser/url_filter_options.h | 1 +
|
||||
.../serializer/flatbuffer_serializer.cc | 82 +-
|
||||
.../serializer/flatbuffer_serializer.cc | 83 +-
|
||||
components/adblock/core/features.cc | 3 +-
|
||||
components/adblock/core/hash/schema_hash.h | 10 +
|
||||
.../adblock/core/sitekey_storage_impl.cc | 11 +-
|
||||
@@ -129,7 +129,7 @@ deactivation of all pop-ups (default disabled)
|
||||
.../blink/renderer/core/css/style_engine.h | 1 +
|
||||
.../renderer/core/exported/web_document.cc | 15 +-
|
||||
.../definitions/adblock_private.d.ts | 14 +
|
||||
119 files changed, 6722 insertions(+), 1309 deletions(-)
|
||||
119 files changed, 6723 insertions(+), 1309 deletions(-)
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts
|
||||
rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (56%)
|
||||
@@ -2894,7 +2894,7 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.h b
|
||||
diff --git a/components/adblock/content/browser/element_hider_impl.cc b/components/adblock/content/browser/element_hider_impl.cc
|
||||
--- a/components/adblock/content/browser/element_hider_impl.cc
|
||||
+++ b/components/adblock/content/browser/element_hider_impl.cc
|
||||
@@ -208,7 +208,7 @@ void InsertUserCSSAndApplyElemHidingEmuJS(
|
||||
@@ -211,7 +211,7 @@ void InsertUserCSSAndApplyElemHidingEmuJS(
|
||||
if (!frame_host) {
|
||||
// Render frame host was destroyed before element hiding could be applied.
|
||||
// This is not a bug, just legitimate a race condition.
|
||||
@@ -2903,7 +2903,7 @@ diff --git a/components/adblock/content/browser/element_hider_impl.cc b/componen
|
||||
return;
|
||||
}
|
||||
auto* info = ElementHiderInfo::GetOrCreateForCurrentDocument(frame_host);
|
||||
@@ -236,13 +236,9 @@ void InsertUserCSSAndApplyElemHidingEmuJS(
|
||||
@@ -239,13 +239,9 @@ void InsertUserCSSAndApplyElemHidingEmuJS(
|
||||
}
|
||||
|
||||
if (!input.snippet_js.empty()) {
|
||||
@@ -4146,7 +4146,7 @@ diff --git a/components/adblock/core/common/adblock_constants.cc b/components/ad
|
||||
diff --git a/components/adblock/core/common/adblock_constants.h b/components/adblock/core/common/adblock_constants.h
|
||||
--- a/components/adblock/core/common/adblock_constants.h
|
||||
+++ b/components/adblock/core/common/adblock_constants.h
|
||||
@@ -28,7 +28,6 @@ namespace flat {
|
||||
@@ -27,7 +27,6 @@ namespace flat {
|
||||
enum AbpResource : int8_t;
|
||||
}
|
||||
|
||||
@@ -4281,7 +4281,7 @@ diff --git a/components/adblock/core/common/adblock_utils.cc b/components/adbloc
|
||||
diff --git a/components/adblock/core/configuration/filtering_configuration.h b/components/adblock/core/configuration/filtering_configuration.h
|
||||
--- a/components/adblock/core/configuration/filtering_configuration.h
|
||||
+++ b/components/adblock/core/configuration/filtering_configuration.h
|
||||
@@ -66,6 +66,9 @@ class FilteringConfiguration {
|
||||
@@ -65,6 +65,9 @@ class FilteringConfiguration {
|
||||
virtual void SetEnabled(bool enabled) = 0;
|
||||
virtual bool IsEnabled() const = 0;
|
||||
|
||||
@@ -4341,7 +4341,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
diff --git a/components/adblock/core/converter/flatbuffer_converter.cc b/components/adblock/core/converter/flatbuffer_converter.cc
|
||||
--- a/components/adblock/core/converter/flatbuffer_converter.cc
|
||||
+++ b/components/adblock/core/converter/flatbuffer_converter.cc
|
||||
@@ -125,7 +125,7 @@ void FlatbufferConverter::ConvertFilter(
|
||||
@@ -124,7 +124,7 @@ void FlatbufferConverter::ConvertFilter(
|
||||
std::string(filter_str.data(), filter_str.size()))) {
|
||||
flatbuffer_serializer.SerializeUrlFilter(std::move(url_filter.value()));
|
||||
} else {
|
||||
@@ -4517,15 +4517,15 @@ diff --git a/components/adblock/core/converter/parser/url_filter_options.h b/com
|
||||
diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.cc b/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
--- a/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
+++ b/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
#include "components/adblock/core/common/adblock_constants.h"
|
||||
#include "components/adblock/core/common/regex_filter_pattern.h"
|
||||
#include "components/adblock/core/converter/parser/filter_classifier.h"
|
||||
@@ -28,6 +29,67 @@
|
||||
@@ -27,6 +28,68 @@
|
||||
|
||||
namespace adblock {
|
||||
|
||||
@@ -4582,7 +4582,8 @@ diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.
|
||||
+ };
|
||||
+
|
||||
+ template<int N>
|
||||
+ bool IsInList(const std::u16string& command, const char16_t*(&list)[N]) {
|
||||
+ bool IsInList(const std::u16string& command, const char16_t*(&input)[N]) {
|
||||
+ auto list = base::span(input);
|
||||
+ for(int t = 0; t < N; ++t)
|
||||
+ if (base::EqualsCaseInsensitiveASCII(command, list[t]))
|
||||
+ return true;
|
||||
@@ -4593,7 +4594,7 @@ diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.
|
||||
class Buffer : public FlatbufferData {
|
||||
public:
|
||||
explicit Buffer(flatbuffers::DetachedBuffer&& buffer)
|
||||
@@ -118,9 +180,25 @@ void FlatbufferSerializer::SerializeContentFilter(
|
||||
@@ -121,9 +184,25 @@ void FlatbufferSerializer::SerializeContentFilter(
|
||||
void FlatbufferSerializer::SerializeSnippetFilter(
|
||||
const SnippetFilter snippet_filter) {
|
||||
if (!allow_privileged_) {
|
||||
@@ -4620,7 +4621,7 @@ diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.
|
||||
|
||||
std::vector<flatbuffers::Offset<adblock::flat::SnippetFunctionCall>> offsets;
|
||||
offsets.reserve(snippet_filter.snippet_script.size());
|
||||
@@ -141,7 +219,7 @@ void FlatbufferSerializer::SerializeSnippetFilter(
|
||||
@@ -144,7 +223,7 @@ void FlatbufferSerializer::SerializeSnippetFilter(
|
||||
void FlatbufferSerializer::SerializeUrlFilter(const UrlFilter url_filter) {
|
||||
const auto& options = url_filter.options;
|
||||
if (!allow_privileged_ && options.Headers().has_value()) {
|
||||
@@ -4926,7 +4927,7 @@ diff --git a/components/adblock/core/subscription/ongoing_subscription_request_i
|
||||
diff --git a/components/adblock/core/subscription/preloaded_subscription_provider_impl.cc b/components/adblock/core/subscription/preloaded_subscription_provider_impl.cc
|
||||
--- a/components/adblock/core/subscription/preloaded_subscription_provider_impl.cc
|
||||
+++ b/components/adblock/core/subscription/preloaded_subscription_provider_impl.cc
|
||||
@@ -63,10 +63,10 @@ class PreloadedSubscriptionProviderImpl::SingleSubscriptionProvider {
|
||||
@@ -62,10 +62,10 @@ class PreloadedSubscriptionProviderImpl::SingleSubscriptionProvider {
|
||||
utils::MakeFlatbufferDataFromResourceBundle(
|
||||
info_.flatbuffer_resource_id),
|
||||
Subscription::InstallationState::Preloaded, base::Time());
|
||||
@@ -5094,7 +5095,7 @@ diff --git a/components/adblock/core/subscription/subscription_config.h b/compon
|
||||
diff --git a/components/adblock/core/subscription/subscription_downloader_impl.cc b/components/adblock/core/subscription/subscription_downloader_impl.cc
|
||||
--- a/components/adblock/core/subscription/subscription_downloader_impl.cc
|
||||
+++ b/components/adblock/core/subscription/subscription_downloader_impl.cc
|
||||
@@ -56,6 +56,7 @@ GURL AddUrlParameters(const GURL& subscription_url,
|
||||
@@ -55,6 +55,7 @@ GURL AddUrlParameters(const GURL& subscription_url,
|
||||
const SubscriptionPersistentMetadata* persistent_metadata,
|
||||
const utils::AppInfo& client_metadata,
|
||||
const bool is_disabled) {
|
||||
@@ -5102,7 +5103,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
const std::string query = base::StrCat(
|
||||
{"addonName=", "eyeo-chromium-sdk", "&addonVersion=", "1.0",
|
||||
"&application=", base::EscapeQueryParamValue(client_metadata.name, true),
|
||||
@@ -116,6 +117,8 @@ void SubscriptionDownloaderImpl::StartDownload(
|
||||
@@ -115,6 +116,8 @@ void SubscriptionDownloaderImpl::StartDownload(
|
||||
}
|
||||
|
||||
void SubscriptionDownloaderImpl::CancelDownload(const GURL& subscription_url) {
|
||||
@@ -5111,7 +5112,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
ongoing_downloads_.erase(subscription_url);
|
||||
}
|
||||
@@ -140,10 +143,6 @@ void SubscriptionDownloaderImpl::DoHeadRequest(
|
||||
@@ -139,10 +142,6 @@ void SubscriptionDownloaderImpl::DoHeadRequest(
|
||||
|
||||
bool SubscriptionDownloaderImpl::IsUrlAllowed(
|
||||
const GURL& subscription_url) const {
|
||||
@@ -5122,7 +5123,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
if (!subscription_url.SchemeIs("https") &&
|
||||
!subscription_url.SchemeIs("data")) {
|
||||
return false;
|
||||
@@ -193,11 +192,11 @@ void SubscriptionDownloaderImpl::OnDownloadFinished(
|
||||
@@ -192,11 +191,11 @@ void SubscriptionDownloaderImpl::OnDownloadFinished(
|
||||
persistent_metadata_->IncrementDownloadErrorCount(subscription_url);
|
||||
if (std::get<RetryPolicy>(download_it->second) ==
|
||||
RetryPolicy::RetryUntilSucceeded) {
|
||||
@@ -5136,7 +5137,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
<< subscription_url << ", will abort";
|
||||
std::move(std::get<DownloadCompletedCallback>(download_it->second))
|
||||
.Run(nullptr);
|
||||
@@ -214,8 +213,10 @@ void SubscriptionDownloaderImpl::OnDownloadFinished(
|
||||
@@ -213,8 +212,10 @@ void SubscriptionDownloaderImpl::OnDownloadFinished(
|
||||
TRACE_ID_LOCAL(GenerateTraceId(subscription_url)), "url",
|
||||
subscription_url.spec());
|
||||
|
||||
@@ -5148,7 +5149,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
base::BindOnce(&SubscriptionDownloaderImpl::OnConversionFinished,
|
||||
weak_ptr_factory_.GetWeakPtr(), subscription_url));
|
||||
}
|
||||
@@ -229,14 +230,14 @@ void SubscriptionDownloaderImpl::OnConversionFinished(
|
||||
@@ -228,14 +229,14 @@ void SubscriptionDownloaderImpl::OnConversionFinished(
|
||||
TRACE_ID_LOCAL(GenerateTraceId(subscription_url)));
|
||||
const auto download_it = ongoing_downloads_.find(subscription_url);
|
||||
if (download_it == ongoing_downloads_.end()) {
|
||||
@@ -5165,7 +5166,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
<< " successfully";
|
||||
std::move(std::get<DownloadCompletedCallback>(download_it->second))
|
||||
.Run(std::move(
|
||||
@@ -279,7 +280,7 @@ void SubscriptionDownloaderImpl::AbortWithWarning(
|
||||
@@ -278,7 +279,7 @@ void SubscriptionDownloaderImpl::AbortWithWarning(
|
||||
if (ongoing_download_it == ongoing_downloads_.end()) {
|
||||
return;
|
||||
}
|
||||
@@ -5444,7 +5445,7 @@ diff --git a/components/adblock/core/subscription/subscription_updater_impl.cc b
|
||||
diff --git a/components/adblock/core/subscription/subscription_validator_impl.cc b/components/adblock/core/subscription/subscription_validator_impl.cc
|
||||
--- a/components/adblock/core/subscription/subscription_validator_impl.cc
|
||||
+++ b/components/adblock/core/subscription/subscription_validator_impl.cc
|
||||
@@ -64,11 +64,11 @@ bool IsSignatureValidInternal(
|
||||
@@ -63,11 +63,11 @@ bool IsSignatureValidInternal(
|
||||
const auto* expected_hash = initial_subscription_signatures.FindString(
|
||||
path.BaseName().AsUTF8Unsafe());
|
||||
if (!expected_hash) {
|
||||
|
||||
@@ -9,13 +9,16 @@ https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10
|
||||
.../navigation_predictor_metrics_document_data.h | 2 ++
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 +
|
||||
chrome/browser/ui/browser_commands.cc | 1 +
|
||||
chrome/browser/ui/lens/lens_overlay_controller.cc | 1 +
|
||||
.../webid/fedcm_account_selection_view_desktop.cc | 1 +
|
||||
.../component_updater/installer_policies/BUILD.gn | 1 +
|
||||
.../omnibox/browser/autocomplete_classifier.cc | 4 ++--
|
||||
components/omnibox/browser/omnibox_field_trial.cc | 4 ++--
|
||||
components/plus_addresses/BUILD.gn | 1 +
|
||||
.../phishing_classifier/phishing_image_embedder.cc | 14 +++-----------
|
||||
content/browser/browser_interface_binders.cc | 1 +
|
||||
net/BUILD.gn | 1 +
|
||||
10 files changed, 14 insertions(+), 16 deletions(-)
|
||||
13 files changed, 17 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
--- a/BUILD.gn
|
||||
@@ -62,6 +65,17 @@ diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_c
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
diff --git a/chrome/browser/ui/lens/lens_overlay_controller.cc b/chrome/browser/ui/lens/lens_overlay_controller.cc
|
||||
--- a/chrome/browser/ui/lens/lens_overlay_controller.cc
|
||||
+++ b/chrome/browser/ui/lens/lens_overlay_controller.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/system/sys_info.h"
|
||||
#include "base/task/bind_post_task.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
+#include "base/task/thread_pool.h"
|
||||
#include "chrome/browser/feedback/show_feedback_page.h"
|
||||
#include "chrome/browser/lens/core/mojom/geometry.mojom.h"
|
||||
#include "chrome/browser/lens/core/mojom/overlay_object.mojom.h"
|
||||
diff --git a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
--- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
+++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
@@ -73,6 +87,17 @@ diff --git a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.
|
||||
#include "chrome/browser/accessibility/accessibility_state_utils.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
diff --git a/components/component_updater/installer_policies/BUILD.gn b/components/component_updater/installer_policies/BUILD.gn
|
||||
--- a/components/component_updater/installer_policies/BUILD.gn
|
||||
+++ b/components/component_updater/installer_policies/BUILD.gn
|
||||
@@ -45,6 +45,7 @@ static_library("installer_policies_no_content_deps") {
|
||||
"//components/update_client",
|
||||
"//mojo/public/cpp/base:protobuf_support",
|
||||
"//services/network/public/cpp",
|
||||
+ "//third_party/re2",
|
||||
]
|
||||
|
||||
# Disallow depending on content.
|
||||
diff --git a/components/omnibox/browser/autocomplete_classifier.cc b/components/omnibox/browser/autocomplete_classifier.cc
|
||||
--- a/components/omnibox/browser/autocomplete_classifier.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_classifier.cc
|
||||
@@ -104,6 +129,17 @@ diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omni
|
||||
}
|
||||
|
||||
MLConfig& ScopedMLConfigForTesting::GetMLConfig() {
|
||||
diff --git a/components/plus_addresses/BUILD.gn b/components/plus_addresses/BUILD.gn
|
||||
--- a/components/plus_addresses/BUILD.gn
|
||||
+++ b/components/plus_addresses/BUILD.gn
|
||||
@@ -96,6 +96,7 @@ source_set("plus_addresses") {
|
||||
"//services/data_decoder/public/cpp",
|
||||
"//services/network/public/cpp",
|
||||
"//ui/base",
|
||||
+ "//third_party/re2",
|
||||
]
|
||||
public_deps = [
|
||||
# While not strictly public by h file inclusion, this is a temporary move
|
||||
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
--- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
+++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
|
||||
@@ -18,24 +18,24 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
cc/input/browser_controls_offset_manager.cc | 6 +
|
||||
cc/trees/layer_tree_host_impl.cc | 3 +
|
||||
.../tab_management/TabGroupUiCoordinator.java | 7 +-
|
||||
.../tab_management/TabGroupUiMediator.java | 56 ++++++-
|
||||
.../tab_management/TabGroupUiMediator.java | 56 +++++-
|
||||
.../tab_management/TabGroupUiProperties.java | 7 +-
|
||||
.../tab_management/TabGroupUiToolbarView.java | 17 ++
|
||||
.../tab_management/TabGroupUiViewBinder.java | 3 +
|
||||
.../tab_management/TabListCoordinator.java | 153 +++++++++++++++++-
|
||||
.../tab_management/TabListCoordinator.java | 162 +++++++++++++++++-
|
||||
.../TabListEmptyCoordinator.java | 17 +-
|
||||
.../settings/AccessibilitySettings.java | 26 +++
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 69 ++++++++
|
||||
.../chrome/browser/app/ChromeActivity.java | 3 +
|
||||
.../compositor/CompositorViewHolder.java | 7 +
|
||||
.../layouts/LayoutManagerChrome.java | 19 ++-
|
||||
.../layouts/LayoutManagerChrome.java | 19 +-
|
||||
.../layouts/LayoutManagerChromeTablet.java | 4 +-
|
||||
.../layouts/ToolbarSwipeLayout.java | 14 +-
|
||||
.../overlays/strip/ScrollDelegate.java | 2 +-
|
||||
.../strip/StripLayoutHelperManager.java | 37 ++++-
|
||||
.../strip/StripLayoutHelperManager.java | 37 +++-
|
||||
.../scene_layer/StaticTabSceneLayer.java | 7 +-
|
||||
.../scene_layer/TabListSceneLayer.java | 8 +
|
||||
.../scene_layer/TabStripSceneLayer.java | 19 ++-
|
||||
.../scene_layer/TabStripSceneLayer.java | 19 +-
|
||||
.../browser/findinpage/FindToolbarTablet.java | 10 +-
|
||||
.../fullscreen/BrowserControlsManager.java | 12 ++
|
||||
.../messages/MessageContainerCoordinator.java | 16 +-
|
||||
@@ -45,10 +45,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../chrome/browser/ntp/RecentTabsPage.java | 30 +++-
|
||||
.../browser/searchwidget/SearchActivity.java | 11 ++
|
||||
.../browser/settings/SettingsActivity.java | 5 +
|
||||
.../StatusIndicatorCoordinator.java | 9 ++
|
||||
.../StatusIndicatorCoordinator.java | 9 +
|
||||
.../StatusIndicatorSceneLayer.java | 6 +-
|
||||
.../browser/toolbar/ToolbarManager.java | 37 ++++-
|
||||
.../chrome/browser/ui/BottomContainer.java | 18 +++
|
||||
.../browser/toolbar/ToolbarManager.java | 37 +++-
|
||||
.../chrome/browser/ui/BottomContainer.java | 18 ++
|
||||
.../ui/system/StatusBarColorController.java | 8 +
|
||||
.../android/compositor/layer/toolbar_layer.cc | 10 +-
|
||||
.../scene_layer/tab_strip_scene_layer.cc | 16 +-
|
||||
@@ -60,14 +60,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/flags/ChromeFeatureList.java | 10 ++
|
||||
chrome/browser/hub/internal/BUILD.gn | 5 +
|
||||
.../chrome/browser/hub/HubCoordinator.java | 8 +
|
||||
.../chrome/browser/hub/HubManagerImpl.java | 24 ++-
|
||||
.../chrome/browser/hub/HubManagerImpl.java | 16 +-
|
||||
.../browser/hub/ReversedLinearLayout.java | 42 +++++
|
||||
.../android/res/layout/hub_layout.xml | 4 +-
|
||||
.../android/res/layout/hub_toolbar_layout.xml | 2 +-
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
||||
.../chrome/browser/ui/appmenu/AppMenu.java | 40 ++++-
|
||||
.../ui/appmenu/AppMenuHandlerImpl.java | 10 ++
|
||||
...mniboxSuggestionsDropdownEmbedderImpl.java | 18 +++
|
||||
...mniboxSuggestionsDropdownEmbedderImpl.java | 18 ++
|
||||
.../suggestions/AutocompleteCoordinator.java | 13 ++
|
||||
.../suggestions/AutocompleteMediator.java | 6 +-
|
||||
.../DropdownItemViewInfoListManager.java | 7 +-
|
||||
@@ -81,8 +81,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../bottom/BottomControlsMediator.java | 20 ++-
|
||||
.../bottom/BottomControlsProperties.java | 6 +-
|
||||
.../bottom/BottomControlsViewBinder.java | 2 +
|
||||
.../bottom/ScrollingBottomViewSceneLayer.java | 19 ++-
|
||||
.../toolbar/top/ToolbarControlContainer.java | 9 ++
|
||||
.../bottom/ScrollingBottomViewSceneLayer.java | 19 +-
|
||||
.../toolbar/top/ToolbarControlContainer.java | 9 +
|
||||
.../top/TopToolbarOverlayCoordinator.java | 10 ++
|
||||
.../top/TopToolbarOverlayProperties.java | 8 +-
|
||||
.../toolbar/top/TopToolbarSceneLayer.java | 10 +-
|
||||
@@ -90,7 +90,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../AccessibilitySettingsDelegate.java | 7 +
|
||||
.../render_widget_host_view_android.cc | 3 +
|
||||
.../Move-navigation-bar-to-bottom.inc | 17 ++
|
||||
77 files changed, 1006 insertions(+), 83 deletions(-)
|
||||
77 files changed, 1009 insertions(+), 81 deletions(-)
|
||||
create mode 100644 chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc
|
||||
|
||||
@@ -425,7 +425,15 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
import android.graphics.Rect;
|
||||
import android.util.Size;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -57,6 +61,8 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
|
||||
@@ -16,6 +20,7 @@ import android.view.View;
|
||||
import android.view.View.OnLayoutChangeListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
|
||||
+import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
@@ -57,6 +62,8 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
|
||||
import org.chromium.ui.modelutil.SimpleRecyclerViewAdapter;
|
||||
import org.chromium.ui.widget.ViewLookupCachingFrameLayout;
|
||||
|
||||
@@ -434,7 +442,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.List;
|
||||
@@ -114,6 +120,128 @@ public class TabListCoordinator
|
||||
@@ -114,6 +121,128 @@ public class TabListCoordinator
|
||||
private int mAwaitingTabId = Tab.INVALID_TAB_ID;
|
||||
private @TabActionState int mTabActionState;
|
||||
|
||||
@@ -563,7 +571,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
/**
|
||||
* Construct a coordinator for UI that shows a list of tabs.
|
||||
*
|
||||
@@ -356,6 +484,12 @@ public class TabListCoordinator
|
||||
@@ -356,6 +485,12 @@ public class TabListCoordinator
|
||||
checkAwaitingLayout();
|
||||
}
|
||||
};
|
||||
@@ -576,7 +584,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
mRecyclerView.setLayoutManager(gridLayoutManager);
|
||||
mMediator.registerOrientationListener(gridLayoutManager);
|
||||
mMediator.updateSpanCount(
|
||||
@@ -367,8 +501,7 @@ public class TabListCoordinator
|
||||
@@ -367,8 +502,7 @@ public class TabListCoordinator
|
||||
.getDecorView()
|
||||
.getWindowVisibleDisplayFrame(frame);
|
||||
updateGridCardLayout(frame.width());
|
||||
@@ -586,11 +594,19 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
LinearLayoutManager layoutManager =
|
||||
new LinearLayoutManager(
|
||||
context,
|
||||
@@ -383,6 +516,17 @@ public class TabListCoordinator
|
||||
@@ -383,6 +517,25 @@ public class TabListCoordinator
|
||||
}
|
||||
};
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
+ } else if (mMode == TabListMode.LIST) {
|
||||
+ if (dialogHandler == null && selectionDelegateProvider == null &&
|
||||
+ ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) {
|
||||
+ FrameLayout.LayoutParams recyclerViewParams =
|
||||
+ (FrameLayout.LayoutParams) mRecyclerView.getLayoutParams();
|
||||
+ int toolbarHeightPx = mBrowserControlsStateProvider.getTopControlsHeight();
|
||||
+ recyclerViewParams.topMargin = toolbarHeightPx;
|
||||
+ mRecyclerView.setLayoutParams(recyclerViewParams);
|
||||
+ }
|
||||
+ LinearLayoutManager layout =
|
||||
+ new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) {
|
||||
+ @Override
|
||||
@@ -604,7 +620,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
}
|
||||
mMediator.setRecyclerViewItemAnimationToggle(mRecyclerView::setDisableItemAnimations);
|
||||
}
|
||||
@@ -400,7 +544,7 @@ public class TabListCoordinator
|
||||
@@ -400,7 +553,7 @@ public class TabListCoordinator
|
||||
if (mHasEmptyView) {
|
||||
mTabListEmptyCoordinator =
|
||||
new TabListEmptyCoordinator(
|
||||
@@ -613,7 +629,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
mEmptyStateHeadingResId = emptyHeadingStringResId;
|
||||
mEmptyStateSubheadingResId = emptySubheadingStringResId;
|
||||
mEmptyStateImageResId = emptyImageResId;
|
||||
@@ -689,6 +833,9 @@ public class TabListCoordinator
|
||||
@@ -689,6 +842,9 @@ public class TabListCoordinator
|
||||
void prepareTabSwitcherPaneView() {
|
||||
registerLayoutChangeListener();
|
||||
mRecyclerView.setupCustomItemAnimator();
|
||||
@@ -2033,29 +2049,14 @@ diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/br
|
||||
mHubContainerView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
@@ -242,6 +250,8 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
mSnackbarManager.popParentViewFromOverrideStack(mSnackbarOverrideToken);
|
||||
mSnackbarOverrideToken = TokenHolder.INVALID_TOKEN;
|
||||
@@ -256,6 +264,8 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
}
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ mSnackbarManager.setParentView(null);
|
||||
}
|
||||
|
||||
private void attachPaneDependencies(@Nullable Pane pane) {
|
||||
@@ -254,8 +264,12 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
mMenuOrKeyboardActionController.registerMenuOrKeyboardActionHandler(
|
||||
menuOrKeyboardActionHandler);
|
||||
}
|
||||
- mSnackbarOverrideToken =
|
||||
- mSnackbarManager.pushParentViewToOverrideStack(
|
||||
mSnackbarOverrideToken =
|
||||
mSnackbarManager.pushParentViewToOverrideStack(
|
||||
- mHubCoordinator.getSnackbarContainer());
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ mSnackbarManager.setParentView((ViewGroup)getPaneHostView());
|
||||
+ else {
|
||||
+ mSnackbarOverrideToken =
|
||||
+ mSnackbarManager.pushParentViewToOverrideStack(
|
||||
+ mHubCoordinator.getSnackbarContainer());
|
||||
+ }
|
||||
+ ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()
|
||||
+ ? (ViewGroup)getPaneHostView()
|
||||
+ : mHubCoordinator.getSnackbarContainer());
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
|
||||
@@ -9,7 +9,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../core/browser/hsts_query.cc | 1 +
|
||||
.../web_package/signed_exchange_handler.cc | 7 +-
|
||||
.../web_package/signed_exchange_handler.h | 4 +
|
||||
.../web_package/signed_exchange_loader.cc | 2 +-
|
||||
.../web_package/signed_exchange_loader.cc | 3 +-
|
||||
.../web_package/signed_exchange_loader.h | 2 +
|
||||
.../signed_exchange_prefetch_handler.cc | 2 +-
|
||||
.../signed_exchange_request_handler.cc | 1 +
|
||||
net/http/transport_security_state.cc | 109 ++++++++++++------
|
||||
net/http/transport_security_state.h | 39 ++++---
|
||||
net/quic/crypto/proof_verifier_chromium.cc | 5 +-
|
||||
@@ -22,7 +25,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
services/network/network_context.cc | 31 +++--
|
||||
services/network/network_context.h | 13 ++-
|
||||
.../public/mojom/network_context.mojom | 9 +-
|
||||
18 files changed, 175 insertions(+), 102 deletions(-)
|
||||
21 files changed, 180 insertions(+), 103 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/ssl/https_upgrades_interceptor.cc b/chrome/browser/ssl/https_upgrades_interceptor.cc
|
||||
--- a/chrome/browser/ssl/https_upgrades_interceptor.cc
|
||||
@@ -155,7 +158,15 @@ diff --git a/content/browser/web_package/signed_exchange_handler.h b/content/bro
|
||||
diff --git a/content/browser/web_package/signed_exchange_loader.cc b/content/browser/web_package/signed_exchange_loader.cc
|
||||
--- a/content/browser/web_package/signed_exchange_loader.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_loader.cc
|
||||
@@ -126,7 +126,7 @@ SignedExchangeLoader::SignedExchangeLoader(
|
||||
@@ -74,6 +74,7 @@ SignedExchangeLoader::SignedExchangeLoader(
|
||||
std::unique_ptr<SignedExchangeReporter> reporter,
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
|
||||
URLLoaderThrottlesGetter url_loader_throttles_getter,
|
||||
+ const net::NetworkAnonymizationKey& network_anonymization_key,
|
||||
int frame_tree_node_id,
|
||||
const std::string& accept_langs,
|
||||
bool keep_entry_for_prefetch_cache)
|
||||
@@ -126,7 +127,7 @@ SignedExchangeLoader::SignedExchangeLoader(
|
||||
std::move(outer_response_body)),
|
||||
base::BindOnce(&SignedExchangeLoader::OnHTTPExchangeFound,
|
||||
weak_factory_.GetWeakPtr()),
|
||||
@@ -164,6 +175,48 @@ diff --git a/content/browser/web_package/signed_exchange_loader.cc b/content/bro
|
||||
keep_entry_for_prefetch_cache
|
||||
? std::nullopt
|
||||
: std::make_optional(outer_request_.trusted_params->isolation_info),
|
||||
diff --git a/content/browser/web_package/signed_exchange_loader.h b/content/browser/web_package/signed_exchange_loader.h
|
||||
--- a/content/browser/web_package/signed_exchange_loader.h
|
||||
+++ b/content/browser/web_package/signed_exchange_loader.h
|
||||
@@ -31,6 +31,7 @@ class URLLoaderThrottle;
|
||||
} // namespace blink
|
||||
|
||||
namespace net {
|
||||
+class NetworkAnonymizationKey;
|
||||
class SourceStream;
|
||||
} // namespace net
|
||||
|
||||
@@ -73,6 +74,7 @@ class CONTENT_EXPORT SignedExchangeLoader final
|
||||
std::unique_ptr<SignedExchangeReporter> reporter,
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
|
||||
URLLoaderThrottlesGetter url_loader_throttles_getter,
|
||||
+ const net::NetworkAnonymizationKey& network_anonymization_key,
|
||||
int frame_tree_node_id,
|
||||
const std::string& accept_langs,
|
||||
bool keep_entry_for_prefetch_cache);
|
||||
diff --git a/content/browser/web_package/signed_exchange_prefetch_handler.cc b/content/browser/web_package/signed_exchange_prefetch_handler.cc
|
||||
--- a/content/browser/web_package/signed_exchange_prefetch_handler.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_prefetch_handler.cc
|
||||
@@ -56,7 +56,7 @@ SignedExchangePrefetchHandler::SignedExchangePrefetchHandler(
|
||||
network::mojom::kURLLoadOptionNone,
|
||||
false /* should_redirect_to_fallback */, std::move(devtools_proxy),
|
||||
std::move(reporter), std::move(url_loader_factory),
|
||||
- loader_throttles_getter, frame_tree_node_id, accept_langs,
|
||||
+ loader_throttles_getter, network_anonymization_key, frame_tree_node_id, accept_langs,
|
||||
keep_entry_for_prefetch_cache);
|
||||
}
|
||||
|
||||
diff --git a/content/browser/web_package/signed_exchange_request_handler.cc b/content/browser/web_package/signed_exchange_request_handler.cc
|
||||
--- a/content/browser/web_package/signed_exchange_request_handler.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_request_handler.cc
|
||||
@@ -116,6 +116,7 @@ bool SignedExchangeRequestHandler::MaybeCreateLoaderForResponse(
|
||||
std::move(client), url_loader->Unbind(), url_loader_options_,
|
||||
true /* should_redirect_to_fallback */, std::move(devtools_proxy),
|
||||
std::move(reporter), url_loader_factory_, url_loader_throttles_getter_,
|
||||
+ network_anonymization_key,
|
||||
frame_tree_node_id_, accept_langs_,
|
||||
false /* keep_entry_for_prefetch_cache */);
|
||||
|
||||
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
|
||||
--- a/net/http/transport_security_state.cc
|
||||
+++ b/net/http/transport_security_state.cc
|
||||
|
||||
@@ -12,9 +12,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 1 +
|
||||
.../chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 13 +++++++++++++
|
||||
...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 9 +++++++++
|
||||
...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 7 +++++++
|
||||
...ntroduce-modal-dialog-flag-to-close-all-tabs.inc | 5 +++++
|
||||
6 files changed, 35 insertions(+)
|
||||
6 files changed, 33 insertions(+)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc
|
||||
@@ -86,15 +86,13 @@ diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/R
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc
|
||||
@@ -0,0 +1,9 @@
|
||||
@@ -0,0 +1,7 @@
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
+
|
||||
+CROMITE_FEATURE(kCloseAllTabsModalDialog,
|
||||
+ "CloseAllTabsModalDialog",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+
|
||||
+SET_CROMITE_FEATURE_ENABLED(kArchiveTabService);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc
|
||||
new file mode 100644
|
||||
|
||||
@@ -7,6 +7,7 @@ without asking the native code
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../webview_shell/WebViewBrowserFragment.java | 56 -----------------
|
||||
.../browser/download/OMADownloadHandler.java | 39 ------------
|
||||
.../browser/feedback/ConnectivityChecker.java | 36 +----------
|
||||
.../ConnectivityDetector.java | 63 -------------------
|
||||
@@ -14,8 +15,74 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../util/HttpURLConnectionFactoryImpl.java | 7 +--
|
||||
.../firstrun/VariationsSeedFetcher.java | 26 +-------
|
||||
.../chromium/net/ChromiumNetworkAdapter.java | 13 ----
|
||||
7 files changed, 4 insertions(+), 183 deletions(-)
|
||||
8 files changed, 4 insertions(+), 239 deletions(-)
|
||||
|
||||
diff --git a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserFragment.java b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserFragment.java
|
||||
--- a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserFragment.java
|
||||
+++ b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserFragment.java
|
||||
@@ -240,62 +240,6 @@ public class WebViewBrowserFragment extends Fragment {
|
||||
/** Downloading file in background thread */
|
||||
@Override
|
||||
protected String doInBackground() {
|
||||
- try {
|
||||
- NetworkTrafficAnnotationTag annotation =
|
||||
- NetworkTrafficAnnotationTag.createComplete(
|
||||
- "android_webview_shell",
|
||||
- """
|
||||
- semantics {
|
||||
- sender: "WebViewBrowserFragment (Android)"
|
||||
- description:
|
||||
- "Downloads files as specified by the shell browser."
|
||||
- trigger: "User interations within the browser, causing a download"
|
||||
- data: "No additional data."
|
||||
- destination: LOCAL
|
||||
- internal {
|
||||
- contacts {
|
||||
- email: "avvall@chromium.org"
|
||||
- }
|
||||
- }
|
||||
- user_data {
|
||||
- type: NONE
|
||||
- }
|
||||
- last_reviewed: "2024-07-25"
|
||||
- }
|
||||
- policy {
|
||||
- cookies_allowed: NO
|
||||
- setting: "This feature can not be disabled."
|
||||
- policy_exception_justification: "Not implemented."
|
||||
- }""");
|
||||
- URL url = new URL(mFileUrl);
|
||||
- URLConnection connection = ChromiumNetworkAdapter.openConnection(url, annotation);
|
||||
- connection.connect();
|
||||
-
|
||||
- // download the file
|
||||
- InputStream input =
|
||||
- new BufferedInputStream(ChromiumNetworkAdapter.openStream(url, annotation));
|
||||
-
|
||||
- File path =
|
||||
- Environment.getExternalStoragePublicDirectory(
|
||||
- Environment.DIRECTORY_DOWNLOADS);
|
||||
- File file = new File(path, mNameOfFile);
|
||||
- // Make sure the Downloads directory exists.
|
||||
- path.mkdirs();
|
||||
- OutputStream output = new FileOutputStream(file);
|
||||
-
|
||||
- int count;
|
||||
- byte[] data = new byte[BUFFER_SIZE];
|
||||
- while ((count = input.read(data)) != -1) {
|
||||
- output.write(data, 0, count);
|
||||
- }
|
||||
-
|
||||
- output.flush();
|
||||
- output.close();
|
||||
- input.close();
|
||||
- } catch (Exception e) {
|
||||
- Log.e(TAG, "Error: " + e.getMessage());
|
||||
- }
|
||||
-
|
||||
return null;
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java
|
||||
|
||||
@@ -98,17 +98,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../webauthn/cred_man/CredManHelper.java | 16 +-
|
||||
.../cred_man/CredManMetricsHelper.java | 2 +-
|
||||
.../push_messaging/push_messaging_manager.cc | 2 +-
|
||||
content/public/android/BUILD.gn | 4 -
|
||||
content/public/android/BUILD.gn | 6 -
|
||||
.../webid/IdentityCredentialsDelegate.java | 92 +--
|
||||
content/test/BUILD.gn | 4 -
|
||||
device/BUILD.gn | 3 -
|
||||
services/BUILD.gn | 9 -
|
||||
services/device/geolocation/BUILD.gn | 4 -
|
||||
services/shape_detection/BUILD.gn | 2 -
|
||||
third_party/android_deps/BUILD.gn | 759 +-----------------
|
||||
third_party/android_deps/BUILD.gn | 762 +-----------------
|
||||
.../preconditions/javatests/BUILD.gn | 1 -
|
||||
.../gms/ChromiumPlayServicesAvailability.java | 10 +-
|
||||
third_party/cardboard/BUILD.gn | 4 -
|
||||
84 files changed, 116 insertions(+), 2256 deletions(-)
|
||||
85 files changed, 117 insertions(+), 2352 deletions(-)
|
||||
create mode 100644 components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java
|
||||
|
||||
diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
||||
@@ -3576,6 +3577,123 @@ diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
|
||||
"//base:base_java",
|
||||
"//base:process_launcher_java",
|
||||
"//build:chromeos_buildflags",
|
||||
@@ -425,8 +421,6 @@ android_library("content_full_java") {
|
||||
android_library("identity_credentials_public_impl_java") {
|
||||
sources = [ "java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java" ]
|
||||
deps = [
|
||||
- "$google_play_services_package:google_play_services_identity_credentials_java",
|
||||
- "$google_play_services_package:google_play_services_tasks_java",
|
||||
"//base:base_java",
|
||||
"//third_party/androidx:androidx_core_core_java",
|
||||
]
|
||||
diff --git a/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java
|
||||
--- a/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java
|
||||
+++ b/content/public/android/java/src/org/chromium/content/browser/webid/IdentityCredentialsDelegate.java
|
||||
@@ -15,13 +15,6 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.ResultReceiver;
|
||||
|
||||
-import com.google.android.gms.identitycredentials.CredentialOption;
|
||||
-import com.google.android.gms.identitycredentials.GetCredentialException;
|
||||
-import com.google.android.gms.identitycredentials.GetCredentialRequest;
|
||||
-import com.google.android.gms.identitycredentials.IdentityCredentialClient;
|
||||
-import com.google.android.gms.identitycredentials.IdentityCredentialManager;
|
||||
-import com.google.android.gms.identitycredentials.IntentHelper;
|
||||
-
|
||||
import org.chromium.base.Log;
|
||||
import org.chromium.base.Promise;
|
||||
|
||||
@@ -36,89 +29,6 @@ public class IdentityCredentialsDelegate {
|
||||
}
|
||||
|
||||
public Promise<byte[]> get(Activity window, String origin, String request) {
|
||||
- final IdentityCredentialClient client;
|
||||
- try {
|
||||
- client = IdentityCredentialManager.Companion.getClient(window);
|
||||
- } catch (Exception e) {
|
||||
- // Thrown when running in phones without the most current GMS
|
||||
- // version.
|
||||
- return Promise.rejected();
|
||||
- }
|
||||
-
|
||||
- final Promise<byte[]> result = new Promise<byte[]>();
|
||||
-
|
||||
- ResultReceiver resultReceiver =
|
||||
- new ResultReceiver(new Handler(Looper.getMainLooper())) {
|
||||
- // android.credentials.GetCredentialException requires API level 34
|
||||
- @SuppressLint("NewApi")
|
||||
- @Override
|
||||
- protected void onReceiveResult(int code, Bundle data) {
|
||||
- Log.d(TAG, "Received a response");
|
||||
- try {
|
||||
- var response = IntentHelper.extractGetCredentialResponse(code, data);
|
||||
- var token =
|
||||
- response.getCredential()
|
||||
- .getData()
|
||||
- .getByteArray("identityToken");
|
||||
- result.fulfill(token);
|
||||
- } catch (Exception e) {
|
||||
- Log.e(TAG, e.toString());
|
||||
-
|
||||
- if (e instanceof GetCredentialException
|
||||
- && Build.VERSION.SDK_INT
|
||||
- >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
- String exceptionType = ((GetCredentialException) e).getType();
|
||||
- result.reject(
|
||||
- new android.credentials.GetCredentialException(
|
||||
- exceptionType, e.getMessage()));
|
||||
- } else {
|
||||
- result.reject(e);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- client.getCredential(
|
||||
- new GetCredentialRequest(
|
||||
- Arrays.asList(
|
||||
- new CredentialOption(
|
||||
- "com.credman.IdentityCredential",
|
||||
- new Bundle(),
|
||||
- new Bundle(),
|
||||
- request,
|
||||
- "",
|
||||
- "")),
|
||||
- new Bundle(),
|
||||
- origin,
|
||||
- resultReceiver))
|
||||
- .addOnSuccessListener(
|
||||
- response -> {
|
||||
- try {
|
||||
- Log.d(TAG, "Sending an intent for sender");
|
||||
- Log.d(TAG, request);
|
||||
- startIntentSenderForResult(
|
||||
- /** activity= */
|
||||
- window,
|
||||
- /** intent= */
|
||||
- response.getPendingIntent().getIntentSender(),
|
||||
- /** requestCode= */
|
||||
- 777,
|
||||
- /** fillInIntent= */
|
||||
- null,
|
||||
- /** flagsMask= */
|
||||
- 0,
|
||||
- /** flagsValues= */
|
||||
- 0,
|
||||
- /** extraFlags= */
|
||||
- 0,
|
||||
- /** options= */
|
||||
- null);
|
||||
- } catch (SendIntentException e) {
|
||||
- Log.e(TAG, "Sending an intent for sender failed");
|
||||
- result.reject(e);
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- return result;
|
||||
+ return Promise.rejected();
|
||||
}
|
||||
}
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -4472,6 +4590,30 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
|
||||
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
|
||||
java_prebuilt("io_perfmark_perfmark_api_java") {
|
||||
jar_path = "cipd/libs/io_perfmark_perfmark_api/perfmark-api-0.25.0.jar"
|
||||
@@ -2383,7 +1626,6 @@ if (!limit_android_deps) {
|
||||
]
|
||||
testonly = true
|
||||
deps = [
|
||||
- ":com_google_auto_value_auto_value_annotations_java",
|
||||
":org_robolectric_pluginapi_java",
|
||||
":org_robolectric_utils_java",
|
||||
"//third_party/android_deps:guava_android_java",
|
||||
@@ -2405,7 +1647,6 @@ if (!limit_android_deps) {
|
||||
]
|
||||
testonly = true
|
||||
deps = [
|
||||
- ":com_google_auto_value_auto_value_annotations_java",
|
||||
":org_robolectric_annotations_java",
|
||||
":org_robolectric_pluginapi_java",
|
||||
":org_robolectric_utils_java",
|
||||
@@ -2475,7 +1716,6 @@ if (!limit_android_deps) {
|
||||
]
|
||||
testonly = true
|
||||
deps = [
|
||||
- ":com_google_auto_value_auto_value_annotations_java",
|
||||
":org_robolectric_annotations_java",
|
||||
":org_robolectric_nativeruntime_java",
|
||||
":org_robolectric_pluginapi_java",
|
||||
diff --git a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
||||
--- a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
||||
+++ b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn
|
||||
|
||||
@@ -4,26 +4,27 @@ Subject: Remove help menu item
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/android/java/res/menu/main_menu.xml | 3 ---
|
||||
.../res/menu/save_password_preferences_action_bar_menu.xml | 1 +
|
||||
.../src/org/chromium/chrome/browser/KeyboardShortcuts.java | 3 ---
|
||||
.../src/org/chromium/chrome/browser/app/ChromeActivity.java | 5 -----
|
||||
.../autofill/settings/AutofillPaymentMethodsFragment.java | 1 +
|
||||
.../browser/autofill/settings/AutofillProfilesFragment.java | 1 +
|
||||
.../browser/browsing_data/ClearBrowsingDataFragment.java | 1 +
|
||||
.../browser/password_manager/settings/PasswordSettings.java | 1 +
|
||||
.../chrome/browser/privacy/settings/PrivacySettings.java | 1 +
|
||||
.../chromium/chrome/browser/settings/SettingsActivity.java | 1 +
|
||||
.../chrome/browser/sync/settings/GoogleServicesSettings.java | 1 +
|
||||
.../chrome/browser/sync/settings/ManageSyncSettings.java | 1 +
|
||||
.../android/java/res/menu/prefeditor_editor_menu.xml | 1 +
|
||||
.../browser/autofill/options/AutofillOptionsFragment.java | 1 +
|
||||
.../browser/password_check/PasswordCheckFragmentView.java | 1 +
|
||||
.../java/res/menu/credential_edit_action_bar_menu.xml | 3 ++-
|
||||
.../prefetch/settings/PreloadPagesSettingsFragmentBase.java | 1 +
|
||||
.../privacy_sandbox/PrivacySandboxSettingsBaseFragment.java | 1 +
|
||||
.../settings/SafeBrowsingSettingsFragmentBase.java | 1 +
|
||||
19 files changed, 17 insertions(+), 12 deletions(-)
|
||||
chrome/android/java/res/menu/main_menu.xml | 3 ---
|
||||
.../menu/save_password_preferences_action_bar_menu.xml | 1 +
|
||||
.../org/chromium/chrome/browser/KeyboardShortcuts.java | 3 ---
|
||||
.../org/chromium/chrome/browser/app/ChromeActivity.java | 9 ---------
|
||||
.../settings/AutofillPaymentMethodsFragment.java | 1 +
|
||||
.../autofill/settings/AutofillProfilesFragment.java | 1 +
|
||||
.../browser/browsing_data/ClearBrowsingDataFragment.java | 1 +
|
||||
.../chrome/browser/customtabs/BaseCustomTabActivity.java | 1 -
|
||||
.../password_manager/settings/PasswordSettings.java | 1 +
|
||||
.../chrome/browser/privacy/settings/PrivacySettings.java | 1 +
|
||||
.../chrome/browser/settings/SettingsActivity.java | 1 +
|
||||
.../browser/sync/settings/GoogleServicesSettings.java | 1 +
|
||||
.../chrome/browser/sync/settings/ManageSyncSettings.java | 1 +
|
||||
.../android/java/res/menu/prefeditor_editor_menu.xml | 1 +
|
||||
.../autofill/options/AutofillOptionsFragment.java | 1 +
|
||||
.../password_check/PasswordCheckFragmentView.java | 1 +
|
||||
.../java/res/menu/credential_edit_action_bar_menu.xml | 3 ++-
|
||||
.../settings/PreloadPagesSettingsFragmentBase.java | 1 +
|
||||
.../PrivacySandboxSettingsBaseFragment.java | 1 +
|
||||
.../settings/SafeBrowsingSettingsFragmentBase.java | 1 +
|
||||
20 files changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
|
||||
--- a/chrome/android/java/res/menu/main_menu.xml
|
||||
@@ -65,18 +66,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -2579,11 +2579,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -2578,15 +2578,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
|
||||
final Tab currentTab = getActivityTab();
|
||||
|
||||
if (id == R.id.help_id) {
|
||||
- if (id == R.id.help_id) {
|
||||
- String url = currentTab != null ? currentTab.getUrl().getSpec() : "";
|
||||
- startHelpAndFeedback(
|
||||
- url,
|
||||
- "MobileMenuFeedback",
|
||||
- getTabModelSelector().getCurrentModel().getProfile());
|
||||
return true;
|
||||
}
|
||||
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
if (id == R.id.open_history_menu_id) {
|
||||
if (currentTab != null && UrlUtilities.isNtpUrl(currentTab.getUrl())) {
|
||||
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_HISTORY_MANAGER);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
|
||||
@@ -110,6 +115,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/C
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
|
||||
@@ -757,7 +757,6 @@ public abstract class BaseCustomTabActivity extends ChromeActivity<BaseCustomTab
|
||||
// Disable creating new tabs, bookmark, print, help, focus_url, etc.
|
||||
if (id == R.id.focus_url_bar
|
||||
|| id == R.id.all_bookmarks_menu_id
|
||||
- || id == R.id.help_id
|
||||
|| id == R.id.recent_tabs_menu_id
|
||||
|| id == R.id.new_incognito_tab_menu_id
|
||||
|| id == R.id.new_tab_menu_id) {
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
|
||||
@@ -9,7 +9,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../chrome/browser/settings/MainSettings.java | 3 +-
|
||||
chrome/browser/flag-metadata.json | 3 +-
|
||||
.../flags/android/chrome_feature_list.cc | 5 ++
|
||||
.../flags/android/chrome_feature_list.cc | 4 ++
|
||||
.../browser/flags/ChromeFeatureList.java | 1 +
|
||||
.../AdaptiveToolbarButtonController.java | 9 +++
|
||||
.../adaptive/AdaptiveToolbarFeatures.java | 65 ++++++++++++++++++-
|
||||
@@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../AdaptiveToolbarStatePredictorTest.java | 15 +++++
|
||||
...oButtonGroupAdaptiveToolbarPreference.java | 1 +
|
||||
...ve-button-in-top-toolbar-customization.inc | 3 +
|
||||
11 files changed, 110 insertions(+), 6 deletions(-)
|
||||
11 files changed, 109 insertions(+), 6 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-adaptive-button-in-top-toolbar-customization.inc
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
|
||||
@@ -59,15 +59,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -168,6 +168,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&history::kOrganicRepeatableQueries,
|
||||
&history_clusters::internal::kJourneys,
|
||||
&history_clusters::internal::kOmniboxAction,
|
||||
+ &kAdaptiveButtonInTopToolbar,
|
||||
&kAdaptiveButtonInTopToolbarTranslate,
|
||||
&kAdaptiveButtonInTopToolbarAddToBookmarks,
|
||||
&kAdaptiveButtonInTopToolbarCustomizationV2,
|
||||
@@ -420,6 +421,10 @@ static jlong JNI_ChromeFeatureMap_GetNativeMap(JNIEnv* env) {
|
||||
@@ -420,6 +420,10 @@ static jlong JNI_ChromeFeatureMap_GetNativeMap(JNIEnv* env) {
|
||||
|
||||
// Alphabetical:
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToC
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -304,6 +304,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
@@ -303,6 +303,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&kReportParentalControlSitesChild,
|
||||
&kSearchInCCT,
|
||||
&kSearchResumptionModuleAndroid,
|
||||
|
||||
@@ -257,7 +257,7 @@ new file mode 100644
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -2743,6 +2743,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -2739,6 +2739,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
TabUtils.switchUserAgent(
|
||||
currentTab,
|
||||
usingDesktopUserAgent,
|
||||
|
||||
@@ -30,7 +30,7 @@ Based on Chromium 118.0.5993.48
|
||||
.../content_security_policy_injector_impl.cc | 126 ++
|
||||
.../content_security_policy_injector_impl.h | 66 +
|
||||
.../adblock/content/browser/element_hider.h | 70 +
|
||||
.../content/browser/element_hider_impl.cc | 323 ++++
|
||||
.../content/browser/element_hider_impl.cc | 326 ++++
|
||||
.../content/browser/element_hider_impl.h | 55 +
|
||||
.../content/browser/element_hider_info.cc | 37 +
|
||||
.../content/browser/element_hider_info.h | 44 +
|
||||
@@ -62,52 +62,52 @@ Based on Chromium 118.0.5993.48
|
||||
.../classifier/resource_classifier_impl.h | 64 +
|
||||
components/adblock/core/common/BUILD.gn | 110 ++
|
||||
.../adblock/core/common/adblock_constants.cc | 164 ++
|
||||
.../adblock/core/common/adblock_constants.h | 48 +
|
||||
.../adblock/core/common/adblock_constants.h | 47 +
|
||||
.../adblock/core/common/adblock_prefs.cc | 122 ++
|
||||
.../adblock/core/common/adblock_prefs.h | 46 +
|
||||
.../adblock/core/common/adblock_utils.cc | 171 ++
|
||||
.../adblock/core/common/adblock_utils.h | 80 +
|
||||
.../adblock/core/common/content_type.cc | 91 ++
|
||||
components/adblock/core/common/content_type.h | 48 +
|
||||
.../adblock/core/common/flatbuffer_data.cc | 94 ++
|
||||
.../adblock/core/common/flatbuffer_data.h | 85 +
|
||||
.../adblock/core/common/flatbuffer_data.cc | 105 ++
|
||||
.../adblock/core/common/flatbuffer_data.h | 90 ++
|
||||
.../adblock/core/common/header_filter_data.h | 38 +
|
||||
.../core/common/keyword_extractor_utils.cc | 30 +
|
||||
.../core/common/keyword_extractor_utils.cc | 29 +
|
||||
.../core/common/keyword_extractor_utils.h | 31 +
|
||||
.../core/common/regex_filter_pattern.cc | 34 +
|
||||
.../core/common/regex_filter_pattern.h | 33 +
|
||||
.../core/common/regex_filter_pattern.cc | 33 +
|
||||
.../core/common/regex_filter_pattern.h | 32 +
|
||||
components/adblock/core/common/sitekey.h | 29 +
|
||||
.../adblock/core/configuration/BUILD.gn | 59 +
|
||||
.../configuration/filtering_configuration.h | 90 ++
|
||||
.../configuration/filtering_configuration.h | 89 +
|
||||
.../filtering_configuration_prefs.cc | 33 +
|
||||
.../filtering_configuration_prefs.h | 30 +
|
||||
.../persistent_filtering_configuration.cc | 273 ++++
|
||||
.../persistent_filtering_configuration.h | 86 +
|
||||
components/adblock/core/converter/BUILD.gn | 83 +
|
||||
.../adblock/core/converter/converter_main.cc | 115 ++
|
||||
.../core/converter/flatbuffer_converter.cc | 134 ++
|
||||
.../core/converter/flatbuffer_converter.cc | 133 ++
|
||||
.../core/converter/flatbuffer_converter.h | 55 +
|
||||
.../adblock/core/converter/parser/BUILD.gn | 66 +
|
||||
.../core/converter/parser/content_filter.cc | 68 +
|
||||
.../core/converter/parser/content_filter.h | 50 +
|
||||
.../core/converter/parser/content_filter.h | 49 +
|
||||
.../core/converter/parser/domain_option.cc | 114 ++
|
||||
.../core/converter/parser/domain_option.h | 59 +
|
||||
.../core/converter/parser/domain_option.h | 57 +
|
||||
.../converter/parser/filter_classifier.cc | 39 +
|
||||
.../core/converter/parser/filter_classifier.h | 46 +
|
||||
.../core/converter/parser/filter_classifier.h | 45 +
|
||||
.../adblock/core/converter/parser/metadata.cc | 145 ++
|
||||
.../adblock/core/converter/parser/metadata.h | 64 +
|
||||
.../core/converter/parser/snippet_filter.cc | 62 +
|
||||
.../core/converter/parser/snippet_filter.h | 46 +
|
||||
.../converter/parser/snippet_tokenizer.cc | 103 ++
|
||||
.../core/converter/parser/snippet_tokenizer.h | 47 +
|
||||
.../core/converter/parser/snippet_tokenizer.h | 45 +
|
||||
.../core/converter/parser/url_filter.cc | 218 +++
|
||||
.../core/converter/parser/url_filter.h | 48 +
|
||||
.../converter/parser/url_filter_options.cc | 263 +++
|
||||
.../converter/parser/url_filter_options.h | 122 ++
|
||||
.../core/converter/serializer/BUILD.gn | 50 +
|
||||
.../serializer/filter_keyword_extractor.cc | 63 +
|
||||
.../serializer/filter_keyword_extractor.h | 59 +
|
||||
.../serializer/flatbuffer_serializer.cc | 394 +++++
|
||||
.../serializer/filter_keyword_extractor.h | 58 +
|
||||
.../serializer/flatbuffer_serializer.cc | 397 +++++
|
||||
.../serializer/flatbuffer_serializer.h | 129 ++
|
||||
.../core/converter/serializer/serializer.h | 41 +
|
||||
components/adblock/core/features.cc | 25 +
|
||||
@@ -120,33 +120,33 @@ Based on Chromium 118.0.5993.48
|
||||
components/adblock/core/subscription/BUILD.gn | 178 ++
|
||||
.../core/subscription/conversion_executors.h | 50 +
|
||||
.../core/subscription/domain_splitter.cc | 46 +
|
||||
.../core/subscription/domain_splitter.h | 45 +
|
||||
.../core/subscription/domain_splitter.h | 43 +
|
||||
.../filtering_configuration_maintainer.h | 52 +
|
||||
...filtering_configuration_maintainer_impl.cc | 489 ++++++
|
||||
.../filtering_configuration_maintainer_impl.h | 119 ++
|
||||
.../subscription/installed_subscription.cc | 42 +
|
||||
.../subscription/installed_subscription.h | 137 ++
|
||||
.../installed_subscription_impl.cc | 553 +++++++
|
||||
.../installed_subscription_impl.h | 150 ++
|
||||
.../installed_subscription_impl.cc | 552 +++++++
|
||||
.../installed_subscription_impl.h | 149 ++
|
||||
.../ongoing_subscription_request.h | 50 +
|
||||
.../ongoing_subscription_request_impl.cc | 190 +++
|
||||
.../ongoing_subscription_request_impl.h | 74 +
|
||||
.../core/subscription/pattern_matcher.cc | 265 +++
|
||||
.../core/subscription/pattern_matcher.cc | 264 +++
|
||||
.../core/subscription/pattern_matcher.h | 33 +
|
||||
.../preloaded_subscription_provider.h | 56 +
|
||||
.../preloaded_subscription_provider_impl.cc | 121 ++
|
||||
.../preloaded_subscription_provider_impl.cc | 120 ++
|
||||
.../preloaded_subscription_provider_impl.h | 50 +
|
||||
.../core/subscription/regex_matcher.cc | 162 ++
|
||||
.../adblock/core/subscription/regex_matcher.h | 73 +
|
||||
.../adblock/core/subscription/subscription.cc | 24 +
|
||||
.../adblock/core/subscription/subscription.h | 78 +
|
||||
.../subscription/subscription_collection.h | 98 ++
|
||||
.../subscription/subscription_collection.h | 97 ++
|
||||
.../subscription_collection_impl.cc | 353 ++++
|
||||
.../subscription_collection_impl.h | 97 ++
|
||||
.../core/subscription/subscription_config.cc | 338 ++++
|
||||
.../core/subscription/subscription_config.h | 120 ++
|
||||
.../subscription/subscription_downloader.h | 66 +
|
||||
.../subscription_downloader_impl.cc | 289 ++++
|
||||
.../subscription_downloader_impl.cc | 288 ++++
|
||||
.../subscription_downloader_impl.h | 102 ++
|
||||
.../subscription_persistent_metadata.h | 86 +
|
||||
.../subscription_persistent_metadata_impl.cc | 170 ++
|
||||
@@ -161,10 +161,10 @@ Based on Chromium 118.0.5993.48
|
||||
.../subscription/subscription_updater_impl.cc | 65 +
|
||||
.../subscription/subscription_updater_impl.h | 52 +
|
||||
.../subscription/subscription_validator.h | 59 +
|
||||
.../subscription_validator_impl.cc | 145 ++
|
||||
.../subscription_validator_impl.cc | 144 ++
|
||||
.../subscription_validator_impl.h | 53 +
|
||||
.../subscription/url_keyword_extractor.cc | 67 +
|
||||
.../core/subscription/url_keyword_extractor.h | 60 +
|
||||
.../core/subscription/url_keyword_extractor.h | 59 +
|
||||
.../adblock/docs/ad-filtering/README.md | 18 +
|
||||
.../ad-filtering/element-hiding-sequence.png | Bin 0 -> 177168 bytes
|
||||
.../ad-filtering/element-hiding-sequence.txt | 32 +
|
||||
@@ -223,7 +223,7 @@ Based on Chromium 118.0.5993.48
|
||||
tools/eyeo/generate_modules.sh | 209 +++
|
||||
tools/eyeo/snippets_deps.py | 61 +
|
||||
tools/gritsettings/resource_ids.spec | 9 +
|
||||
219 files changed, 22051 insertions(+), 3 deletions(-)
|
||||
219 files changed, 22050 insertions(+), 3 deletions(-)
|
||||
create mode 100644 components/adblock/CHANGELOG.md
|
||||
create mode 100644 components/adblock/LICENSE
|
||||
create mode 100644 components/adblock/README.md
|
||||
@@ -4511,7 +4511,7 @@ diff --git a/components/adblock/content/browser/element_hider_impl.cc b/componen
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/content/browser/element_hider_impl.cc
|
||||
@@ -0,0 +1,323 @@
|
||||
@@ -0,0 +1,326 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -4536,7 +4536,6 @@ new file mode 100644
|
||||
+#include "base/json/json_string_value_serializer.h"
|
||||
+#include "base/json/string_escape.h"
|
||||
+#include "base/logging.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
+#include "base/task/thread_pool.h"
|
||||
@@ -4587,6 +4586,9 @@ new file mode 100644
|
||||
+ std::vector<std::string_view>& input,
|
||||
+ std::string& output) {
|
||||
+ TRACE_EVENT1("eyeo", "GenerateStylesheet", "url", url.spec());
|
||||
+
|
||||
+ const base::span<std::string_view> selectors(input);
|
||||
+
|
||||
+ // Chromium's Blink engine supports only up to 8,192 simple selectors, and
|
||||
+ // even fewer compound selectors, in a rule. The exact number of selectors
|
||||
+ // that would work depends on their sizes (e.g. "#foo .bar" has a size of 2).
|
||||
@@ -4598,10 +4600,11 @@ new file mode 100644
|
||||
+ // this could still lead to some selectors not working on Chromium, but it is
|
||||
+ // highly unlikely.
|
||||
+ const size_t max_selector_count = 1024u;
|
||||
+ for (size_t i = 0; i < input.size(); i += max_selector_count) {
|
||||
+ const size_t batch_size = std::min(max_selector_count, input.size() - i);
|
||||
+ const base::span<std::string_view> selectors_batch(&input[i], batch_size);
|
||||
+ output += base::JoinString(selectors_batch, ", ") +
|
||||
+ for (size_t i = 0; i < input.size();
|
||||
+ i += max_selector_count) {
|
||||
+ const size_t batch_size = std::min(
|
||||
+ max_selector_count, input.size() - i);
|
||||
+ output += base::JoinString(selectors.subspan(i, batch_size), ", ") +
|
||||
+ " {display: none !important;}\n";
|
||||
+ }
|
||||
+}
|
||||
@@ -8896,7 +8899,7 @@ diff --git a/components/adblock/core/common/adblock_constants.h b/components/adb
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/adblock_constants.h
|
||||
@@ -0,0 +1,48 @@
|
||||
@@ -0,0 +1,47 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -8918,7 +8921,6 @@ new file mode 100644
|
||||
+#define COMPONENTS_ADBLOCK_CORE_COMMON_ADBLOCK_CONSTANTS_H_
|
||||
+
|
||||
+#include "base/auto_reset.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "url/gurl.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
@@ -9537,7 +9539,7 @@ diff --git a/components/adblock/core/common/flatbuffer_data.cc b/components/adbl
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/flatbuffer_data.cc
|
||||
@@ -0,0 +1,94 @@
|
||||
@@ -0,0 +1,105 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -9571,7 +9573,7 @@ new file mode 100644
|
||||
+// Destroys memory mapped to a file on disk, and optionally removes the file
|
||||
+// itself. Performs blocking operations, must run on a MayBlock() task runner.
|
||||
+void DestroyMemoryMappedFile(std::unique_ptr<base::MemoryMappedFile> memory,
|
||||
+ std::optional<base::FilePath> path_to_remove) {
|
||||
+ absl::optional<base::FilePath> path_to_remove) {
|
||||
+ memory.reset();
|
||||
+ // Deleting the file should happen *after* removing the memory mapping.
|
||||
+ if (path_to_remove) {
|
||||
@@ -9594,6 +9596,10 @@ new file mode 100644
|
||||
+ return data_.size();
|
||||
+}
|
||||
+
|
||||
+const base::span<const uint8_t> InMemoryFlatbufferData::span() const {
|
||||
+ return base::as_byte_span(data_);
|
||||
+}
|
||||
+
|
||||
+MemoryMappedFlatbufferData::MemoryMappedFlatbufferData(base::FilePath path)
|
||||
+ : permanently_remove_path_(false), path_(std::move(path)) {
|
||||
+ file_ = std::make_unique<base::MemoryMappedFile>();
|
||||
@@ -9605,7 +9611,7 @@ new file mode 100644
|
||||
+MemoryMappedFlatbufferData::~MemoryMappedFlatbufferData() {
|
||||
+ const auto path_to_remove =
|
||||
+ permanently_remove_path_.load()
|
||||
+ ? std::optional<base::FilePath>(std::move(path_))
|
||||
+ ? absl::optional<base::FilePath>(std::move(path_))
|
||||
+ : absl::nullopt;
|
||||
+ base::ThreadPool::PostTask(
|
||||
+ FROM_HERE, {base::MayBlock()},
|
||||
@@ -9627,6 +9633,13 @@ new file mode 100644
|
||||
+ return file_->length();
|
||||
+}
|
||||
+
|
||||
+const base::span<const uint8_t> MemoryMappedFlatbufferData::span() const {
|
||||
+ if (!file_) {
|
||||
+ return {};
|
||||
+ }
|
||||
+ return file_->bytes();
|
||||
+}
|
||||
+
|
||||
+void MemoryMappedFlatbufferData::PermanentlyRemoveSourceOnDestruction() {
|
||||
+ permanently_remove_path_.store(true);
|
||||
+}
|
||||
@@ -9636,7 +9649,7 @@ diff --git a/components/adblock/core/common/flatbuffer_data.h b/components/adblo
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/flatbuffer_data.h
|
||||
@@ -0,0 +1,85 @@
|
||||
@@ -0,0 +1,90 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -9675,6 +9688,7 @@ new file mode 100644
|
||||
+
|
||||
+ virtual const uint8_t* data() const = 0;
|
||||
+ virtual size_t size() const = 0;
|
||||
+ virtual const base::span<const uint8_t> span() const = 0;
|
||||
+
|
||||
+ // Schedules permanent removal of the data source of this flatbuffer when
|
||||
+ // |this| is destroyed. This can mean removing a file from disk or removing
|
||||
@@ -9688,8 +9702,10 @@ new file mode 100644
|
||||
+ public:
|
||||
+ explicit InMemoryFlatbufferData(std::string data);
|
||||
+ ~InMemoryFlatbufferData() override;
|
||||
+
|
||||
+ const uint8_t* data() const override;
|
||||
+ size_t size() const override;
|
||||
+ const base::span<const uint8_t> span() const override;
|
||||
+
|
||||
+ private:
|
||||
+ std::string data_;
|
||||
@@ -9704,8 +9720,10 @@ new file mode 100644
|
||||
+ // Ctor should be called on blocking task runner, performs file I/O/
|
||||
+ explicit MemoryMappedFlatbufferData(base::FilePath path);
|
||||
+ ~MemoryMappedFlatbufferData() override;
|
||||
+
|
||||
+ const uint8_t* data() const override;
|
||||
+ size_t size() const override;
|
||||
+ const base::span<const uint8_t> span() const override;
|
||||
+
|
||||
+ // Post cleanup of the mapped file to blocking task runner during destruction.
|
||||
+ void PermanentlyRemoveSourceOnDestruction() final;
|
||||
@@ -9769,7 +9787,7 @@ diff --git a/components/adblock/core/common/keyword_extractor_utils.cc b/compone
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/keyword_extractor_utils.cc
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -9788,7 +9806,6 @@ new file mode 100644
|
||||
+ */
|
||||
+
|
||||
+#include "components/adblock/core/common/keyword_extractor_utils.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+namespace utils {
|
||||
@@ -9825,7 +9842,7 @@ new file mode 100644
|
||||
+#ifndef COMPONENTS_ADBLOCK_CORE_COMMON_KEYWORD_EXTRACTOR_UTILS_H_
|
||||
+#define COMPONENTS_ADBLOCK_CORE_COMMON_KEYWORD_EXTRACTOR_UTILS_H_
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include <string_view>
|
||||
+
|
||||
+namespace adblock {
|
||||
+namespace utils {
|
||||
@@ -9840,7 +9857,7 @@ diff --git a/components/adblock/core/common/regex_filter_pattern.cc b/components
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/regex_filter_pattern.cc
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -9861,7 +9878,6 @@ new file mode 100644
|
||||
+#include "components/adblock/core/common/regex_filter_pattern.h"
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+
|
||||
@@ -9879,7 +9895,7 @@ diff --git a/components/adblock/core/common/regex_filter_pattern.h b/components/
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/common/regex_filter_pattern.h
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,32 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -9901,7 +9917,6 @@ new file mode 100644
|
||||
+#define COMPONENTS_ADBLOCK_CORE_COMMON_REGEX_FILTER_PATTERN_H_
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+
|
||||
@@ -10015,7 +10030,7 @@ diff --git a/components/adblock/core/configuration/filtering_configuration.h b/c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/configuration/filtering_configuration.h
|
||||
@@ -0,0 +1,90 @@
|
||||
@@ -0,0 +1,89 @@
|
||||
+
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
@@ -10039,7 +10054,6 @@ new file mode 100644
|
||||
+
|
||||
+#include <string>
|
||||
+#include "base/observer_list_types.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "url/gurl.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
@@ -10760,7 +10774,7 @@ diff --git a/components/adblock/core/converter/flatbuffer_converter.cc b/compone
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/flatbuffer_converter.cc
|
||||
@@ -0,0 +1,134 @@
|
||||
@@ -0,0 +1,133 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -10784,7 +10798,6 @@ new file mode 100644
|
||||
+#include <iostream>
|
||||
+
|
||||
+#include "base/logging.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_split.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "components/adblock/core/converter/parser/content_filter.h"
|
||||
@@ -11103,7 +11116,7 @@ diff --git a/components/adblock/core/converter/parser/content_filter.h b/compone
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/parser/content_filter.h
|
||||
@@ -0,0 +1,50 @@
|
||||
@@ -0,0 +1,49 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -11126,7 +11139,6 @@ new file mode 100644
|
||||
+
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "components/adblock/core/converter/parser/domain_option.h"
|
||||
+#include "components/adblock/core/converter/parser/filter_classifier.h"
|
||||
+#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -11277,7 +11289,7 @@ diff --git a/components/adblock/core/converter/parser/domain_option.h b/componen
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/parser/domain_option.h
|
||||
@@ -0,0 +1,59 @@
|
||||
@@ -0,0 +1,57 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -11301,8 +11313,6 @@ new file mode 100644
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+
|
||||
+class DomainOption {
|
||||
@@ -11385,7 +11395,7 @@ diff --git a/components/adblock/core/converter/parser/filter_classifier.h b/comp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/parser/filter_classifier.h
|
||||
@@ -0,0 +1,46 @@
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -11406,7 +11416,6 @@ new file mode 100644
|
||||
+#ifndef COMPONENTS_ADBLOCK_CORE_CONVERTER_PARSER_FILTER_CLASSIFIER_H_
|
||||
+#define COMPONENTS_ADBLOCK_CORE_CONVERTER_PARSER_FILTER_CLASSIFIER_H_
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
@@ -11881,7 +11890,7 @@ diff --git a/components/adblock/core/converter/parser/snippet_tokenizer.h b/comp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/parser/snippet_tokenizer.h
|
||||
@@ -0,0 +1,47 @@
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -11905,8 +11914,6 @@ new file mode 100644
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+
|
||||
+class SnippetTokenizer {
|
||||
@@ -12727,7 +12734,7 @@ diff --git a/components/adblock/core/converter/serializer/filter_keyword_extract
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/serializer/filter_keyword_extractor.h
|
||||
@@ -0,0 +1,59 @@
|
||||
@@ -0,0 +1,58 @@
|
||||
+
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
@@ -12752,7 +12759,6 @@ new file mode 100644
|
||||
+#include <string>
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "third_party/re2/src/re2/re2.h"
|
||||
+#include "url/gurl.h"
|
||||
+
|
||||
@@ -12791,7 +12797,7 @@ diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
@@ -0,0 +1,394 @@
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -12813,7 +12819,6 @@ new file mode 100644
|
||||
+
|
||||
+#include "base/logging.h"
|
||||
+#include "base/notreached.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "components/adblock/core/common/adblock_constants.h"
|
||||
+#include "components/adblock/core/common/regex_filter_pattern.h"
|
||||
@@ -12831,6 +12836,10 @@ new file mode 100644
|
||||
+
|
||||
+ size_t size() const override { return buffer_.size(); }
|
||||
+
|
||||
+ const base::span<const uint8_t> span() const override {
|
||||
+ return base::as_byte_span(buffer_);
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ flatbuffers::DetachedBuffer buffer_;
|
||||
+};
|
||||
@@ -14215,7 +14224,7 @@ diff --git a/components/adblock/core/subscription/domain_splitter.h b/components
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/domain_splitter.h
|
||||
@@ -0,0 +1,45 @@
|
||||
@@ -0,0 +1,43 @@
|
||||
+
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
@@ -14239,8 +14248,6 @@ new file mode 100644
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
+
|
||||
+// When constructed with a full domain like "aaa.bbb.ccc.com", subsequent calls
|
||||
@@ -15129,7 +15136,7 @@ diff --git a/components/adblock/core/subscription/installed_subscription_impl.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/installed_subscription_impl.cc
|
||||
@@ -0,0 +1,553 @@
|
||||
@@ -0,0 +1,552 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -15156,7 +15163,6 @@ new file mode 100644
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/logging.h"
|
||||
+#include "base/ranges/algorithm.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/trace_event/trace_event.h"
|
||||
+#include "components/adblock/core/common/adblock_constants.h"
|
||||
@@ -15687,7 +15693,7 @@ diff --git a/components/adblock/core/subscription/installed_subscription_impl.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/installed_subscription_impl.h
|
||||
@@ -0,0 +1,150 @@
|
||||
@@ -0,0 +1,149 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -15714,7 +15720,6 @@ new file mode 100644
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/memory/raw_ptr.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+
|
||||
+#include "components/adblock/core/common/flatbuffer_data.h"
|
||||
+#include "components/adblock/core/schema/filter_list_schema_generated.h"
|
||||
@@ -16171,7 +16176,7 @@ diff --git a/components/adblock/core/subscription/pattern_matcher.cc b/component
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/pattern_matcher.cc
|
||||
@@ -0,0 +1,265 @@
|
||||
@@ -0,0 +1,264 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -16195,7 +16200,6 @@ new file mode 100644
|
||||
+#include "base/logging.h"
|
||||
+#include "base/notreached.h"
|
||||
+#include "base/ranges/algorithm.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "components/adblock/core/common/regex_filter_pattern.h"
|
||||
+
|
||||
@@ -16540,7 +16544,7 @@ diff --git a/components/adblock/core/subscription/preloaded_subscription_provide
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/preloaded_subscription_provider_impl.cc
|
||||
@@ -0,0 +1,121 @@
|
||||
@@ -0,0 +1,120 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -16565,7 +16569,6 @@ new file mode 100644
|
||||
+#include "base/memory/scoped_refptr.h"
|
||||
+#include "base/ranges/algorithm.h"
|
||||
+#include "base/strings/pattern.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/trace_event/trace_event.h"
|
||||
+#include "components/adblock/core/common/adblock_utils.h"
|
||||
+#include "components/adblock/core/common/flatbuffer_data.h"
|
||||
@@ -17078,7 +17081,7 @@ diff --git a/components/adblock/core/subscription/subscription_collection.h b/co
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/subscription_collection.h
|
||||
@@ -0,0 +1,98 @@
|
||||
@@ -0,0 +1,97 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -17104,7 +17107,6 @@ new file mode 100644
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+#include "base/containers/span.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/values.h"
|
||||
+#include "components/adblock/core/common/content_type.h"
|
||||
+#include "components/adblock/core/common/header_filter_data.h"
|
||||
@@ -18180,7 +18182,7 @@ diff --git a/components/adblock/core/subscription/subscription_downloader_impl.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/subscription_downloader_impl.cc
|
||||
@@ -0,0 +1,289 @@
|
||||
@@ -0,0 +1,288 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -18211,7 +18213,6 @@ new file mode 100644
|
||||
+#include "base/strings/escape.h"
|
||||
+#include "base/strings/strcat.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "base/time/time.h"
|
||||
+#include "base/trace_event/trace_event.h"
|
||||
+#include "components/adblock/core/common/adblock_utils.h"
|
||||
@@ -19058,9 +19059,9 @@ new file mode 100644
|
||||
+ // conflicts are less likely than disk failure. The DCHECK is to express
|
||||
+ // intent.
|
||||
+ DCHECK(!base::PathExists(subscription_path));
|
||||
+ if (base::WriteFile(subscription_path,
|
||||
+ reinterpret_cast<const char*>(raw_data->data()),
|
||||
+ raw_data->size()) == -1) {
|
||||
+ if (!base::WriteFile(subscription_path,
|
||||
+ std::string_view(reinterpret_cast<const char*>(raw_data->data()),
|
||||
+ raw_data->size()))) {
|
||||
+ // Disk write failed.
|
||||
+ return std::make_pair(nullptr, base::FilePath{});
|
||||
+ }
|
||||
@@ -19939,7 +19940,7 @@ diff --git a/components/adblock/core/subscription/subscription_validator_impl.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/subscription_validator_impl.cc
|
||||
@@ -0,0 +1,145 @@
|
||||
@@ -0,0 +1,144 @@
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
+ * Copyright (C) 2006-present eyeo GmbH
|
||||
@@ -19975,8 +19976,7 @@ new file mode 100644
|
||||
+namespace {
|
||||
+
|
||||
+std::string ComputeSubscriptionHash(const FlatbufferData& buffer) {
|
||||
+ return base::Base64Encode(
|
||||
+ crypto::SHA256Hash(base::make_span(buffer.data(), buffer.size())));
|
||||
+ return base::Base64Encode(crypto::SHA256Hash(buffer.span()));
|
||||
+}
|
||||
+
|
||||
+// When the schema version used to create installed subscriptions is different
|
||||
@@ -20219,7 +20219,7 @@ diff --git a/components/adblock/core/subscription/url_keyword_extractor.h b/comp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/adblock/core/subscription/url_keyword_extractor.h
|
||||
@@ -0,0 +1,60 @@
|
||||
@@ -0,0 +1,59 @@
|
||||
+
|
||||
+/*
|
||||
+ * This file is part of eyeo Chromium SDK,
|
||||
@@ -20245,7 +20245,6 @@ new file mode 100644
|
||||
+
|
||||
+#include "absl/types/optional.h"
|
||||
+
|
||||
+#include "base/strings/string_piece.h"
|
||||
+#include "url/gurl.h"
|
||||
+
|
||||
+namespace adblock {
|
||||
|
||||
@@ -16,6 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/chrome_content_browser_client.cc | 32 +-
|
||||
.../domain_reliability/service_factory.cc | 33 +-
|
||||
chrome/browser/extensions/BUILD.gn | 1 -
|
||||
chrome/browser/feedback/BUILD.gn | 1 -
|
||||
.../log_sources/chrome_internal_log_source.cc | 5 -
|
||||
chrome/browser/first_run/first_run.cc | 8 -
|
||||
chrome/browser/google/BUILD.gn | 4 +-
|
||||
@@ -63,7 +64,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
...gled-chromium-no-special-hosts-domains.inc | 1 +
|
||||
net/base/url_util.cc | 25 +-
|
||||
services/network/network_context.cc | 2 +-
|
||||
56 files changed, 55 insertions(+), 853 deletions(-)
|
||||
57 files changed, 55 insertions(+), 854 deletions(-)
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
|
||||
@@ -381,6 +382,17 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL
|
||||
"//chrome/browser/image_decoder",
|
||||
"//chrome/browser/media/router",
|
||||
"//chrome/browser/media/router:media_router_feature",
|
||||
diff --git a/chrome/browser/feedback/BUILD.gn b/chrome/browser/feedback/BUILD.gn
|
||||
--- a/chrome/browser/feedback/BUILD.gn
|
||||
+++ b/chrome/browser/feedback/BUILD.gn
|
||||
@@ -100,7 +100,6 @@ source_set("feedback_impl") {
|
||||
"//chrome/browser/crash_upload_list",
|
||||
"//chrome/browser/devtools",
|
||||
"//chrome/browser/extensions",
|
||||
- "//chrome/browser/google",
|
||||
"//chrome/browser/profiles:profile",
|
||||
"//chrome/browser/sync",
|
||||
"//chrome/browser/sync:factories",
|
||||
diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
|
||||
--- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
|
||||
+++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
|
||||
|
||||
Reference in New Issue
Block a user