Patches for v125 (after build)

This commit is contained in:
Carmelo Messina
2024-05-15 15:22:50 +02:00
parent c455942d93
commit a622ae4b86
38 changed files with 900 additions and 845 deletions
+2 -3
View File
@@ -140,7 +140,6 @@ Re-introduce-override_build_timestamp.patch
enable-ftrivial-auto-var-init-zero.patch
disable-appending-variations-header.patch
Disable-idle-detection.patch
Allow-building-without-supervised-users.patch
Disable-minidump-upload-scheduling.patch
Revert-Permit-blocking-of-view-source.patch
Disable-safety-check.patch
@@ -237,8 +236,6 @@ Add-webRTC-site-settings.patch
Show-site-settings-for-cookies-javascript-and-ads.patch
Viewport-Protection-flag.patch
Revert-remove-allowscript-content-setting-secondary-url.patch
Revert-remove-allowimage-content-setting-secondary-url.patch
Temp-Alert-for-CC-revert.patch
Timezone-customization.patch
Change-popup-site-setting.patch
Disable-speechSynthesis-getVoices-API.patch
@@ -288,6 +285,8 @@ Enable-platform-aac-audio-and-h264-video.patch
Disable-Paint-Preview-by-default.patch
Do-not-use-Windows-ClearType-Text-Tuner-setting.patch
Private-network-access-content-settings.patch
Allow-building-without-supervised-users.patch
Keep-ComputePressure-disabled.patch
Temp-PerformanceNavigationTiming-privacy-fix.patch
Temp-disable-predictive-back-gesture.patch
@@ -66,7 +66,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/browser/profiles/profile_selections.cc | 10 ++
chrome/browser/profiles/profile_selections.h | 7 +-
.../browser/ui/android/native_page/BUILD.gn | 2 +
.../browser/ui/native_page/NativePage.java | 16 +-
.../browser/ui/native_page/NativePage.java | 23 ++-
.../strings/android_chrome_strings.grd | 31 ++++
.../browser/toolbar/LocationBarModel.java | 5 +-
chrome/browser/ui/messages/android/BUILD.gn | 1 +
@@ -85,7 +85,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../add-an-always-incognito-mode.inc | 3 +
.../add-an-always-incognito-mode.inc | 1 +
net/base/file_stream_context.cc | 2 +-
66 files changed, 777 insertions(+), 101 deletions(-)
66 files changed, 781 insertions(+), 104 deletions(-)
create mode 100644 chrome/android/java/res/xml/incognito_preferences.xml
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java
@@ -1820,6 +1820,15 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
+ != NativePageType.NONE;
}
/**
@@ -140,7 +144,7 @@ public interface NativePage {
* not have chrome or chrome-native scheme.
*/
static boolean isChromePageUrl(GURL url, boolean isIncognito) {
- return url != null && chromePageType(url, null, isIncognito) != NativePageType.NONE;
+ return url != null && chromePageType(url, null, isIncognito, /*isAlwaysIncognito*/false) != NativePageType.NONE;
}
/**
@@ -152,11 +156,12 @@ public interface NativePage {
*/
@@ -1836,7 +1845,20 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
}
/**
@@ -187,7 +192,7 @@ public interface NativePage {
@@ -167,9 +172,10 @@ public interface NativePage {
* @return Type of the native page defined in {@link NativePageType}.
*/
private static @NativePageType int nativePageType(
- GURL url, NativePage candidatePage, boolean isIncognito, boolean isPdf) {
+ GURL url, NativePage candidatePage, boolean isIncognito, boolean isPdf,
+ boolean isAlwaysIncognito) {
if (!isPdf) {
- return chromePageType(url, candidatePage, isIncognito);
+ return chromePageType(url, candidatePage, isIncognito, isAlwaysIncognito);
}
if (candidatePage != null && candidatePage.getUrl().equals(url.getSpec())) {
@@ -187,7 +193,7 @@ public interface NativePage {
* which do not have chrome or chrome-native scheme.
*/
private static @NativePageType int chromePageType(
@@ -1845,7 +1867,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
String host = url.getHost();
String scheme = url.getScheme();
if (!UrlConstants.CHROME_NATIVE_SCHEME.equals(scheme)
@@ -207,7 +212,8 @@ public interface NativePage {
@@ -207,7 +213,8 @@ public interface NativePage {
return NativePageType.DOWNLOADS;
} else if (UrlConstants.HISTORY_HOST.equals(host)) {
return NativePageType.HISTORY;
@@ -7,7 +7,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/android/java/res/menu/main_menu.xml | 7 ++
.../chrome/browser/ChromeTabbedActivity.java | 24 +++++++
.../browser/bookmarks/BookmarkBridge.java | 67 +++++++++++++++++++
.../bookmarks/android/bookmark_bridge.cc | 42 ++++++++++++
.../bookmarks/android/bookmark_bridge.cc | 44 +++++++++++-
.../bookmarks/android/bookmark_bridge.h | 8 +++
.../browser/bookmarks/bookmark_html_writer.cc | 11 ++-
.../dialogs/DownloadLocationCustomView.java | 4 +-
@@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
components/bookmarks/browser/bookmark_uuids.h | 1 +
components/bookmarks/browser/model_loader.cc | 8 ++-
.../bookmark_specifics_conversions.cc | 1 +
22 files changed, 240 insertions(+), 14 deletions(-)
22 files changed, 241 insertions(+), 15 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
@@ -220,6 +220,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc
--- a/chrome/browser/bookmarks/android/bookmark_bridge.cc
+++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc
@@ -180,7 +180,7 @@ class FileBookmarksExportObserver: public BookmarksExportObserver {
JNIEnv* env = AttachCurrentThread();
Java_BookmarkBridge_bookmarksExported(env, obj_, window_->GetJavaObject(),
- ConvertUTF8ToJavaString(env, export_path_),
+ base::android::ConvertUTF8ToJavaString(env, export_path_),
result == Result::kSuccess);
delete this;
}
@@ -396,6 +396,33 @@ void BookmarkBridge::GetImageUrlForBookmarkImpl(
std::move(callback).Run(GURL());
}
@@ -230,7 +239,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
+ const JavaParamRef<jobject>& url) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ GURL gurl = *url::GURLAndroid::ToNativeGURL(env, url);
+ GURL gurl = url::GURLAndroid::ToNativeGURL(env, url);
+
+ bookmarks::BookmarkModel* model =
+ BookmarkModelFactory::GetForBrowserContext(profile_);
@@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
.../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++
.../chrome/browser/app/ChromeActivity.java | 4 ++-
.../overlays/strip/StripLayoutHelper.java | 10 +++++--
.../strip/StripLayoutHelperManager.java | 8 ++++++
.../strip/StripLayoutHelperManager.java | 7 ++++-
.../browser/tasks/ReturnToChromeUtil.java | 4 ++-
.../chrome/browser/ui/RootUiCoordinator.java | 5 +++-
chrome/browser/preferences/BUILD.gn | 1 +
@@ -37,7 +37,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
.../res/xml/accessibility_preferences.xml | 5 ++++
.../AccessibilitySettingsDelegate.java | 11 ++++++++
.../chromium/ui/base/DeviceFormFactor.java | 9 ++++++
33 files changed, 173 insertions(+), 33 deletions(-)
33 files changed, 171 insertions(+), 34 deletions(-)
diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
--- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
@@ -278,16 +278,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
import org.chromium.ui.base.LocalizationUtils;
import org.chromium.ui.base.PageTransition;
import org.chromium.ui.base.WindowAndroid;
@@ -401,6 +402,13 @@ public class StripLayoutHelperManager
@@ -396,11 +397,15 @@ public class StripLayoutHelperManager
mIsLayoutOptimizationsEnabled =
ToolbarFeatures.isTabStripWindowLayoutOptimizationEnabled(true);
- mScrollableStripHeight = res.getDimension(R.dimen.tab_strip_height) / mDensity;
+ mScrollableStripHeight =
+ (DeviceFormFactor.isForceTabletUI()
+ ? res.getDimension(R.dimen.tab_strip_height_tabletui)
+ : res.getDimension(R.dimen.tab_strip_height_cromite)) / mDensity;
mHeight =
mIsLayoutOptimizationsEnabled
? toolbarManager.getTabStripHeightSupplier().get() / mDensity
: mScrollableStripHeight;
+
+ Resources res = context.getResources();
+ int tab_strip_height = (int) res.getDimension(R.dimen.control_container_height_cromite);
+ if (DeviceFormFactor.isForceTabletUI())
+ tab_strip_height = (int) res.getDimension(R.dimen.control_container_height_tabletui);
+ mHeight = tab_strip_height / mDensity;
+
mTopPadding = mHeight - mScrollableStripHeight;
+45 -4
View File
@@ -8,11 +8,52 @@ Add DuckDuckGo Lite
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../search_engines/prepopulated_engines.json | 31 +++++++++++++++++++
.../search_engine_countries-inc.cc | 3 ++
.../search_engines/search_engine_type.h | 5 +++
3 files changed, 39 insertions(+)
.../search_engine_choice/default_favicon.png | Bin 0 -> 903 bytes
...search_engine_choice_scaled_resources.grdp | 1 +
.../search_engines/prepopulated_engines.json | 31 ++++++++++++++++++
.../search_engine_countries-inc.cc | 3 ++
.../search_engines/search_engine_type.h | 5 +++
5 files changed, 40 insertions(+)
create mode 100644 components/resources/default_100_percent/search_engine_choice/default_favicon.png
diff --git a/components/resources/default_100_percent/search_engine_choice/default_favicon.png b/components/resources/default_100_percent/search_engine_choice/default_favicon.png
new file mode 100644
index 0000000000000000000000000000000000000000..6533419f2d6b40f7735054dec62c51ddf1ee1201
GIT binary patch
literal 903
zcmV;219<$2P)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm0009{Nkl<Zc-rk*
zHI&>u5dJaD%uTpU6K1Ny)MmAo?2~ki?Li;rI(@haGcz+YGo$8ZtH|rstmUBf-W*z<
z`LqMyjQ;vbR=naxn4FxTa$SOo%Y^Yq3CiCp`IM5k@HhA$JOj`EJVrBqK*>90<Y$Z!
zD&E1~9|C4N=Y0}PoKKzZ=aBLV-UaWB-0*4BX4X}1up41G3JAO#bVTDWd3iku6Hh={
zlma?HmsR5(hfh(b^FD*}4@!0sS4zV2hPiHTHz{QUr=p@EW3ne<xuXf?=gfeJ_n_0B
z@lJY|QARx>G)Ly==Qj#^Pm*zg`6NIm=nm~RX-}Ss_k_usva+)JncnmH^XI=4jNih$
zlz0y|WF4^Se4bG8m@v`L_#mWg6DB6I3T(&-X<X(aWBDC2?f1MT|2uB(BxS%X1$a%k
z;1;{ldEPHo!pWN$|21g&X`3k)RVSdZ`1-to+dxbxpx11tSFj1eY4p>FfHecpOCzcg
zpNwb+@DsmO2`6iI0DN;)MGkB;0q{--kR#0r9={VIfOiJ&qgPlcQV0O=qNN%EZUkK2
zXVWfZ`h5{40I)Gg`DG2UD<uwqtRPHQ`3e=w!vhePgFgO88URJiY>`5mlRG3V0I)IO
z^!VFvHvp@&1;F!4TUc<Tw?P23{124aYG2{<#pZ1%U*J~{i~%4NJtI_HQU19p>56LN
z%3gt$n(-Z(idK@zIi#qli66~IxloAGzuNPP+NSLfTs{_pT7f^J06kI9KUZ>A$&#d(
z+ZUd3gy@cNAuWhQ3vePzWtVK-4H5_<h_y6oOLkRNRsEA)yhw>iqgo-eCg3jF08o2(
zV+xr@B`n6nQmpYnUx3CSsDwu5Yyvoe1poxnZ<>do)Aj_?EW-9wQ^cQO=(N_*SpEcF
zA!n{N_=ZMrDQ)uj`{u@re$c++TFQW?-c&%T<H_NEl62(&6TL7nfTD(I>Jej=5G2dk
zc*-y0$13Q-mVE%=HZZcm54P~5#qa<$Vkc|B{qUnj<Z#y}04P$B=OI-_I^4yL*CEaE
zjS0pJfK7T{VJFY4st5f9G(|wnQru>jUSTzPpE5qa;Lv>bM_w_-mwYy_S=Aoxnl--Y
d#;<tA>kFnu^?NN9uE_uZ002ovPDHLkV1m60sc!%P
literal 0
HcmV?d00001
diff --git a/components/resources/search_engine_choice_scaled_resources.grdp b/components/resources/search_engine_choice_scaled_resources.grdp
--- a/components/resources/search_engine_choice_scaled_resources.grdp
+++ b/components/resources/search_engine_choice_scaled_resources.grdp
@@ -5,6 +5,7 @@
<if expr="_google_chrome">
<structure type="chrome_scaled_image" name="IDR_GOOGLE_COM_PNG" file="google_chrome/google_search_logo.png" />
</if>
+ <structure type="chrome_scaled_image" name="IDR_GOOGLEEN_PNG" file="search_engine_choice/default_favicon.png" />
<structure type="chrome_scaled_image" name="IDR_AR_YAHOO_COM_PNG" file="search_engine_choice/yahoo_com.png" />
<structure type="chrome_scaled_image" name="IDR_AT_YAHOO_COM_PNG" file="search_engine_choice/yahoo_com.png" />
<structure type="chrome_scaled_image" name="IDR_AU_YAHOO_COM_PNG" file="search_engine_choice/yahoo_com.png" />
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -396,7 +396,7 @@ diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/b
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1483,6 +1483,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info,
@@ -1481,6 +1481,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info,
}
}
@@ -416,7 +416,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile
void ProfileManager::DoFinalInitForServices(Profile* profile,
bool go_off_the_record) {
if (!do_final_services_init_ ||
@@ -2145,7 +2158,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) {
@@ -2141,7 +2154,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) {
Profile* original_profile = profile->GetOriginalProfile();
// Do nothing if the closed window is not the last window of the same profile.
for (Browser* browser_iter : *BrowserList::GetInstance()) {
@@ -24,12 +24,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
...Add-setting-to-invert-tap-and-long-tap.inc | 3 ++
...Add-setting-to-invert-tap-and-long-tap.inc | 1 +
.../renderer/core/html/html_anchor_element.cc | 36 +++++++++++++++----
.../renderer/core/html/html_anchor_element.h | 6 ++++
.../renderer/core/html/html_anchor_element.h | 7 +++-
.../renderer/core/html/html_image_element.cc | 17 +++++++++
.../renderer/core/html/html_image_element.h | 2 ++
.../core/page/context_menu_controller.cc | 32 ++++++++++++-----
.../core/page/context_menu_controller.cc | 33 ++++++++++++-----
.../core/page/context_menu_controller.h | 5 +--
21 files changed, 164 insertions(+), 19 deletions(-)
21 files changed, 165 insertions(+), 20 deletions(-)
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc
create mode 100644 cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc
@@ -401,22 +401,23 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_
AtomicString interestAction() const override;
void Trace(Visitor*) const override;
+ void HandleClick(Event&, bool do_not_show_context_menu = false);
+ void HandleClick(MouseEvent&, bool do_not_show_context_menu = false);
protected:
void ParseAttribute(const AttributeModificationParams&) override;
@@ -143,6 +144,11 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils {
@@ -143,7 +144,11 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils {
bool is_trusted,
base::TimeTicks platform_time_stamp,
KURL);
- void HandleClick(MouseEvent&);
+ void NavigateToHyperlink2(ResourceRequest,
+ NavigationPolicy,
+ bool is_trusted,
+ base::TimeTicks platform_time_stamp,
+ KURL, Event&, bool do_not_show_context_menu);
void HandleClick(MouseEvent&);
unsigned link_relations_ : 31;
mutable LinkHash cached_visited_link_hash_;
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc
--- a/third_party/blink/renderer/core/html/html_image_element.cc
+++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -503,14 +504,15 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t
// Displaying the context menu in this function is a big hack as we don't
// have context, i.e. whether this is being invoked via a script or in
// response to user input (Mouse event WM_RBUTTONDOWN,
@@ -476,6 +479,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
@@ -476,6 +479,16 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
if (!result.InnerNodeOrImageMapImage())
return false;
+ if (!do_not_show_context_menu &&
+ base::FeatureList::IsEnabled(features::kShowAlwaysContextMenuOnLinks)) {
+ if (auto* anchor_element = DynamicTo<HTMLAnchorElement>(result.URLElement())) {
+ Event event;
+ MouseEvent event;
+ event.SetTarget(mouse_event->target());
+ anchor_element->HandleClick(event, /*do_not_show_context_menu*/true);
+ return true;
+ }
@@ -519,7 +521,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t
// Clear any previously set cached results if we are resetting the hit test
// result.
image_selection_cached_result_ = nullptr;
@@ -830,11 +842,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
@@ -830,11 +843,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame,
SetAutofillData(result.InnerNode(), data);
SetPasswordManagerData(result.InnerElement(), data);
+5 -4
View File
@@ -36,7 +36,7 @@ Enabled by default
.../platform/graphics/bitmap_image_metrics.h | 4 +-
.../renderer/platform/image-decoders/BUILD.gn | 9 +
.../platform/image-decoders/image_decoder.cc | 23 +
.../image-decoders/jxl/jxl_image_decoder.cc | 684 ++++++++++++++++++
.../image-decoders/jxl/jxl_image_decoder.cc | 685 ++++++++++++++++++
.../image-decoders/jxl/jxl_image_decoder.h | 123 ++++
.../jxl/jxl_image_decoder_test.cc | 626 ++++++++++++++++
.../blink/tools/commit_stats/git-dirs.txt | 1 +
@@ -58,7 +58,7 @@ Enabled by default
.../libjxl/gen_headers/jxl/jxl_export.h | 11 +
tools/metrics/histograms/enums.xml | 1 +
.../histograms/metadata/blink/enums.xml | 2 +-
53 files changed, 1996 insertions(+), 17 deletions(-)
53 files changed, 1997 insertions(+), 17 deletions(-)
create mode 100644 build/linux/unbundle/libjxl.gn
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc
@@ -765,7 +765,7 @@ diff --git a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_de
new file mode 100644
--- /dev/null
+++ b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
@@ -0,0 +1,684 @@
@@ -0,0 +1,685 @@
+// Copyright 2021 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -1145,7 +1145,8 @@ new file mode 100644
+ JXL_COLOR_PROFILE_TARGET_DATA,
+ icc_profile.data(), icc_profile.size())) {
+ profile =
+ ColorProfile::Create(icc_profile.data(), icc_profile.size());
+ ColorProfile::Create(
+ base::span(icc_profile.data(), icc_profile.size()));
+ have_data_profile = true;
+
+ // Detect whether the ICC profile approximately equals PQ or HLG,
@@ -4,46 +4,33 @@ Subject: Allow building without supervised users
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/android/BUILD.gn | 1 -
chrome/android/chrome_java_sources.gni | 1 -
.../chrome/browser/feed/FeedSurfaceCoordinator.java | 5 +----
chrome/browser/BUILD.gn | 6 ------
chrome/browser/about_flags.cc | 2 ++
.../browser/extensions/api/settings_private/prefs_util.cc | 2 ++
chrome/browser/profiles/profile_impl.cc | 4 ++++
chrome/browser/profiles/profile_manager.cc | 4 ++++
chrome/browser/ui/webui/managed_ui_handler.cc | 2 ++
chrome/browser/ui/webui/management/management_ui_handler.cc | 2 ++
components/supervised_user/buildflags.gni | 4 +---
.../core/browser/supervised_user_pref_store.cc | 1 +
.../core/browser/supervised_user_preferences.cc | 2 +-
.../supervised_user/core/browser/supervised_user_utils.cc | 4 ++++
components/supervised_user/core/common/pref_names.h | 4 ++++
.../core/common/supervised_user_constants.cc | 2 ++
16 files changed, 30 insertions(+), 16 deletions(-)
chrome/android/BUILD.gn | 1 -
.../browser/feed/FeedSurfaceCoordinator.java | 5 +----
chrome/browser/BUILD.gn | 2 --
.../prefs/chrome_pref_service_factory.cc | 2 +-
.../profiles/profile_attributes_entry.cc | 2 +-
chrome/browser/profiles/profile_impl.cc | 5 +----
chrome/browser/profiles/profile_manager.cc | 20 -------------------
chrome/browser/ui/webui/managed_ui_handler.cc | 4 ----
.../webui/management/management_ui_handler.cc | 5 -----
.../browser/supervised_user_pref_store.cc | 1 +
.../browser/supervised_user_preferences.cc | 6 +++++-
.../core/browser/supervised_user_service.cc | 1 +
.../core/browser/supervised_user_utils.cc | 1 +
.../supervised_user/core/common/features.cc | 6 ++++++
14 files changed, 18 insertions(+), 43 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -3758,7 +3758,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java",
"java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSites.java",
"java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java",
- "java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java",
"java/src/org/chromium/chrome/browser/sync/TrustedVaultClient.java",
"java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java",
"java/src/org/chromium/chrome/browser/tab/TabFavicon.java",
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1084,7 +1084,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/suggestions/tile/TileGroupDelegateImpl.java",
"java/src/org/chromium/chrome/browser/suggestions/tile/TileRenderer.java",
"java/src/org/chromium/chrome/browser/suggestions/tile/TopSitesTileView.java",
- "java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java",
"java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java",
"java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java",
"java/src/org/chromium/chrome/browser/sync/TrustedVaultClient.java",
@@ -762,7 +762,6 @@ if (current_toolchain == default_toolchain) {
"//components/dom_distiller/core:distiller_type_java",
"//components/ntp_tiles:ntp_tiles_enums_java",
"//components/offline_pages/core:offline_page_model_enums_java",
- "//components/supervised_user/core/browser:supervised_user_utils_enum_javagen",
"//net:effective_connection_type_java",
]
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java
--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java
+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java
@@ -69,7 +56,7 @@ diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3227,8 +3227,6 @@ static_library("browser") {
@@ -3261,8 +3261,6 @@ static_library("browser") {
"feed/android/refresh_task_scheduler_impl.cc",
"feed/android/refresh_task_scheduler_impl.h",
"feed/android/web_feed_bridge.cc",
@@ -78,154 +65,118 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
"file_select_helper_contacts_android.cc",
"file_select_helper_contacts_android.h",
"first_run/android/first_run_prefs.cc",
@@ -3436,10 +3434,6 @@ static_library("browser") {
"ssl/chrome_security_state_model_delegate.h",
"ssl/known_interception_disclosure_infobar.cc",
"ssl/known_interception_disclosure_infobar.h",
- "supervised_user/android/favicon_fetcher.cc",
- "supervised_user/android/favicon_fetcher.h",
- "supervised_user/android/supervised_user_web_content_handler_impl.cc",
- "supervised_user/android/supervised_user_web_content_handler_impl.h",
"sync/glue/synced_tab_delegate_android.cc",
"sync/glue/synced_tab_delegate_android.h",
"sync/glue/synced_window_delegate_android.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -7957,6 +7957,7 @@ const FeatureEntry kFeatureEntries[] = {
#endif
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -328,7 +328,7 @@ void PrepareFactory(
policy::BrowserPolicyConnector* policy_connector) {
factory->SetManagedPolicies(policy_service, policy_connector);
factory->SetRecommendedPolicies(policy_service, policy_connector);
- if (supervised_user_settings) {
+ if (((false)) && supervised_user_settings) {
scoped_refptr<PrefStore> supervised_user_prefs =
base::MakeRefCounted<SupervisedUserPrefStore>(supervised_user_settings);
DCHECK(async || supervised_user_prefs->IsInitializationComplete());
diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc
--- a/chrome/browser/profiles/profile_attributes_entry.cc
+++ b/chrome/browser/profiles/profile_attributes_entry.cc
@@ -422,7 +422,7 @@ bool ProfileAttributesEntry::IsSigninRequired() const {
}
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
{"enable-family-link-extensions-permissions",
flag_descriptions::
kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName,
@@ -7966,6 +7967,7 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(
supervised_user::
kEnableExtensionsPermissionsForSupervisedUsersOnDesktop)},
+#endif
#endif
std::string ProfileAttributesEntry::GetSupervisedUserId() const {
- return GetString(kSupervisedUserId);
+ return "";
}
{"notification-scheduler", flag_descriptions::kNotificationSchedulerName,
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -1056,9 +1056,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
settings_api::PrefType::kBoolean;
#endif
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
(*s_allowlist)[::prefs::kSupervisedUserExtensionsMayRequestPermissions] =
settings_api::PrefType::kBoolean;
+#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
(*s_allowlist)[::prefs::kUseAshProxy] = settings_api::PrefType::kBoolean;
bool ProfileAttributesEntry::IsEphemeral() const {
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -690,10 +690,12 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) {
@@ -690,10 +690,6 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) {
prefs->SetTime(prefs::kProfileCreationTime, path_creation_time_);
pref_change_registrar_.Init(prefs);
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
pref_change_registrar_.Add(
prefs::kSupervisedUserId,
base::BindRepeating(&ProfileImpl::UpdateSupervisedUserIdInStorage,
base::Unretained(this)));
+#endif
- pref_change_registrar_.Add(
- prefs::kSupervisedUserId,
- base::BindRepeating(&ProfileImpl::UpdateSupervisedUserIdInStorage,
- base::Unretained(this)));
// Changes in the profile avatar.
pref_change_registrar_.Add(
@@ -1631,11 +1633,13 @@ GURL ProfileImpl::GetHomePage() {
@@ -1631,6 +1627,7 @@ GURL ProfileImpl::GetHomePage() {
}
void ProfileImpl::UpdateSupervisedUserIdInStorage() {
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
+ if ((true)) return;
ProfileManager* profile_manager = g_browser_process->profile_manager();
ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage()
.GetProfileAttributesWithPath(GetPath());
if (entry)
entry->SetSupervisedUserId(GetPrefs()->GetString(prefs::kSupervisedUserId));
+#endif
}
void ProfileImpl::UpdateNameInStorage() {
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1214,6 +1214,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
@@ -1214,23 +1214,6 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
profile->GetPrefs()->SetString(prefs::kProfileName, profile_name);
}
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
bool force_supervised_user_id =
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -1231,6 +1232,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
supervised_user_id);
}
+#endif
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- bool force_supervised_user_id =
-#if BUILDFLAG(IS_CHROMEOS_ASH)
- !ash::IsSigninBrowserContext(profile) &&
- !ash::IsLockScreenAppBrowserContext(profile) &&
-#endif
- command_line->HasSwitch(switches::kSupervisedUserId);
-
- if (force_supervised_user_id) {
- supervised_user_id =
- command_line->GetSwitchValueASCII(switches::kSupervisedUserId);
- }
- if (force_supervised_user_id ||
- !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) {
- profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
- supervised_user_id);
- }
#if !BUILDFLAG(IS_ANDROID)
if (profile->IsNewProfile()) {
profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false);
@@ -2025,8 +2027,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) {
@@ -2038,9 +2021,6 @@ void ProfileManager::AddProfileToStorage(Profile* profile) {
init_params.icon_index =
profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex);
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
init_params.supervised_user_id =
profile->GetPrefs()->GetString(prefs::kSupervisedUserId);
+#endif
- init_params.supervised_user_id =
- profile->GetPrefs()->GetString(prefs::kSupervisedUserId);
-
#if BUILDFLAG(IS_CHROMEOS_ASH)
user_manager::User* user =
ash::ProfileHelper::Get()->GetUserByProfile(profile);
diff --git a/chrome/browser/ui/webui/managed_ui_handler.cc b/chrome/browser/ui/webui/managed_ui_handler.cc
--- a/chrome/browser/ui/webui/managed_ui_handler.cc
+++ b/chrome/browser/ui/webui/managed_ui_handler.cc
@@ -90,9 +90,11 @@ void ManagedUIHandler::AddObservers() {
@@ -89,10 +89,6 @@ void ManagedUIHandler::AddObservers() {
auto domain = static_cast<policy::PolicyDomain>(i);
policy_service->AddObserver(domain, this);
}
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
pref_registrar_.Add(prefs::kSupervisedUserId,
base::BindRepeating(&ManagedUIHandler::NotifyIfChanged,
base::Unretained(this)));
+#endif
-
- pref_registrar_.Add(prefs::kSupervisedUserId,
- base::BindRepeating(&ManagedUIHandler::NotifyIfChanged,
- base::Unretained(this)));
}
void ManagedUIHandler::RemoveObservers() {
diff --git a/chrome/browser/ui/webui/management/management_ui_handler.cc b/chrome/browser/ui/webui/management/management_ui_handler.cc
--- a/chrome/browser/ui/webui/management/management_ui_handler.cc
+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
@@ -1496,10 +1496,12 @@ void ManagementUIHandler::AddObservers() {
@@ -1496,11 +1496,6 @@ void ManagementUIHandler::AddObservers() {
pref_registrar_.Init(profile->GetPrefs());
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
pref_registrar_.Add(
prefs::kSupervisedUserId,
base::BindRepeating(&ManagementUIHandler::UpdateManagedState,
base::Unretained(this)));
+#endif
- pref_registrar_.Add(
- prefs::kSupervisedUserId,
- base::BindRepeating(&ManagementUIHandler::UpdateManagedState,
- base::Unretained(this)));
-
#if BUILDFLAG(IS_CHROMEOS_ASH)
pref_registrar_.Add(
diff --git a/components/supervised_user/buildflags.gni b/components/supervised_user/buildflags.gni
--- a/components/supervised_user/buildflags.gni
+++ b/components/supervised_user/buildflags.gni
@@ -4,7 +4,5 @@
declare_args() {
# Enables supervision for Family Link users.
- enable_supervised_users =
- # Platforms which fully support supervision features:
- is_android || is_chromeos || is_ios || is_linux || is_mac || is_win
+ enable_supervised_users = false
}
plugin_vm::prefs::kPluginVmDataCollectionAllowed,
diff --git a/components/supervised_user/core/browser/supervised_user_pref_store.cc b/components/supervised_user/core/browser/supervised_user_pref_store.cc
--- a/components/supervised_user/core/browser/supervised_user_pref_store.cc
+++ b/components/supervised_user/core/browser/supervised_user_pref_store.cc
@@ -240,7 +191,18 @@ diff --git a/components/supervised_user/core/browser/supervised_user_pref_store.
diff --git a/components/supervised_user/core/browser/supervised_user_preferences.cc b/components/supervised_user/core/browser/supervised_user_preferences.cc
--- a/components/supervised_user/core/browser/supervised_user_preferences.cc
+++ b/components/supervised_user/core/browser/supervised_user_preferences.cc
@@ -184,7 +184,7 @@ bool IsSafeSitesEnabled(const PrefService& pref_service) {
@@ -162,6 +162,10 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
}
void EnableParentalControls(PrefService& pref_service) {
+ if ((true)) {
+ DisableParentalControls(pref_service);
+ return;
+ }
pref_service.SetString(prefs::kSupervisedUserId,
supervised_user::kChildAccountSUID);
SetIsChildAccountStatusKnown(pref_service);
@@ -184,7 +188,7 @@ bool IsSafeSitesEnabled(const PrefService& pref_service) {
}
bool IsSubjectToParentalControls(const PrefService& pref_service) {
@@ -249,63 +211,40 @@ diff --git a/components/supervised_user/core/browser/supervised_user_preferences
}
bool AreExtensionsPermissionsEnabled(const PrefService& pref_service) {
diff --git a/components/supervised_user/core/browser/supervised_user_service.cc b/components/supervised_user/core/browser/supervised_user_service.cc
--- a/components/supervised_user/core/browser/supervised_user_service.cc
+++ b/components/supervised_user/core/browser/supervised_user_service.cc
@@ -189,6 +189,7 @@ FirstTimeInterstitialBannerState SupervisedUserService::GetUpdatedBannerState(
}
void SupervisedUserService::SetActive(bool active) {
+ active = false;
if (active_ == active) {
return;
}
diff --git a/components/supervised_user/core/browser/supervised_user_utils.cc b/components/supervised_user/core/browser/supervised_user_utils.cc
--- a/components/supervised_user/core/browser/supervised_user_utils.cc
+++ b/components/supervised_user/core/browser/supervised_user_utils.cc
@@ -99,11 +99,15 @@ GURL NormalizeUrl(const GURL& url) {
@@ -99,6 +99,7 @@ GURL NormalizeUrl(const GURL& url) {
}
bool AreWebFilterPrefsDefault(const PrefService& pref_service) {
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
+ if ((true)) return true;
return pref_service
.FindPreference(prefs::kDefaultSupervisedUserFilteringBehavior)
->IsDefaultValue() ||
pref_service.FindPreference(prefs::kSupervisedUserSafeSites)
->IsDefaultValue();
+#else
+ return true;
+#endif
diff --git a/components/supervised_user/core/common/features.cc b/components/supervised_user/core/common/features.cc
--- a/components/supervised_user/core/common/features.cc
+++ b/components/supervised_user/core/common/features.cc
@@ -122,4 +122,10 @@ bool IsShadowKidsApiWithSafeSitesEnabled() {
return base::FeatureList::IsEnabled(kShadowKidsApiWithSafeSites);
}
bool EmitLogRecordHistograms(
diff --git a/components/supervised_user/core/common/pref_names.h b/components/supervised_user/core/common/pref_names.h
--- a/components/supervised_user/core/common/pref_names.h
+++ b/components/supervised_user/core/common/pref_names.h
@@ -5,8 +5,10 @@
#ifndef COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
#define COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
+#include "components/supervised_user/core/common/buildflags.h"
#include "extensions/buildflags/buildflags.h"
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
namespace prefs {
// A bool pref that keeps whether the child status for this profile was already
@@ -151,4 +153,6 @@ inline constexpr char kSupervisedUserLocallyParentApprovedExtensions[] =
} // namespace prefs
+#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
+
#endif // COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
diff --git a/components/supervised_user/core/common/supervised_user_constants.cc b/components/supervised_user/core/common/supervised_user_constants.cc
--- a/components/supervised_user/core/common/supervised_user_constants.cc
+++ b/components/supervised_user/core/common/supervised_user_constants.cc
@@ -69,6 +69,7 @@ const char kChromeOSAvatarIndex[] = "chromeos-avatar-index";
const char kChromeOSPasswordData[] = "chromeos-password-data";
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
const char* const kCustodianInfoPrefs[] = {
prefs::kSupervisedUserCustodianName,
prefs::kSupervisedUserCustodianEmail,
@@ -81,6 +82,7 @@ const char* const kCustodianInfoPrefs[] = {
prefs::kSupervisedUserSecondCustodianProfileURL,
prefs::kSupervisedUserSecondCustodianProfileImageURL,
};
+SET_CROMITE_FEATURE_DISABLED(kKidFriendlyContentFeed);
+SET_CROMITE_FEATURE_DISABLED(kLocalWebApprovals);
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+SET_CROMITE_FEATURE_DISABLED(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop);
+#endif
const base::FilePath::CharType kSupervisedUserSettingsFilename[] =
FILE_PATH_LITERAL("Managed Mode Settings");
+
} // namespace supervised_user
--
+5 -89
View File
@@ -25,8 +25,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/browser/endpoint_fetcher/BUILD.gn | 32 ++
chrome/browser/endpoint_fetcher/DEPS | 3 +
chrome/browser/endpoint_fetcher/OWNERS | 1 +
.../endpoint_fetcher_android.cc | 184 ++++++++++++
.../endpoint_fetcher/EndpointFetcher.java | 165 +++++++++++
.../endpoint_fetcher_android.cc | 149 ++++++++++
.../endpoint_fetcher/EndpointFetcher.java | 116 ++++++++
.../EndpointHeaderResponse.java | 31 ++
.../endpoint_fetcher/EndpointResponse.java | 30 ++
.../flags/android/chrome_feature_list.cc | 1 +
@@ -36,7 +36,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../endpoint_fetcher/endpoint_fetcher.h | 23 +-
.../Bromite-auto-updater.inc | 3 +
.../Bromite-auto-updater.inc | 1 +
28 files changed, 1273 insertions(+), 52 deletions(-)
28 files changed, 1189 insertions(+), 52 deletions(-)
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java
@@ -1182,7 +1182,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc b/chrom
new file mode 100644
--- /dev/null
+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc
@@ -0,0 +1,184 @@
@@ -0,0 +1,149 @@
+// Copyright 2019 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -1279,41 +1279,6 @@ new file mode 100644
+ std::move(endpoint_fetcher)));
+}
+
+static void JNI_EndpointFetcher_NativeFetchChromeAPIKey(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jprofile,
+ const base::android::JavaParamRef<jstring>& jurl,
+ const base::android::JavaParamRef<jstring>& jhttps_method,
+ const base::android::JavaParamRef<jstring>& jcontent_type,
+ const base::android::JavaParamRef<jstring>& jpost_data,
+ jlong jtimeout,
+ const base::android::JavaParamRef<jobjectArray>& jheaders,
+ jint jannotation_hash_code,
+ const base::android::JavaParamRef<jobject>& jcallback) {
+ std::vector<std::string> headers;
+ base::android::AppendJavaStringArrayToStringVector(env, jheaders, &headers);
+ auto endpoint_fetcher = std::make_unique<EndpointFetcher>(
+ ProfileAndroid::FromProfileAndroid(jprofile)
+ ->GetDefaultStoragePartition()
+ ->GetURLLoaderFactoryForBrowserProcess(),
+ GURL(base::android::ConvertJavaStringToUTF8(env, jurl)),
+ base::android::ConvertJavaStringToUTF8(env, jhttps_method),
+ base::android::ConvertJavaStringToUTF8(env, jcontent_type),
+ base::Milliseconds(jtimeout),
+ base::android::ConvertJavaStringToUTF8(env, jpost_data), headers,
+ net::NetworkTrafficAnnotationTag::FromJavaAnnotation(
+ jannotation_hash_code),
+ chrome::GetChannel() == version_info::Channel::STABLE);
+ auto* const endpoint_fetcher_ptr = endpoint_fetcher.get();
+ endpoint_fetcher_ptr->PerformRequest(
+ base::BindOnce(&OnEndpointFetcherComplete,
+ base::android::ScopedJavaGlobalRef<jobject>(jcallback),
+ // unique_ptr endpoint_fetcher is passed until the callback
+ // to ensure its lifetime across the request.
+ std::move(endpoint_fetcher)),
+ nullptr);
+}
+
+static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jprofile,
@@ -1371,7 +1336,7 @@ diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browse
new file mode 100644
--- /dev/null
+++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
@@ -0,0 +1,165 @@
@@ -0,0 +1,116 @@
+// Copyright 2019 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -1440,44 +1405,6 @@ new file mode 100644
+ callback);
+ }
+
+ /**
+ * Calls an endpoint using Chrome API Key returns the response via a callback
+ * @param callback to pass the response back in
+ * @param profile via which the endpoint is called
+ * @param url endpoint URL called
+ * @param httpsMethod the HTTPS method used e.g. "GET" or "POST"
+ * @param contentType the content type e.g. "application/json"
+ * @param postData data for a "POST" request
+ * @param timeout time after which the request will terminate in the event a response hasn't
+ * been received
+ * @param headers headers for the request. Key/value pairs are stored sequentially in the array.
+ */
+ @MainThread
+ public static void fetchUsingChromeAPIKey(
+ Callback<EndpointResponse> callback,
+ Profile profile,
+ String url,
+ String httpsMethod,
+ String contentType,
+ String postData,
+ long timeout,
+ String[] headers,
+ NetworkTrafficAnnotationTag annotation) {
+ // EndpointFetcher currently does not support incognito mode
+ // assert !profile.isOffTheRecord();
+ EndpointFetcherJni.get()
+ .nativeFetchChromeAPIKey(
+ profile,
+ url,
+ httpsMethod,
+ contentType,
+ postData,
+ timeout,
+ headers,
+ annotation.getHashCode(),
+ callback);
+ }
+
+ @MainThread
+ public static void nativeHeadWithNoAuth(
+ Callback<EndpointHeaderResponse> callback, Profile profile,
@@ -1510,17 +1437,6 @@ new file mode 100644
+ int annotationHashCode,
+ Callback<EndpointResponse> callback);
+
+ void nativeFetchChromeAPIKey(
+ Profile profile,
+ String url,
+ String httpsMethod,
+ String contentType,
+ String postData,
+ long timeout,
+ String[] headers,
+ int annotationHashCode,
+ Callback<EndpointResponse> callback);
+
+ void nativeFetchWithNoAuth(
+ Profile profile,
+ String url,
@@ -29,7 +29,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/browser/browser_process_impl.cc | 21 ++
chrome/browser/browser_process_impl.h | 2 +
chrome/browser/chrome_browser_main.cc | 3 +
chrome/browser/flags/BUILD.gn | 4 +
chrome/browser/flags/BUILD.gn | 3 +
.../flags/android/adblock_native_gateway.cc | 31 ++
.../browser/flags/AdBlockNativeGateway.java | 30 ++
.../net/system_network_context_manager.cc | 8 +
@@ -44,15 +44,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../component_updater/download_filters_task.h | 129 ++++++++
...ent_subresource_filter_throttle_manager.cc | 15 +
...tent_subresource_filter_throttle_manager.h | 2 +
.../content/shared/browser/ruleset_service.cc | 43 ++-
.../content/shared/browser/ruleset_service.h | 7 +-
.../content/shared/browser/ruleset_service.cc | 46 ++-
.../content/shared/browser/ruleset_service.h | 8 +-
.../unindexed_ruleset_stream_generator.cc | 3 +
.../core/browser/ruleset_version.h | 4 +
.../browser/subresource_filter_features.cc | 116 +-------
.../core/browser/verified_ruleset_dealer.cc | 3 +
.../core/common/indexed_ruleset.cc | 5 +-
.../Bromite-subresource-adblocker.inc | 3 +
40 files changed, 1255 insertions(+), 127 deletions(-)
40 files changed, 1259 insertions(+), 126 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
@@ -582,18 +582,15 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureMap.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeSessionState.java",
@@ -33,8 +34,10 @@ android_library("java") {
@@ -33,6 +34,7 @@ android_library("java") {
generate_jni("jni_headers") {
sources = [ "android/java/src/org/chromium/chrome/browser/flags/CromiteNativeUtils.java" ]
sources += [
+ "android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureMap.java",
"android/java/src/org/chromium/chrome/browser/flags/ChromeSessionState.java",
+ "android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java",
]
}
@@ -47,6 +50,7 @@ static_library("flags_android") {
@@ -47,6 +49,7 @@ static_library("flags_android") {
"android/chrome_session_state.cc",
"android/chrome_session_state.h",
]
@@ -1106,7 +1103,7 @@ new file mode 100644
+#include "components/component_updater/update_scheduler.h"
+#include "url/gurl.h"
+#include "components/component_updater/download_filters_task.h"
+#include "components/subresource_filter/content/browser/ruleset_service.h"
+#include "components/subresource_filter/content/shared/browser/ruleset_service.h"
+#include "services/network/public/cpp/shared_url_loader_factory.h"
+
+namespace adblock_updater {
@@ -1652,11 +1649,15 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
return;
}
@@ -267,6 +271,18 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -267,6 +271,23 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
const RulesetConfig& config,
const base::FilePath& indexed_ruleset_base_dir,
const UnindexedRulesetInfo& unindexed_ruleset_info) {
+ IndexedRulesetVersion version = IndexAndWriteRulesetInternal(indexed_ruleset_base_dir, unindexed_ruleset_info);
+ IndexedRulesetVersion version =
+ IndexAndWriteRulesetInternal(
+ config,
+ indexed_ruleset_base_dir,
+ unindexed_ruleset_info);
+ // cleanup temporary file when done
+ if (unindexed_ruleset_info.delete_ruleset_path) {
+ base::DeleteFile(unindexed_ruleset_info.ruleset_path);
@@ -1666,12 +1667,13 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
+
+// static
+IndexedRulesetVersion RulesetService::IndexAndWriteRulesetInternal(
+ const RulesetConfig& config,
+ const base::FilePath& indexed_ruleset_base_dir,
+ const UnindexedRulesetInfo& unindexed_ruleset_info) {
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::MAY_BLOCK);
@@ -274,6 +290,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -274,6 +295,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
unindexed_ruleset_info);
if (!unindexed_ruleset_stream_generator.ruleset_stream()) {
@@ -1679,7 +1681,7 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
RecordIndexAndWriteRulesetResult(
IndexAndWriteRulesetResult::FAILED_OPENING_UNINDEXED_RULESET);
return IndexedRulesetVersion(config.filter_tag);
@@ -287,6 +304,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -287,6 +309,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
indexed_ruleset_base_dir, indexed_version);
if (!base::CreateDirectory(indexed_ruleset_version_dir)) {
@@ -1687,7 +1689,7 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
RecordIndexAndWriteRulesetResult(
IndexAndWriteRulesetResult::FAILED_CREATING_VERSION_DIR);
return IndexedRulesetVersion(config.filter_tag);
@@ -294,12 +312,11 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -294,12 +317,11 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
SentinelFile sentinel_file(indexed_ruleset_version_dir);
if (sentinel_file.IsPresent()) {
@@ -1702,7 +1704,7 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
RecordIndexAndWriteRulesetResult(
IndexAndWriteRulesetResult::FAILED_CREATING_SENTINEL_FILE);
return IndexedRulesetVersion(config.filter_tag);
@@ -312,6 +329,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -312,6 +334,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
RulesetIndexer indexer;
if (!(*g_index_ruleset_func)(&unindexed_ruleset_stream_generator, &indexer)) {
@@ -1710,22 +1712,21 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
RecordIndexAndWriteRulesetResult(
IndexAndWriteRulesetResult::FAILED_PARSING_UNINDEXED_RULESET);
return IndexedRulesetVersion(config.filter_tag);
@@ -329,8 +347,12 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
@@ -329,8 +352,12 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
WriteRuleset(indexed_ruleset_version_dir,
unindexed_ruleset_info.license_path, indexer.data());
RecordIndexAndWriteRulesetResult(result);
- if (result != IndexAndWriteRulesetResult::SUCCESS)
- return IndexedRulesetVersion(config.filter_tag);
+ if (result != IndexAndWriteRulesetResult::SUCCESS) {
+ LOG(INFO) << "RulesetService: failed to index.";
+ return IndexedRulesetVersion(kSafeBrowsingFilterTag);
return IndexedRulesetVersion(config.filter_tag);
+ }
+
+ LOG(INFO) << "RulesetService: successful parsing.";
DCHECK(indexed_version.IsValid());
return indexed_version;
@@ -452,6 +474,7 @@ void RulesetService::IndexAndStoreRuleset(
@@ -452,6 +479,7 @@ void RulesetService::IndexAndStoreRuleset(
void RulesetService::OnWrittenRuleset(WriteRulesetCallback result_callback,
const IndexedRulesetVersion& version) {
DCHECK(!result_callback.is_null());
@@ -1745,12 +1746,13 @@ diff --git a/components/subresource_filter/content/shared/browser/ruleset_servic
// Get the ruleset version associated with the current local_state_.
IndexedRulesetVersion GetMostRecentlyIndexedVersion() const;
@@ -219,6 +219,11 @@ class RulesetService {
@@ -219,6 +219,12 @@ class RulesetService {
const base::FilePath& indexed_ruleset_base_dir,
const UnindexedRulesetInfo& unindexed_ruleset_info);
+ // internal function used to wrap the temporary file deletion for unindexed rulesets
+ static IndexedRulesetVersion IndexAndWriteRulesetInternal(
+ const RulesetConfig& config,
+ const base::FilePath& indexed_ruleset_base_dir,
+ const UnindexedRulesetInfo& unindexed_ruleset_info);
+
@@ -12,9 +12,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
components/blocked_content_strings.grdp | 3 +
.../impl/BromitePopupContentSetting.java | 106 ++++++++++++++++++
.../bromite_content_settings/popups.grdp | 12 ++
.../bromite_content_settings/popups.inc | 7 ++
.../bromite_content_settings/popups.inc | 8 ++
.../core/browser/content_settings_registry.cc | 2 +-
8 files changed, 151 insertions(+), 3 deletions(-)
8 files changed, 152 insertions(+), 3 deletions(-)
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromitePopupContentSetting.java
create mode 100644 components/browser_ui/strings/bromite_content_settings/popups.grdp
create mode 100644 components/content_settings/core/browser/bromite_content_settings/popups.inc
@@ -239,11 +239,12 @@ diff --git a/components/content_settings/core/browser/bromite_content_settings/p
new file mode 100644
--- /dev/null
+++ b/components/content_settings/core/browser/bromite_content_settings/popups.inc
@@ -0,0 +1,7 @@
@@ -0,0 +1,8 @@
+ content_settings::WebsiteSettingsRegistry::GetInstance()
+ ->GetMutable(ContentSettingsType::POPUPS)
+ ->set_show_into_info_page()
+ .set_desktop_ui()
+ .set_is_renderer_content_setting()
+ .set_allowed_ui(IDS_WEBSITE_SETTINGS_CATEGORY_POPUP_ALLOWED)
+ .set_ask_ui(IDS_WEBSITE_SETTINGS_CATEGORY_POPUP_BLOCK_ALL)
+ .set_blocked_ui(IDS_WEBSITE_SETTINGS_CATEGORY_POPUP_BLOCKED);
@@ -12,6 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
Require: bromite-build-utils.patch
---
.../ChromeSiteSettingsDelegate.java | 17 +-
...page_specific_content_settings_delegate.cc | 2 +-
.../settings/privacy_page/privacy_page.html | 1 +
.../settings/privacy_page/privacy_page.ts | 77 +++-
chrome/browser/resources/settings/route.ts | 2 +
@@ -65,24 +66,24 @@ Require: bromite-build-utils.patch
.../core/browser/website_settings_registry.h | 1 +
.../content_settings/core/common/BUILD.gn | 7 +
.../bromite_content_settings/placeholder.txt | 1 +
.../core/common/content_settings.cc | 20 +
.../core/common/content_settings.h | 10 +
.../core/common/content_settings.cc | 31 +-
.../core/common/content_settings.h | 12 +
.../core/common/content_settings.mojom | 6 +
.../common/content_settings_mojom_traits.cc | 12 +-
.../common/content_settings_mojom_traits.h | 24 +
.../core/common/content_settings_types.mojom | 1 +
.../renderer/content_settings_agent_impl.cc | 33 ++
.../renderer/content_settings_agent_impl.h | 5 +
.../renderer/content_settings_agent_impl.cc | 45 +-
.../renderer/content_settings_agent_impl.h | 9 +-
.../PageInfoPermissionsController.java | 9 +
.../PermissionParamsListBuilder.java | 1 +
.../android/page_info_controller_android.cc | 18 +
components/page_info/page_info.cc | 23 +-
components/page_info/page_info_ui.cc | 18 +
components/site_settings_strings.grdp | 1 +
.../platform/web_content_settings_client.h | 5 +
.../platform/web_content_settings_client.h | 9 +
.../execution_context/execution_context.cc | 16 +
.../execution_context/execution_context.h | 5 +
71 files changed, 1837 insertions(+), 89 deletions(-)
72 files changed, 1866 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
@@ -134,6 +135,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C
@Override
public boolean canLaunchClearBrowsingDataDialog() {
return true;
diff --git a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
--- a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
+++ b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
@@ -163,7 +163,7 @@ namespace {
void GetGuestViewDefaultContentSettingRules(
bool incognito,
RendererContentSettingRules* rules) {
- rules->mixed_content_rules.clear();
+ rules->mixed_content_rules.clear(); // do not remove
rules->mixed_content_rules.push_back(ContentSettingPatternSource(
ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK),
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -2932,7 +2945,7 @@ new file mode 100644
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
--- a/components/content_settings/core/common/content_settings.cc
+++ b/components/content_settings/core/common/content_settings.cc
@@ -16,6 +16,7 @@
@@ -16,10 +16,11 @@
#include "components/content_settings/core/common/content_settings_metadata.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/content_settings/core/common/content_settings_utils.h"
@@ -2940,6 +2953,11 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
namespace {
-void FilterRulesForType(ContentSettingsForOneType& settings,
+void FilterRulesForType(ContentSettingsForOneType& settings, // do not remove
const GURL& primary_url) {
std::erase_if(settings,
[&primary_url](const ContentSettingPatternSource& source) {
@@ -98,6 +99,13 @@ std::ostream& operator<<(std::ostream& os,
// static
bool RendererContentSettingRules::IsRendererContentSetting(
@@ -2954,20 +2972,27 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
return content_type == ContentSettingsType::IMAGES ||
content_type == ContentSettingsType::JAVASCRIPT ||
content_type == ContentSettingsType::POPUPS ||
@@ -107,6 +115,9 @@ bool RendererContentSettingRules::IsRendererContentSetting(
@@ -107,7 +115,10 @@ bool RendererContentSettingRules::IsRendererContentSetting(
void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
const GURL& outermost_main_frame_url) {
- FilterRulesForType(mixed_content_rules, outermost_main_frame_url);
+ for (ContentSettingRuleSource& info : settings_rules) {
+ FilterRulesForType(info.rules, outermost_main_frame_url);
+ }
FilterRulesForType(mixed_content_rules, outermost_main_frame_url);
+ FilterRulesForType(mixed_content_rules, outermost_main_frame_url); // do not remove
}
@@ -128,3 +139,12 @@ RendererContentSettingRules& RendererContentSettingRules::operator=(
RendererContentSettingRules::RendererContentSettingRules() = default;
@@ -127,4 +138,18 @@ RendererContentSettingRules& RendererContentSettingRules::operator=(
RendererContentSettingRules&& rules) = default;
bool RendererContentSettingRules::operator==(
const RendererContentSettingRules& other) const = default;
- const RendererContentSettingRules& other) const = default;
+ const RendererContentSettingRules& other) const {
+ return std::tie(settings_rules, mixed_content_rules) ==
+ std::tie(other.settings_rules, other.mixed_content_rules);
+}
+
+ContentSettingRuleSource::ContentSettingRuleSource() = default;
+
@@ -2976,11 +3001,13 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
+ContentSettingRuleSource::ContentSettingRuleSource(
+ const ContentSettingRuleSource&) = default;
+
+}
+bool ContentSettingRuleSource::operator==(
+ const ContentSettingRuleSource& other) const = default;
+
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
--- a/components/content_settings/core/common/content_settings.h
+++ b/components/content_settings/core/common/content_settings.h
@@ -72,10 +72,20 @@ std::ostream& operator<<(std::ostream& os,
@@ -72,10 +72,22 @@ std::ostream& operator<<(std::ostream& os,
typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType;
@@ -2991,6 +3018,8 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon
+ ContentSettingRuleSource();
+ ~ContentSettingRuleSource();
+ ContentSettingRuleSource(const ContentSettingRuleSource& source);
+
+ bool operator==(const ContentSettingRuleSource& other) const;
+};
+
struct RendererContentSettingRules {
@@ -3100,7 +3129,7 @@ diff --git a/components/content_settings/core/common/content_settings_types.mojo
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -202,6 +202,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules(
@@ -202,6 +202,49 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules(
std::move(renderer_settings));
}
@@ -3128,6 +3157,16 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
+ const GURL secondary_url =
+ url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL();
+ return AllowContentSetting(type, secondary_url, default_value);
+}
+
+bool ContentSettingsAgentImpl::AllowContentSetting(
+ ContentSettingsType type,
+ const blink::WebURL& secondary_url,
+ bool default_value) {
+ if (!content_setting_rules_)
+ return default_value;
+
+ for (ContentSettingRuleSource& info : content_setting_rules_->settings_rules) {
+ if (info.type == (int)type) {
+ return CONTENT_SETTING_ALLOW == GetContentSettingFromRules(
@@ -3140,13 +3179,24 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
void ContentSettingsAgentImpl::OnContentSettingsAgentRequest(
mojo::PendingAssociatedReceiver<mojom::ContentSettingsAgent> receiver) {
receivers_.Add(this, std::move(receiver));
@@ -353,7 +396,7 @@ void ContentSettingsAgentImpl::ClearBlockedContentSettings() {
cached_storage_permissions_.clear();
}
-bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
+bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
if (should_allowlist_)
return true;
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -80,6 +80,11 @@ class ContentSettingsAgentImpl
@@ -80,6 +80,13 @@ class ContentSettingsAgentImpl
static mojom::ContentSettingsManager::StorageType ConvertToMojoStorageType(
StorageType storage_type);
+ bool AllowContentSetting(
+ ContentSettingsType type, const blink::WebURL& secondary_url, bool default_value) override;
+ bool AllowContentSetting(
+ ContentSettingsType type, bool default_value) override;
+ ContentSetting GetContentSetting(
@@ -3155,6 +3205,15 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h
// blink::WebContentSettingsClient:
void AllowStorageAccess(StorageType storage_type,
base::OnceCallback<void(bool)> callback) override;
@@ -135,7 +142,7 @@ class ContentSettingsAgentImpl
// Helpers.
// True if `render_frame()` contains content that is allowlisted for content
// settings.
- bool IsAllowlistedForContentSettings() const;
+ bool IsAllowlistedForContentSettingsCromite() const;
// A getter for `content_settings_manager_` that ensures it is bound.
mojom::ContentSettingsManager& GetContentSettingsManager();
diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java
--- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java
+++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java
@@ -3344,13 +3403,17 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t
#include "third_party/blink/public/common/client_hints/enabled_client_hints.h"
#include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h"
@@ -46,6 +47,10 @@ class WebContentSettingsClient {
@@ -46,6 +47,14 @@ class WebContentSettingsClient {
// Blocks until done.
virtual bool AllowStorageAccessSync(StorageType storage_type) { return true; }
+ virtual bool AllowContentSetting(ContentSettingsType type, bool enabled_per_settings) {
+ return enabled_per_settings;
+ }
+
+ virtual bool AllowContentSetting(ContentSettingsType type, const WebURL& secondary_url, bool enabled_per_settings) {
+ return enabled_per_settings;
+ }
+
// Controls whether insecure scripts are allowed to execute for this frame.
virtual bool AllowRunningInsecureContent(bool enabled_per_settings,
@@ -228,7 +228,7 @@ new file mode 100644
+SET_CROMITE_FEATURE_DISABLED(kFencedFrames);
+SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPI);
+SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPIM118);
+SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPIM124);
+SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPIM125);
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -6,7 +6,7 @@ Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/browser/BUILD.gn | 2 --
.../preloading_model_keyed_service.cc | 1 +
.../preloading_model_keyed_service.cc | 3 +++
.../preloading_model_keyed_service_factory.cc | 4 +---
.../optimization_guide/chrome_hints_manager.cc | 1 +
.../model_validator_keyed_service.cc | 6 +++++-
@@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/browser/ui/tab_helpers.cc | 1 -
.../ui/webui/omnibox/omnibox_page_handler.cc | 2 ++
.../core/browser/autofill_optimization_guide.cc | 5 +++--
.../omnibox/browser/autocomplete_controller.cc | 2 ++
.../omnibox/browser/autocomplete_controller.cc | 4 ++++
.../optimization_guide/core/hints_fetcher.cc | 1 +
.../optimization_guide/core/hints_manager.cc | 5 +++++
.../core/optimization_guide_features.cc | 15 +++++++++------
@@ -31,7 +31,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../features_cc/Disable-all-predictors-code.inc | 2 ++
.../document_speculation_rules.cc | 1 +
.../platform/runtime_enabled_features.json5 | 2 +-
26 files changed, 60 insertions(+), 25 deletions(-)
26 files changed, 64 insertions(+), 25 deletions(-)
create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc
@@ -52,7 +52,22 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc
--- a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc
+++ b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc
@@ -34,6 +34,7 @@ PreloadingModelKeyedService::Inputs::Inputs() = default;
@@ -11,6 +11,7 @@
#include "chrome/browser/navigation_predictor/preloading_model_handler.h"
#endif
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
namespace {
// The model takes all of its inputs as floats, so this is a convenience
@@ -28,12 +29,14 @@ constexpr float ToInput(base::TimeDelta val) {
static_assert(1.0f == ToInput(true));
} // namespace
+#endif
PreloadingModelKeyedService::Inputs::Inputs() = default;
PreloadingModelKeyedService::PreloadingModelKeyedService(
OptimizationGuideKeyedService* optimization_guide_keyed_service) {
#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
@@ -237,6 +252,22 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/
#include "components/omnibox/browser/autocomplete_scoring_signals_annotator.h"
#include "components/omnibox/browser/bookmark_provider.h"
#include "components/omnibox/browser/bookmark_scoring_signals_annotator.h"
@@ -116,6 +118,7 @@ using ScoringSignals = ::metrics::OmniboxEventProto::Suggestion::ScoringSignals;
constexpr bool is_android = !!BUILDFLAG(IS_ANDROID);
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
void RecordMlScoreCoverage(size_t matches_with_non_null_scores,
size_t total_scored_matches) {
int percent_score_coverage =
@@ -124,6 +127,7 @@ void RecordMlScoreCoverage(size_t matches_with_non_null_scores,
"Omnibox.URLScoringModelExecuted.MLScoreCoverage",
percent_score_coverage);
}
+#endif
// Appends available autocompletion of the given type, subtype, and number to
// the existing available autocompletions string, encoding according to the
diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/optimization_guide/core/hints_fetcher.cc
--- a/components/optimization_guide/core/hints_fetcher.cc
+++ b/components/optimization_guide/core/hints_fetcher.cc
@@ -64,12 +64,17 @@ diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/c
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
--- a/components/feed/feed_feature_list.cc
+++ b/components/feed/feed_feature_list.cc
@@ -156,4 +156,7 @@ bool IsWebFeedEnabledForLocale(const std::string& country) {
@@ -151,9 +151,12 @@ BASE_FEATURE(kFeedContainment,
base::FEATURE_DISABLED_BY_DEFAULT);
bool IsWebFeedEnabledForLocale(const std::string& country) {
+ if ((true)) return false;
const std::vector<std::string> launched_countries = {"AU", "CA", "GB",
"NZ", "US", "ZA"};
return base::Contains(launched_countries, country);
}
+SET_CROMITE_FEATURE_DISABLED(kInterestFeedV2);
+SET_CROMITE_FEATURE_DISABLED(kWebFeed);
+
} // namespace feed
--
@@ -5,15 +5,16 @@ Subject: Disable privacy issues in password manager
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
chrome/android/java/AndroidManifest.xml | 9 ---------
...sword_store_android_backend_dispatcher_bridge_impl.cc | 1 +
.../android/password_store_android_local_backend.cc | 2 +-
.../generated_password_leak_detection_pref.cc | 3 +--
.../affiliations/core/browser/affiliation_backend.cc | 1 +
.../core/browser/affiliation_service_impl.cc | 4 ++++
components/affiliations/core/browser/facet_manager.cc | 4 ++++
.../core/browser/features/password_features.cc | 7 +++++++
.../core/browser/features/password_features.cc | 4 ++++
.../leak_detection/leak_detection_check_factory_impl.cc | 5 +++++
.../browser/leak_detection/leak_detection_check_impl.cc | 4 +---
9 files changed, 24 insertions(+), 15 deletions(-)
10 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
--- a/chrome/android/java/AndroidManifest.xml
@@ -34,6 +35,17 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<!-- Upgrade related -->
<receiver android:name="org.chromium.chrome.browser.upgrade.PackageReplacedBroadcastReceiver"
android:exported="false">
diff --git a/chrome/browser/password_manager/android/password_store_android_backend_dispatcher_bridge_impl.cc b/chrome/browser/password_manager/android/password_store_android_backend_dispatcher_bridge_impl.cc
--- a/chrome/browser/password_manager/android/password_store_android_backend_dispatcher_bridge_impl.cc
+++ b/chrome/browser/password_manager/android/password_store_android_backend_dispatcher_bridge_impl.cc
@@ -66,6 +66,7 @@ bool PasswordStoreAndroidBackendDispatcherBridge::
bool PasswordStoreAndroidBackendDispatcherBridge::
CanUseGetAllLoginsWithBrandingInfoAPI() {
+ if ((true)) return false;
base::android::BuildInfo* info = base::android::BuildInfo::GetInstance();
int current_gms_core_version;
if (!base::StringToInt(info->gms_version_code(), &current_gms_core_version)) {
diff --git a/chrome/browser/password_manager/android/password_store_android_local_backend.cc b/chrome/browser/password_manager/android/password_store_android_local_backend.cc
--- a/chrome/browser/password_manager/android/password_store_android_local_backend.cc
+++ b/chrome/browser/password_manager/android/password_store_android_local_backend.cc
@@ -101,16 +113,13 @@ diff --git a/components/affiliations/core/browser/facet_manager.cc b/components/
diff --git a/components/password_manager/core/browser/features/password_features.cc b/components/password_manager/core/browser/features/password_features.cc
--- a/components/password_manager/core/browser/features/password_features.cc
+++ b/components/password_manager/core/browser/features/password_features.cc
@@ -194,4 +194,11 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting,
@@ -194,4 +194,8 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting,
"UsernameFirstFlowWithIntermediateValuesVoting",
base::FEATURE_ENABLED_BY_DEFAULT);
+SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect);
+SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService);
+SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableSenderService);
+#if BUILDFLAG(IS_ANDROID)
+SET_CROMITE_FEATURE_DISABLED(kUseGMSCoreForBrandingInfo);
+#endif
+
} // namespace password_manager::features
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
+1 -1
View File
@@ -126,7 +126,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3544,7 +3544,6 @@ static_library("browser") {
@@ -3550,7 +3550,6 @@ static_library("browser") {
"//chrome/browser/reading_list/android",
"//chrome/browser/recent_tabs:jni_headers",
"//chrome/browser/safe_browsing/android:safe_browsing_enums",
@@ -43,7 +43,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -482,6 +482,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
@@ -484,6 +484,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
return false;
}
@@ -58,7 +58,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
bool ContentSettingsAgentImpl::UpdateOverrides() {
// Evaluate the content setting rules
ContentSetting setting = CONTENT_SETTING_ALLOW;
@@ -492,7 +500,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() {
@@ -494,7 +502,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() {
}
return UpdateTimeZoneOverride(
setting, content_setting_rules_->timezone_override_value);
@@ -69,7 +69,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -121,6 +121,8 @@ class ContentSettingsAgentImpl
@@ -123,6 +123,8 @@ class ContentSettingsAgentImpl
void SetRendererContentSettingRulesForTest(
const RendererContentSettingRules& rules);
@@ -139,7 +139,7 @@ new file mode 100644
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -111,6 +111,8 @@ class WebContentSettingsClient {
@@ -115,6 +115,8 @@ class WebContentSettingsClient {
// frame.
virtual bool ShouldAutoupgradeMixedContent() { return true; }
@@ -15,9 +15,9 @@ See also: https://github.com/bromite/bromite/issues/547
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../settings/PasswordSettings.java | 81 ++++++++++++++++++-
.../settings/PasswordSettings.java | 82 ++++++++++++++++++-
.../chrome/browser/settings/MainSettings.java | 3 +-
.../chromium/chrome/browser/tab/TabImpl.java | 43 +++++++---
.../chromium/chrome/browser/tab/TabImpl.java | 43 ++++++++--
chrome/browser/about_flags.cc | 22 -----
chrome/browser/android/tab_android.cc | 3 +-
chrome/browser/flag_descriptions.cc | 6 --
@@ -47,13 +47,21 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../autofill/core/common/autofill_features.h | 4 -
.../autofill/core/common/autofill_prefs.cc | 4 +-
.../autofill/core/common/autofill_prefs.h | 5 ++
32 files changed, 309 insertions(+), 95 deletions(-)
32 files changed, 310 insertions(+), 95 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
--- 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
@@ -58,6 +58,11 @@ import java.lang.annotation.Retention;
@@ -28,6 +28,7 @@ import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceGroup;
import org.chromium.base.BuildInfo;
+import org.chromium.base.StrictModeContext;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.password_check.PasswordCheck;
@@ -58,6 +59,11 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Locale;
@@ -65,7 +73,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
/**
* The "Passwords" screen in Settings, which allows the user to enable or disable password saving,
* to view saved passwords (just the username and URL), and to delete saved passwords.
@@ -65,7 +70,7 @@ import java.util.Locale;
@@ -65,7 +71,7 @@ import java.util.Locale;
public class PasswordSettings extends ChromeBaseSettingsFragment
implements PasswordListObserver,
Preference.OnPreferenceClickListener,
@@ -74,7 +82,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
@IntDef({
TrustedVaultBannerState.NOT_SHOWN,
TrustedVaultBannerState.OFFER_OPT_IN,
@@ -95,6 +100,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
@@ -95,6 +101,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
public static final String PREF_TRUSTED_VAULT_BANNER = "trusted_vault_banner";
public static final String PREF_KEY_MANAGE_ACCOUNT_LINK = "manage_account_link";
@@ -87,7 +95,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
private static final String PREF_KEY_CATEGORY_SAVED_PASSWORDS = "saved_passwords";
private static final String PREF_KEY_CATEGORY_EXCEPTIONS = "exceptions";
private static final String PREF_KEY_SAVED_PASSWORDS_NO_TEXT = "saved_passwords_no_text";
@@ -127,6 +138,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
@@ -127,6 +139,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
private Preference mLinkPref;
private Menu mMenu;
@@ -96,7 +104,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
private @ManagePasswordsReferrer int mManagePasswordsReferrer;
private BottomSheetController mBottomSheetController;
@@ -301,6 +314,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
@@ -301,6 +315,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
}
createSavePasswordsSwitch();
@@ -104,7 +112,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
if (shouldShowAutoSigninOption()) {
createAutoSignInCheckbox();
}
@@ -574,6 +588,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
@@ -574,6 +589,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE));
}
@@ -409,7 +409,7 @@ new file mode 100644
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3714,6 +3714,9 @@ static_library("browser") {
@@ -3720,6 +3720,9 @@ static_library("browser") {
"//components/user_scripts/android",
]
}
@@ -9649,11 +9649,11 @@ new file mode 100755
+
+ // Unpickle scripts.
+ uint32_t num_scripts = 0;
+ auto memory = shared_memory_mapping_.GetMemoryAsSpan<char>(pickle_size);
+ auto memory = shared_memory_mapping_.GetMemoryAsSpan<uint8_t>(pickle_size);
+ if (!memory.size())
+ return false;
+
+ base::Pickle pickle(memory.data(), pickle_size);
+ base::Pickle pickle = base::Pickle::WithUnownedBuffer(memory);
+ base::PickleIterator iter(pickle);
+ base::debug::Alias(&pickle_size);
+ CHECK(iter.ReadUInt32(&num_scripts));
@@ -12,14 +12,15 @@ deactivation of all pop-ups (default disabled)
---
.../android/java/res/xml/main_preferences.xml | 19 +-
chrome/browser/BUILD.gn | 2 -
.../adblock/adblock_content_browser_client.cc | 284 +-
.../adblock/adblock_content_browser_client.h | 47 +-
.../adblock/adblock_content_browser_client.cc | 285 +-
.../adblock/adblock_content_browser_client.h | 48 +-
.../browser/chrome_content_browser_client.cc | 6 +-
.../browser/chrome_content_browser_client.h | 6 +-
.../adblock_private/adblock_private_api.cc | 74 +-
.../api/adblock_private/adblock_private_api.h | 49 +
.../eyeo_filtering_private_api.cc | 25 +-
...hrome_browser_main_extra_parts_profiles.cc | 2 -
.../resources/adblock_internals/BUILD.gn | 8 +-
chrome/browser/resources/settings/BUILD.gn | 2 +
.../settings/adblock_page/adblock_page.html | 212 +
.../settings/adblock_page/adblock_page.ts | 286 ++
@@ -32,6 +33,7 @@ deactivation of all pop-ups (default disabled)
.../settings/settings_menu/settings_menu.html | 5 +
chrome/browser/ui/tab_helpers.cc | 6 +-
.../adblock_internals_page_handler_impl.cc | 20 +-
.../common/extensions/api/_api_features.json | 4 +-
.../extensions/api/_permission_features.json | 8 -
.../common/extensions/api/adblock_private.idl | 8 +
components/adblock/android/BUILD.gn | 3 +-
@@ -49,7 +51,7 @@ deactivation of all pop-ups (default disabled)
.../settings/AdblockSettingsFragment.java | 50 +-
components/adblock/content/browser/BUILD.gn | 18 +-
.../adblock_controller_factory_base.cc | 5 +-
.../browser/adblock_url_loader_factory.cc | 17 +-
.../browser/adblock_url_loader_factory.cc | 22 +-
.../browser/adblock_url_loader_factory.h | 7 +-
.../browser/adblock_webcontents_observer.cc | 25 +-
.../browser/adblock_webcontents_observer.h | 5 +-
@@ -128,7 +130,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 +
118 files changed, 9200 insertions(+), 1266 deletions(-)
120 files changed, 9214 insertions(+), 1271 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%)
@@ -431,7 +433,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
std::move(handshake_client));
return;
}
@@ -254,15 +267,133 @@ void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted(
@@ -254,15 +267,134 @@ void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted(
VLOG(1) << "[eyeo] Web socket blocked for " << url;
}
@@ -561,6 +563,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
URLLoaderFactoryType type,
const url::Origin& request_initiator,
- absl::optional<int64_t> navigation_id,
+ const net::IsolationInfo& isolation_info,
+ std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id,
- mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
@@ -568,7 +571,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,
bool* bypass_redirect_checks,
@@ -271,30 +402,17 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
@@ -271,30 +403,17 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
// Create Chromium proxy first as WebRequestProxyingURLLoaderFactory logic
// depends on being first proxy
@@ -593,7 +596,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
-#endif
+ ChromeContentBrowserClient::WillCreateURLLoaderFactory(
+ browser_context, frame, render_process_id, type, request_initiator,
+ navigation_id, ukm_source_id, factory_builder, header_client,
+ isolation_info, navigation_id, ukm_source_id, factory_builder, header_client,
+ bypass_redirect_checks, disable_secure_dns, factory_override,
+ navigation_response_task_runner);
+ auto* profile = Profile::FromBrowserContext(browser_context);
@@ -608,7 +611,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
bool use_test_loader = false;
#ifdef EYEO_INTERCEPT_DEBUG_URL
@@ -309,12 +427,8 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
@@ -309,12 +428,8 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
#endif
if (use_adblock_proxy) {
@@ -626,7 +629,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/browser/adblock/adblock_content_browser_client.h
--- a/chrome/browser/adblock/adblock_content_browser_client.h
+++ b/chrome/browser/adblock/adblock_content_browser_client.h
@@ -44,25 +44,36 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
@@ -44,25 +44,37 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
static void ForceAdblockProxyForTesting();
#endif
@@ -660,6 +663,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br
URLLoaderFactoryType type,
const url::Origin& request_initiator,
- absl::optional<int64_t> navigation_id,
+ const net::IsolationInfo& isolation_info,
+ std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id,
- mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
@@ -667,7 +671,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,
bool* bypass_redirect_checks,
@@ -71,25 +82,51 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
@@ -71,25 +83,51 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
override;
@@ -1017,6 +1021,29 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
adblock::ContentSecurityPolicyInjectorFactory::GetInstance();
adblock::ElementHiderFactory::GetInstance();
adblock::ResourceClassificationRunnerFactory::GetInstance();
diff --git a/chrome/browser/resources/adblock_internals/BUILD.gn b/chrome/browser/resources/adblock_internals/BUILD.gn
--- a/chrome/browser/resources/adblock_internals/BUILD.gn
+++ b/chrome/browser/resources/adblock_internals/BUILD.gn
@@ -18,12 +18,18 @@ import("//ui/webui/resources/tools/build_webui.gni")
build_webui("build") {
grd_prefix = "adblock_internals"
+
static_files = [ "adblock_internals.html" ]
+
non_web_component_files = [ "adblock_internals.ts" ]
- mojo_files_deps = [ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings_ts__generator" ]
+
+ mojo_files_deps =
+ [ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings_ts__generator" ]
mojo_files = [ "$root_gen_dir/chrome/browser/ui/webui/adblock_internals/adblock_internals.mojom-webui.ts" ]
+
ts_deps = [
"//ui/webui/resources/js:build_ts",
"//ui/webui/resources/mojo:build_ts",
]
+ webui_context_type = "trusted"
}
diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn
--- a/chrome/browser/resources/settings/BUILD.gn
+++ b/chrome/browser/resources/settings/BUILD.gn
@@ -1281,14 +1308,14 @@ new file mode 100644
+import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js';
+import '../settings_shared.css.js';
+
+import { I18nMixin } from 'chrome://resources/cr_elements/i18n_mixin.js';
+import { BaseMixin } from '../base_mixin.js';
+import { PolymerElement } from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
+import { SettingsToggleButtonElement } from '../controls/settings_toggle_button.js';
+import { PrefsMixin } from 'chrome://resources/cr_components/settings_prefs/prefs_mixin.js';
+import { CrCheckboxElement } from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js';
+import { getTemplate } from './adblock_page.html.js';
+import { getToastManager } from 'chrome://resources/cr_elements/cr_toast/cr_toast_manager.js';
+import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js';
+import {BaseMixin} from '../base_mixin.js';
+import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
+import {SettingsToggleButtonElement} from '../controls/settings_toggle_button.js';
+import {PrefsMixin} from '/shared/settings/prefs/prefs_mixin.js';
+import {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js';
+import {getTemplate} from './adblock_page.html.js';
+import {getToastManager} from 'chrome://resources/cr_elements/cr_toast/cr_toast_manager.js';
+
+const SettingsAdblockPageElementBase =
+ I18nMixin(PrefsMixin(BaseMixin((PolymerElement))));
@@ -1715,6 +1742,27 @@ diff --git a/chrome/browser/ui/webui/adblock_internals/adblock_internals_page_ha
}
void AdblockInternalsPageHandlerImpl::OnTelemetryServiceInfoArrived(
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json
--- a/chrome/common/extensions/api/_api_features.json
+++ b/chrome/common/extensions/api/_api_features.json
@@ -64,7 +64,7 @@
}],
"adblockPrivate": [{
"dependencies": ["permission:adblockPrivate"],
- "contexts": ["blessed_extension"]
+ "contexts": ["privileged_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
@@ -518,7 +518,7 @@
},
"eyeoFilteringPrivate": [{
"dependencies": ["permission:eyeoFilteringPrivate"],
- "contexts": ["blessed_extension"]
+ "contexts": ["privileged_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json
--- a/chrome/common/extensions/api/_permission_features.json
+++ b/chrome/common/extensions/api/_permission_features.json
@@ -2557,7 +2605,28 @@ diff --git a/components/adblock/content/browser/adblock_controller_factory_base.
diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/components/adblock/content/browser/adblock_url_loader_factory.cc
--- a/components/adblock/content/browser/adblock_url_loader_factory.cc
+++ b/components/adblock/content/browser/adblock_url_loader_factory.cc
@@ -344,12 +344,6 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestError(
@@ -81,6 +81,9 @@ ContentType ToAdblockResourceType(const network::ResourceRequest& request) {
case network::mojom::RequestDestination::kSharedWorker:
case network::mojom::RequestDestination::kServiceWorker:
case network::mojom::RequestDestination::kJson:
+ case network::mojom::RequestDestination::kSharedStorageWorklet:
+ case network::mojom::RequestDestination::kAudioWorklet:
+ case network::mojom::RequestDestination::kPaintWorklet:
return ContentType::Script;
case network::mojom::RequestDestination::kImage:
return ContentType::Image;
@@ -102,10 +105,8 @@ ContentType ToAdblockResourceType(const network::ResourceRequest& request) {
case network::mojom::RequestDestination::kWebBundle:
return ContentType::WebBundle;
case network::mojom::RequestDestination::kReport:
- case network::mojom::RequestDestination::kAudioWorklet:
case network::mojom::RequestDestination::kDictionary:
case network::mojom::RequestDestination::kManifest:
- case network::mojom::RequestDestination::kPaintWorklet:
case network::mojom::RequestDestination::kWebIdentity:
return ContentType::Other;
}
@@ -344,12 +345,6 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestError(
void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch(
CheckFilterMatchCallback callback) {
@@ -2570,7 +2639,7 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/
auto subscription_service = factory_->config_.subscription_service;
if (is_document_request_) {
auto* host = content::RenderFrameHost::FromID(factory_->host_id_);
@@ -388,7 +382,7 @@ void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch(
@@ -388,7 +383,7 @@ void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch(
} else {
factory_->config_.resource_classifier->CheckRequestFilterMatch(
subscription_service->GetCurrentSnapshot(), request_url_,
@@ -2579,7 +2648,7 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/
base::BindOnce(
&AdblockURLLoaderFactory::InProgressRequest::OnRequestUrlClassified,
weak_factory_.GetWeakPtr(),
@@ -677,12 +671,13 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestFilterMatchResult(
@@ -677,12 +672,13 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestFilterMatchResult(
AdblockURLLoaderFactory::AdblockURLLoaderFactory(
AdblockURLLoaderFactoryConfig config,
@@ -2595,7 +2664,7 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/
host_id_(host_id),
user_agent_string_(std::move(user_agent_string)),
on_disconnect_(std::move(on_disconnect)) {
@@ -691,10 +686,12 @@ AdblockURLLoaderFactory::AdblockURLLoaderFactory(
@@ -691,10 +687,12 @@ AdblockURLLoaderFactory::AdblockURLLoaderFactory(
DCHECK(config_.element_hider);
DCHECK(config_.sitekey_storage);
DCHECK(config_.csp_injector);
+1 -28
View File
@@ -12,10 +12,8 @@ https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10
components/omnibox/browser/omnibox_field_trial.cc | 4 ++--
.../phishing_classifier/phishing_image_embedder.cc | 14 +++-----------
content/browser/browser_interface_binders.cc | 1 +
crypto/BUILD.gn | 3 +++
net/BUILD.gn | 1 +
third_party/libevent/BUILD.gn | 2 ++
10 files changed, 17 insertions(+), 16 deletions(-)
8 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/BUILD.gn b/BUILD.gn
--- a/BUILD.gn
@@ -117,19 +115,6 @@ diff --git a/content/browser/browser_interface_binders.cc b/content/browser/brow
auto* view =
RenderWidgetHostViewAndroid::FromRenderWidgetHostView(host->GetView());
if (!view || !view->text_suggestion_host())
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
--- a/crypto/BUILD.gn
+++ b/crypto/BUILD.gn
@@ -14,6 +14,9 @@ buildflag_header("buildflags") {
}
component("crypto") {
+ # fix error
+ # [chromium-rawptr] Use raw_ptr<T> instead of a raw pointer.
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
sources = [
"aead.cc",
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -141,16 +126,4 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn
}
# net_export.h has its own build target so that code (eg
diff --git a/third_party/libevent/BUILD.gn b/third_party/libevent/BUILD.gn
--- a/third_party/libevent/BUILD.gn
+++ b/third_party/libevent/BUILD.gn
@@ -58,6 +58,8 @@ static_library("libevent") {
configs += [ "//build/config/compiler:optimize_max" ]
}
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
+
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
--
@@ -0,0 +1,25 @@
From: uazo <uazo@users.noreply.github.com>
Date: Tue, 14 May 2024 15:33:59 +0000
Subject: Keep ComputePressure disabled
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../blink/renderer/platform/runtime_enabled_features.json5 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -696,8 +696,9 @@
},
{
// Shipping in M125. Should be removed after M127.
- name: "ComputePressure",
- status: "stable",
+ name: "ComputePressure", // disabled
+ status: "experimental", // by default
+ public: true,
},
{
name: "ConsolidatedMovementXY",
--
@@ -11,12 +11,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../browser/loader/keep_alive_url_loader.cc | 33 +++++++++++++++++--
.../browser/loader/keep_alive_url_loader.h | 3 --
.../Keep-disabled-FetchLaterAPI.inc | 3 ++
.../Keep-disabled-FetchLaterAPI.inc | 2 ++
.../renderer/core/fetch/fetch_manager.cc | 8 +++--
.../loader/child_url_loader_factory_bundle.cc | 14 ++++----
.../platform/loader/fetch/resource_fetcher.cc | 2 +-
.../platform/runtime_enabled_features.json5 | 5 ++-
7 files changed, 51 insertions(+), 17 deletions(-)
7 files changed, 50 insertions(+), 17 deletions(-)
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc
diff --git a/content/browser/loader/keep_alive_url_loader.cc b/content/browser/loader/keep_alive_url_loader.cc
@@ -93,9 +93,8 @@ diff --git a/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-Fe
new file mode 100644
--- /dev/null
+++ b/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc
@@ -0,0 +1,3 @@
@@ -0,0 +1,2 @@
+SET_CROMITE_FEATURE_ENABLED(kKeepAliveInBrowserMigration);
+SET_CROMITE_FEATURE_DISABLED(kPendingBeaconAPI);
+SET_CROMITE_FEATURE_DISABLED(kAttributionReportingInBrowserMigration);
diff --git a/third_party/blink/renderer/core/fetch/fetch_manager.cc b/third_party/blink/renderer/core/fetch/fetch_manager.cc
--- a/third_party/blink/renderer/core/fetch/fetch_manager.cc
@@ -38,7 +38,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../strip/StripLayoutHelperManager.java | 38 +++++++-
.../scene_layer/StaticTabSceneLayer.java | 7 +-
.../scene_layer/TabListSceneLayer.java | 8 ++
.../scene_layer/TabStripSceneLayer.java | 18 +++-
.../scene_layer/TabStripSceneLayer.java | 19 +++-
.../browser/findinpage/FindToolbarTablet.java | 10 +-
.../fullscreen/BrowserControlsManager.java | 12 +++
.../messages/MessageContainerCoordinator.java | 16 +++-
@@ -87,7 +87,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 ++++
74 files changed, 954 insertions(+), 87 deletions(-)
74 files changed, 955 insertions(+), 87 deletions(-)
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc
diff --git a/cc/base/features.cc b/cc/base/features.cc
@@ -1149,7 +1149,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
Resources res = context.getResources();
mUpdateHost = updateHost;
mLayerTitleCacheSupplier = layerTitleCacheSupplier;
@@ -523,6 +535,8 @@ public class StripLayoutHelperManager
@@ -520,6 +532,8 @@ public class StripLayoutHelperManager
mTabDragSource,
toolbarContainerView,
windowAndroid);
@@ -1158,7 +1158,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
tabHoverCardViewStub.setOnInflateListener(
(viewStub, view) -> {
@@ -674,6 +688,10 @@ public class StripLayoutHelperManager
@@ -671,6 +685,10 @@ public class StripLayoutHelperManager
// value.
yOffset -= getHeight();
}
@@ -1169,7 +1169,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
mTabStripTreeProvider.pushAndUpdateStrip(
this,
mLayerTitleCacheSupplier.get(),
@@ -687,7 +705,9 @@ public class StripLayoutHelperManager
@@ -684,7 +702,9 @@ public class StripLayoutHelperManager
scrimOpacity,
mLeftPadding,
mRightPadding,
@@ -1180,7 +1180,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
return mTabStripTreeProvider;
}
@@ -746,11 +766,21 @@ public class StripLayoutHelperManager
@@ -743,11 +763,21 @@ public class StripLayoutHelperManager
mLeftPadding,
mRightPadding);
@@ -1266,12 +1266,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen
/**
* The Java component of what is basically a CC Layer that manages drawing the Tab Strip (which is
@@ -88,9 +91,20 @@ public class TabStripSceneLayer extends SceneOverlayLayer {
@@ -88,9 +91,21 @@ public class TabStripSceneLayer extends SceneOverlayLayer {
float scrimOpacity,
float leftPaddingDp,
float rightPaddingDp,
- float topPaddingDp) {
+ float topPaddingDp,
+ float viewportHeight,
+ int topControlsHeight) {
if (mNativePtr == 0) return;
- final boolean visible = yOffset > -layoutHelper.getHeight();
@@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../suggestions/AutocompleteController.java | 25 -------
.../suggestions/AutocompleteCoordinator.java | 8 ---
.../suggestions/AutocompleteMediator.java | 9 ---
16 files changed, 11 insertions(+), 288 deletions(-)
16 files changed, 10 insertions(+), 289 deletions(-)
diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
--- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
@@ -586,7 +586,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
}
/** package */
@@ -1131,10 +1116,8 @@ class LocationBarMediator
@@ -1131,10 +1116,7 @@ class LocationBarMediator
private boolean shouldShowMicButton() {
if (shouldShowDeleteButton()) return false;
@@ -594,12 +594,11 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
- || mVoiceRecognitionHandler == null
- || !mVoiceRecognitionHandler.isVoiceSearchEnabled()
- || !mEmbedderUiOverrides.isVoiceEntrypointAllowed()) {
+ if (()
+ || !mEmbedderUiOverrides.isVoiceEntrypointAllowed(true)) {
+ if ((true)) {
return false;
}
boolean isToolbarMicEnabled = mIsToolbarMicEnabledSupplier.getAsBoolean();
@@ -1151,6 +1134,7 @@ class LocationBarMediator
@@ -1151,6 +1133,7 @@ class LocationBarMediator
}
private boolean shouldShowLensButton() {
@@ -607,7 +606,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
if (shouldShowDeleteButton()) return false;
// When this method is called on UI inflation, return false as the native is not ready.
@@ -1370,16 +1354,6 @@ class LocationBarMediator
@@ -1161,7 +1144,6 @@ class LocationBarMediator
// Never show Lens in the old search widget page context.
// This widget must guarantee consistent feature set regardless of search engine choice or
// other aspects that may not be met by Lens.
- LocationBarDataProvider dataProvider = getLocationBarDataProvider();
if (!mEmbedderUiOverrides.isLensEntrypointAllowed()) {
return false;
}
@@ -1370,16 +1352,6 @@ class LocationBarMediator
}
}
@@ -624,7 +631,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
@Override
public void addUrlFocusChangeListener(UrlFocusChangeListener listener) {
mUrlFocusChangeListeners.addObserver(listener);
@@ -1395,33 +1369,13 @@ class LocationBarMediator
@@ -1395,33 +1367,13 @@ class LocationBarMediator
return mUrlHasFocus;
}
@@ -660,7 +667,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
public void setSearchQuery(String query) {
if (TextUtils.isEmpty(query)) return;
@@ -1444,20 +1398,6 @@ class LocationBarMediator
@@ -1444,20 +1396,6 @@ class LocationBarMediator
mUrlCoordinator.setKeyboardVisibility(true, false);
}
@@ -1,258 +0,0 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sun, 14 Apr 2024 07:45:20 +0000
Subject: Revert remove AllowImage content settings per secondary url
https://chromium-review.googlesource.com/c/chromium/src/+/5308361
---
.../renderer/content_settings_agent_impl.cc | 17 +++++++++++++++++
.../renderer/content_settings_agent_impl.h | 2 ++
.../platform/web_content_settings_client.h | 5 +++++
.../blink/renderer/core/frame/local_frame.cc | 8 --------
.../blink/renderer/core/frame/local_frame.h | 6 ------
.../blink/renderer/core/html/image_document.cc | 5 ++++-
.../renderer/core/loader/frame_fetch_context.cc | 12 ++++--------
.../renderer/core/loader/frame_fetch_context.h | 2 +-
third_party/blink/renderer/core/page/page.cc | 5 ++---
.../platform/loader/fetch/fetch_context.h | 2 +-
.../platform/loader/fetch/resource_fetcher.cc | 17 +++++++++++++++--
.../platform/loader/fetch/resource_fetcher.h | 4 +++-
12 files changed, 54 insertions(+), 31 deletions(-)
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -326,6 +326,23 @@ bool ContentSettingsAgentImpl::AllowStorageAccessSync(
return result;
}
+bool ContentSettingsAgentImpl::AllowImage(bool enabled_per_settings,
+ const WebURL& image_url) {
+ bool allow = enabled_per_settings;
+ if (enabled_per_settings) {
+ if (IsAllowlistedForContentSettings())
+ return true;
+
+ if (content_setting_rules_) {
+ allow = GetContentSettingFromRules(content_setting_rules_->image_rules,
+ image_url) != CONTENT_SETTING_BLOCK;
+ }
+ }
+ if (!allow)
+ DidBlockContentType(ContentSettingsType::IMAGES);
+ return allow;
+}
+
bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
if (!enabled_per_settings)
return false;
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -89,6 +89,8 @@ class ContentSettingsAgentImpl
void AllowStorageAccess(StorageType storage_type,
base::OnceCallback<void(bool)> callback) override;
bool AllowStorageAccessSync(StorageType type) override;
+ bool AllowImage(bool enabled_per_settings,
+ const blink::WebURL& image_url) override;
bool AllowScript(bool enabled_per_settings) override;
bool AllowScriptFromSource(bool enabled_per_settings,
const blink::WebURL& script_url) override;
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -51,6 +51,11 @@ class WebContentSettingsClient {
return enabled_per_settings;
}
+ // Controls whether images are allowed for this frame.
+ virtual bool AllowImage(bool enabled_per_settings, const WebURL& image_url) {
+ return enabled_per_settings;
+ }
+
// Controls whether scripts are allowed to execute for this frame.
virtual bool AllowScript(bool enabled_per_settings) {
return enabled_per_settings;
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3933,14 +3933,6 @@ const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() {
return loader_.GetDocumentLoader()->GetContentSettings();
}
-bool LocalFrame::ImagesEnabled() {
- DCHECK(!IsDetached());
-
- bool allow_image_renderer = GetSettings()->GetImagesEnabled();
- bool allow_image_content_setting = GetContentSettings()->allow_image;
- return allow_image_renderer && allow_image_content_setting;
-}
-
const WebPrintParams& LocalFrame::GetPrintParams() const {
// If this fails, it's probably because nobody called StartPrinting().
DCHECK(GetDocument()->Printing());
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -930,12 +930,6 @@ class CORE_EXPORT LocalFrame final
// Can only be called while the frame is not detached.
const mojom::RendererContentSettingsPtr& GetContentSettings();
- // Returns whether images are allowed to load for the current frame. This is a
- // convenience method that checks both renderer content settings and frame
- // settings.
- // Can only be called while the frame is not detached.
- bool ImagesEnabled();
-
const WebPrintParams& GetPrintParams() const;
// Return a keep alive handle for the browser side NavigationStateKeepAlive.
diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc
--- a/third_party/blink/renderer/core/html/image_document.cc
+++ b/third_party/blink/renderer/core/html/image_document.cc
@@ -138,7 +138,10 @@ void ImageDocumentParser::AppendBytes(const char* data, size_t length) {
return;
LocalFrame* frame = GetDocument()->GetFrame();
- bool allow_image = frame->ImagesEnabled();
+ Settings* settings = frame->GetSettings();
+ bool allow_image_renderer = !settings || settings->GetImagesEnabled();
+ bool allow_image_content_setting = frame->GetContentSettings()->allow_image;
+ bool allow_image = allow_image_renderer && allow_image_content_setting;
if (!allow_image) {
auto* client = frame->GetContentSettingsClient();
if (client) {
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
@@ -242,6 +242,7 @@ ResourceFetcher* FrameFetchContext::CreateFetcherForCommittedDocument(
fetcher->SetResourceLoadObserver(
MakeGarbageCollected<ResourceLoadObserverForFrame>(
loader, document, fetcher->GetProperties()));
+ fetcher->SetImagesEnabled(frame->GetSettings()->GetImagesEnabled());
fetcher->SetAutoLoadImages(
frame->GetSettings()->GetLoadsImagesAutomatically());
fetcher->SetEarlyHintsPreloadedResources(
@@ -399,16 +400,11 @@ void FrameFetchContext::AddResourceTiming(
->AddResourceTiming(std::move(info), initiator_type);
}
-bool FrameFetchContext::AllowImage() const {
+bool FrameFetchContext::AllowImage(bool images_enabled, const KURL& url) const {
if (GetResourceFetcherProperties().IsDetached())
return true;
-
- bool images_enabled = GetFrame()->ImagesEnabled();
- if (!images_enabled) {
- if (auto* settings_client = GetContentSettingsClient()) {
- settings_client->DidNotAllowImage();
- }
- }
+ if (auto* settings_client = GetContentSettingsClient())
+ images_enabled = settings_client->AllowImage(images_enabled, url);
return images_enabled;
}
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.h
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h
@@ -105,7 +105,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext,
void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr,
const AtomicString& initiator_type) override;
- bool AllowImage() const override;
+ bool AllowImage(bool images_enabled, const KURL&) const override;
void PopulateResourceRequest(ResourceType,
const std::optional<float> resource_width,
diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/renderer/core/page/page.cc
--- a/third_party/blink/renderer/core/page/page.cc
+++ b/third_party/blink/renderer/core/page/page.cc
@@ -880,9 +880,8 @@ void Page::SettingsChanged(ChangeType change_type) {
for (Frame* frame = MainFrame(); frame;
frame = frame->Tree().TraverseNext()) {
if (auto* local_frame = DynamicTo<LocalFrame>(frame)) {
- // Notify the fetcher that the image loading setting has changed,
- // which may cause previously deferred requests to load.
- local_frame->GetDocument()->Fetcher()->ReloadImagesIfNotDeferred();
+ local_frame->GetDocument()->Fetcher()->SetImagesEnabled(
+ GetSettings().GetImagesEnabled());
local_frame->GetDocument()->Fetcher()->SetAutoLoadImages(
GetSettings().GetLoadsImagesAutomatically());
}
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
--- a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
+++ b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
@@ -106,7 +106,7 @@ class PLATFORM_EXPORT FetchContext : public GarbageCollected<FetchContext> {
virtual void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr,
const AtomicString& initiator_type);
- virtual bool AllowImage() const { return false; }
+ virtual bool AllowImage(bool, const KURL&) const { return false; }
virtual std::optional<ResourceRequestBlockedReason> CanRequest(
ResourceType,
const ResourceRequest&,
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
@@ -708,6 +708,7 @@ ResourceFetcher::ResourceFetcher(const ResourceFetcherInit& init)
blob_registry_remote_(init.context_lifecycle_notifier),
context_lifecycle_notifier_(init.context_lifecycle_notifier),
auto_load_images_(true),
+ images_enabled_(true),
allow_stale_resources_(false),
image_fetched_(false) {
InstanceCounters::IncrementCounter(InstanceCounters::kResourceFetcherCounter);
@@ -1735,7 +1736,7 @@ bool ResourceFetcher::IsImageResourceDisallowedToBeReused(
if (existing_resource.GetType() != ResourceType::kImage)
return false;
- return !Context().AllowImage();
+ return !Context().AllowImage(images_enabled_, existing_resource.Url());
}
ResourceFetcher::RevalidationPolicy
@@ -1978,8 +1979,20 @@ void ResourceFetcher::SetAutoLoadImages(bool enable) {
ReloadImagesIfNotDeferred();
}
+void ResourceFetcher::SetImagesEnabled(bool enable) {
+ if (enable == images_enabled_)
+ return;
+
+ images_enabled_ = enable;
+
+ if (!images_enabled_)
+ return;
+
+ ReloadImagesIfNotDeferred();
+}
+
bool ResourceFetcher::ShouldDeferImageLoad(const KURL& url) const {
- return !Context().AllowImage() ||
+ return !Context().AllowImage(images_enabled_, url) ||
(!auto_load_images_ && !url.ProtocolIsData());
}
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
@@ -224,6 +224,7 @@ class PLATFORM_EXPORT ResourceFetcher
bool StartLoad(Resource*);
void SetAutoLoadImages(bool);
+ void SetImagesEnabled(bool);
FetchContext& Context() const;
void ClearContext();
@@ -642,8 +643,9 @@ class PLATFORM_EXPORT ResourceFetcher
// This is not in the bit field below because we want to use AutoReset.
bool is_in_request_resource_ = false;
- // 28 bits left
+ // 27 bits left
bool auto_load_images_ : 1;
+ bool images_enabled_ : 1;
bool allow_stale_resources_ : 1;
bool image_fetched_ : 1;
bool stale_while_revalidate_enabled_ : 1;
--
@@ -4,9 +4,9 @@ Subject: Revert remove AllowScript content settings per secondary url
https://chromium-review.googlesource.com/c/chromium/src/+/5307559
---
.../worker_content_settings_client.cc | 30 +++++++++++++
.../worker_content_settings_client.cc | 35 +++++++++++++++++
.../renderer/worker_content_settings_client.h | 2 +
.../renderer/content_settings_agent_impl.cc | 43 ++++++++++++++++++-
.../renderer/content_settings_agent_impl.cc | 38 ++++++++++++++++++-
.../renderer/content_settings_agent_impl.h | 6 +++
.../platform/web_content_settings_client.h | 12 ++++++
.../blink/renderer/core/frame/local_frame.cc | 8 ----
@@ -14,8 +14,8 @@ https://chromium-review.googlesource.com/c/chromium/src/+/5307559
.../renderer/core/html/html_meta_element.cc | 4 +-
.../core/loader/base_fetch_context.cc | 2 +-
.../renderer/core/loader/base_fetch_context.h | 2 +-
.../core/loader/frame_fetch_context.cc | 30 +++++++++----
.../core/loader/frame_fetch_context.h | 13 +++++-
.../core/loader/frame_fetch_context.cc | 30 ++++++++++-----
.../core/loader/frame_fetch_context.h | 13 ++++++-
.../core/loader/worker_fetch_context.cc | 12 ++++--
.../core/loader/worker_fetch_context.h | 2 +-
14 files changed, 139 insertions(+), 33 deletions(-)
@@ -23,7 +23,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/5307559
diff --git a/chrome/renderer/worker_content_settings_client.cc b/chrome/renderer/worker_content_settings_client.cc
--- a/chrome/renderer/worker_content_settings_client.cc
+++ b/chrome/renderer/worker_content_settings_client.cc
@@ -114,6 +114,36 @@ bool WorkerContentSettingsClient::AllowRunningInsecureContent(
@@ -114,6 +114,41 @@ bool WorkerContentSettingsClient::AllowRunningInsecureContent(
return true;
}
@@ -36,14 +36,19 @@ diff --git a/chrome/renderer/worker_content_settings_client.cc b/chrome/renderer
+ // Allow DevTools to run worker scripts.
+ if (top_frame_origin_url.SchemeIs(content::kChromeDevToolsScheme))
+ return true;
+ for (const auto& rule : content_setting_rules_->script_rules) {
+ // The primary pattern was already matched in the browser process (see
+ // PageSpecificContentSettings::ReadyToCommitNavigation), so we only need
+ // to match the secondary pattern here.
+ if (rule.secondary_pattern.Matches(script_url)) {
+ allow = rule.GetContentSetting() != CONTENT_SETTING_BLOCK;
+ break;
+ }
+ for (ContentSettingRuleSource& info : content_setting_rules_->settings_rules) {
+ if (info.type == (int)ContentSettingsType::JAVASCRIPT) {
+ for (const auto& rule : info.rules) {
+ // The primary pattern was already matched in the browser process (see
+ // PageSpecificContentSettings::ReadyToCommitNavigation), so we only need
+ // to match the secondary pattern here.
+ if (rule.secondary_pattern.Matches(script_url)) {
+ allow = rule.GetContentSetting() != CONTENT_SETTING_BLOCK;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
@@ -84,8 +89,8 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
if (frame->Parent())
@@ -326,6 +326,46 @@ bool ContentSettingsAgentImpl::AllowStorageAccessSync(
return result;
@@ -351,6 +351,41 @@ bool ContentSettingsAgentImpl::AllowImage(bool enabled_per_settings,
return allow;
}
+bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
@@ -100,14 +105,9 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
+ // Evaluate the content setting rules before
+ // IsAllowlistedForContentSettings(); if there is only the default rule
+ // allowing all scripts, it's quicker this way.
+ bool allow = true;
+ if (content_setting_rules_) {
+ ContentSetting setting = GetContentSettingFromRules(
+ content_setting_rules_->script_rules,
+ url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL());
+ allow = setting != CONTENT_SETTING_BLOCK;
+ }
+ allow = allow || IsAllowlistedForContentSettings();
+ bool allow = AllowContentSetting(
+ ContentSettingsType::JAVASCRIPT, enabled_per_settings);
+ allow = allow || IsAllowlistedForContentSettingsCromite();
+
+ cached_script_permissions_[frame] = allow;
+ return allow;
@@ -121,38 +121,38 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
+
+ bool allow = true;
+ if (content_setting_rules_) {
+ ContentSetting setting = GetContentSettingFromRules(
+ content_setting_rules_->script_rules, script_url);
+ allow = setting != CONTENT_SETTING_BLOCK;
+ allow = AllowContentSetting(
+ ContentSettingsType::JAVASCRIPT, script_url, enabled_per_settings);
+ }
+ return allow || IsAllowlistedForContentSettings();
+ allow = allow || IsAllowlistedForContentSettingsCromite();
+ return allow;
+}
+
bool ContentSettingsAgentImpl::AllowReadFromClipboard() {
return delegate_->AllowReadFromClipboard();
}
@@ -384,6 +424,7 @@ void ContentSettingsAgentImpl::DidNotAllowImage() {
@@ -409,6 +444,7 @@ void ContentSettingsAgentImpl::DidNotAllowImage() {
void ContentSettingsAgentImpl::ClearBlockedContentSettings() {
content_blocked_.clear();
cached_storage_permissions_.clear();
+ cached_script_permissions_.clear();
}
bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -89,6 +89,9 @@ class ContentSettingsAgentImpl
void AllowStorageAccess(StorageType storage_type,
base::OnceCallback<void(bool)> callback) override;
@@ -93,6 +93,9 @@ class ContentSettingsAgentImpl
bool AllowStorageAccessSync(StorageType type) override;
bool AllowImage(bool enabled_per_settings,
const blink::WebURL& image_url) override;
+ bool AllowScript(bool enabled_per_settings) override;
+ bool AllowScriptFromSource(bool enabled_per_settings,
+ const blink::WebURL& script_url) override;
bool AllowReadFromClipboard() override;
bool AllowWriteToClipboard() override;
bool AllowMutationEvents(bool default_value) override;
@@ -159,6 +162,9 @@ class ContentSettingsAgentImpl
@@ -163,6 +166,9 @@ class ContentSettingsAgentImpl
using StoragePermissionsKey = std::pair<url::Origin, StorageType>;
base::flat_map<StoragePermissionsKey, bool> cached_storage_permissions_;
@@ -165,7 +165,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -51,6 +51,18 @@ class WebContentSettingsClient {
@@ -60,6 +60,18 @@ class WebContentSettingsClient {
return enabled_per_settings;
}
@@ -187,10 +187,10 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3941,14 +3941,6 @@ bool LocalFrame::ImagesEnabled() {
return allow_image_renderer && allow_image_content_setting;
@@ -3934,14 +3934,6 @@ const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() {
}
-bool LocalFrame::ScriptEnabled() {
- DCHECK(!IsDetached());
-
@@ -205,9 +205,9 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -936,12 +936,6 @@ class CORE_EXPORT LocalFrame final
@@ -930,12 +930,6 @@ class CORE_EXPORT LocalFrame final
// Can only be called while the frame is not detached.
bool ImagesEnabled();
const mojom::RendererContentSettingsPtr& GetContentSettings();
- // Returns whether script is allowed to run for the current frame. This is a
- // convenience method that checks both renderer content settings and frame
@@ -259,7 +259,7 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
@@ -436,7 +436,8 @@ void FrameFetchContext::AddClientHintsIfNecessary(
@@ -432,7 +432,8 @@ void FrameFetchContext::AddClientHintsIfNecessary(
// Check if |url| is allowed to run JavaScript. If not, client hints are not
// attached to the requests that initiate on the render side.
@@ -269,7 +269,7 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi
return;
}
@@ -558,15 +559,26 @@ void FrameFetchContext::SetFirstPartyCookie(ResourceRequest& request) {
@@ -554,15 +555,26 @@ void FrameFetchContext::SetFirstPartyCookie(ResourceRequest& request) {
request.SetSiteForCookies(GetSiteForCookies());
}
@@ -8,8 +8,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../site_settings/SingleWebsiteSettings.java | 51 ++++++++++++-------
.../browser_ui/site_settings/Website.java | 14 ++++-
.../bromite_content_settings/javascript.inc | 3 ++
3 files changed, 49 insertions(+), 19 deletions(-)
.../bromite_content_settings/javascript.inc | 4 ++
3 files changed, 50 insertions(+), 19 deletions(-)
create mode 100644 components/content_settings/core/browser/bromite_content_settings/javascript.inc
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
@@ -131,8 +131,9 @@ diff --git a/components/content_settings/core/browser/bromite_content_settings/j
new file mode 100644
--- /dev/null
+++ b/components/content_settings/core/browser/bromite_content_settings/javascript.inc
@@ -0,0 +1,3 @@
@@ -0,0 +1,4 @@
+ content_settings::WebsiteSettingsRegistry::GetInstance()
+ ->GetMutable(ContentSettingsType::JAVASCRIPT)
+ ->set_show_into_info_page();
+ ->set_show_into_info_page()
+ .set_is_renderer_content_setting();
--
+247 -13
View File
@@ -15,8 +15,19 @@ Require: Content-settings-infrastructure.patch
.../bromite_content_settings/images.grdp | 23 +++++
.../bromite_content_settings/images.inc | 6 ++
.../core/browser/content_settings_registry.cc | 2 +-
.../core/browser/content_settings_utils.cc | 1 +
10 files changed, 124 insertions(+), 1 deletion(-)
.../renderer/content_settings_agent_impl.cc | 15 +++
.../renderer/content_settings_agent_impl.h | 2 +
.../platform/web_content_settings_client.h | 5 +
.../blink/renderer/core/frame/local_frame.cc | 7 --
.../blink/renderer/core/frame/local_frame.h | 6 --
.../renderer/core/html/image_document.cc | 5 +-
.../core/loader/frame_fetch_context.cc | 12 +--
.../core/loader/frame_fetch_context.h | 2 +-
third_party/blink/renderer/core/page/page.cc | 5 +-
.../platform/loader/fetch/fetch_context.h | 2 +-
.../platform/loader/fetch/resource_fetcher.cc | 17 +++-
.../platform/loader/fetch/resource_fetcher.h | 4 +-
21 files changed, 175 insertions(+), 31 deletions(-)
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/permission_images.png
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/permission_images.png
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/permission_images.png
@@ -257,15 +268,238 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -138,6 +138,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
rules->mixed_content_rules =
map->GetSettingsForOneType(ContentSettingsType::MIXEDSCRIPT);
#else
+ rules->image_rules = map->GetSettingsForOneType(ContentSettingsType::IMAGES);
// In Android active mixed content is hard blocked, with no option to allow
// it.
rules->mixed_content_rules.push_back(ContentSettingPatternSource(
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -336,6 +336,21 @@ bool ContentSettingsAgentImpl::AllowStorageAccessSync(
return result;
}
+bool ContentSettingsAgentImpl::AllowImage(bool enabled_per_settings,
+ const WebURL& image_url) {
+ bool allow = enabled_per_settings;
+ if (enabled_per_settings) {
+ allow = allow || IsAllowlistedForContentSettingsCromite();
+ if (content_setting_rules_) {
+ allow = AllowContentSetting(ContentSettingsType::IMAGES,
+ image_url, enabled_per_settings);
+ }
+ }
+ if (!allow)
+ DidBlockContentType(ContentSettingsType::IMAGES);
+ return allow;
+}
+
bool ContentSettingsAgentImpl::AllowReadFromClipboard() {
return delegate_->AllowReadFromClipboard();
}
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -91,6 +91,8 @@ class ContentSettingsAgentImpl
void AllowStorageAccess(StorageType storage_type,
base::OnceCallback<void(bool)> callback) override;
bool AllowStorageAccessSync(StorageType type) override;
+ bool AllowImage(bool enabled_per_settings,
+ const blink::WebURL& image_url) override;
bool AllowReadFromClipboard() override;
bool AllowWriteToClipboard() override;
bool AllowMutationEvents(bool default_value) override;
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -55,6 +55,11 @@ class WebContentSettingsClient {
return enabled_per_settings;
}
+ // Controls whether images are allowed for this frame.
+ virtual bool AllowImage(bool enabled_per_settings, const WebURL& image_url) {
+ return enabled_per_settings;
+ }
+
// Controls whether insecure scripts are allowed to execute for this frame.
virtual bool AllowRunningInsecureContent(bool enabled_per_settings,
const WebURL&) {
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3920,13 +3920,6 @@ const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() {
return loader_.GetDocumentLoader()->GetContentSettings();
}
-bool LocalFrame::ImagesEnabled() {
- DCHECK(!IsDetached());
-
- bool allow_image_renderer = GetSettings()->GetImagesEnabled();
- bool allow_image_content_setting = GetContentSettings()->allow_image;
- return allow_image_renderer && allow_image_content_setting;
-}
bool LocalFrame::ScriptEnabled() {
DCHECK(!IsDetached());
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -929,12 +929,6 @@ class CORE_EXPORT LocalFrame final
// Can only be called while the frame is not detached.
const mojom::RendererContentSettingsPtr& GetContentSettings();
- // Returns whether images are allowed to load for the current frame. This is a
- // convenience method that checks both renderer content settings and frame
- // settings.
- // Can only be called while the frame is not detached.
- bool ImagesEnabled();
-
// Returns whether script is allowed to run for the current frame. This is a
// convenience method that checks both renderer content settings and frame
// settings.
diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc
--- a/third_party/blink/renderer/core/html/image_document.cc
+++ b/third_party/blink/renderer/core/html/image_document.cc
@@ -138,7 +138,10 @@ void ImageDocumentParser::AppendBytes(const char* data, size_t length) {
return;
LocalFrame* frame = GetDocument()->GetFrame();
- bool allow_image = frame->ImagesEnabled();
+ Settings* settings = frame->GetSettings();
+ bool allow_image_renderer = !settings || settings->GetImagesEnabled();
+ bool allow_image_content_setting = frame->GetContentSettings()->allow_image;
+ bool allow_image = allow_image_renderer && allow_image_content_setting;
if (!allow_image) {
auto* client = frame->GetContentSettingsClient();
if (client) {
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
@@ -242,6 +242,7 @@ ResourceFetcher* FrameFetchContext::CreateFetcherForCommittedDocument(
fetcher->SetResourceLoadObserver(
MakeGarbageCollected<ResourceLoadObserverForFrame>(
loader, document, fetcher->GetProperties()));
+ fetcher->SetImagesEnabled(frame->GetSettings()->GetImagesEnabled());
fetcher->SetAutoLoadImages(
frame->GetSettings()->GetLoadsImagesAutomatically());
fetcher->SetEarlyHintsPreloadedResources(
@@ -399,16 +400,11 @@ void FrameFetchContext::AddResourceTiming(
->AddResourceTiming(std::move(info), initiator_type);
}
-bool FrameFetchContext::AllowImage() const {
+bool FrameFetchContext::AllowImage(bool images_enabled, const KURL& url) const {
if (GetResourceFetcherProperties().IsDetached())
return true;
-
- bool images_enabled = GetFrame()->ImagesEnabled();
- if (!images_enabled) {
- if (auto* settings_client = GetContentSettingsClient()) {
- settings_client->DidNotAllowImage();
- }
- }
+ if (auto* settings_client = GetContentSettingsClient())
+ images_enabled = settings_client->AllowImage(images_enabled, url);
return images_enabled;
}
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.h
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h
@@ -94,7 +94,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext,
void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr,
const AtomicString& initiator_type) override;
- bool AllowImage() const override;
+ bool AllowImage(bool images_enabled, const KURL&) const override;
void PopulateResourceRequest(ResourceType,
const std::optional<float> resource_width,
diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/renderer/core/page/page.cc
--- a/third_party/blink/renderer/core/page/page.cc
+++ b/third_party/blink/renderer/core/page/page.cc
@@ -874,9 +874,8 @@ void Page::SettingsChanged(ChangeType change_type) {
for (Frame* frame = MainFrame(); frame;
frame = frame->Tree().TraverseNext()) {
if (auto* local_frame = DynamicTo<LocalFrame>(frame)) {
- // Notify the fetcher that the image loading setting has changed,
- // which may cause previously deferred requests to load.
- local_frame->GetDocument()->Fetcher()->ReloadImagesIfNotDeferred();
+ local_frame->GetDocument()->Fetcher()->SetImagesEnabled(
+ GetSettings().GetImagesEnabled());
local_frame->GetDocument()->Fetcher()->SetAutoLoadImages(
GetSettings().GetLoadsImagesAutomatically());
}
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
--- a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
+++ b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
@@ -106,7 +106,7 @@ class PLATFORM_EXPORT FetchContext : public GarbageCollected<FetchContext> {
virtual void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr,
const AtomicString& initiator_type);
- virtual bool AllowImage() const { return false; }
+ virtual bool AllowImage(bool, const KURL&) const { return false; }
virtual std::optional<ResourceRequestBlockedReason> CanRequest(
ResourceType,
const ResourceRequest&,
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
@@ -708,6 +708,7 @@ ResourceFetcher::ResourceFetcher(const ResourceFetcherInit& init)
blob_registry_remote_(init.context_lifecycle_notifier),
context_lifecycle_notifier_(init.context_lifecycle_notifier),
auto_load_images_(true),
+ images_enabled_(true),
allow_stale_resources_(false),
image_fetched_(false) {
InstanceCounters::IncrementCounter(InstanceCounters::kResourceFetcherCounter);
@@ -1735,7 +1736,7 @@ bool ResourceFetcher::IsImageResourceDisallowedToBeReused(
if (existing_resource.GetType() != ResourceType::kImage)
return false;
- return !Context().AllowImage();
+ return !Context().AllowImage(images_enabled_, existing_resource.Url());
}
ResourceFetcher::RevalidationPolicy
@@ -1978,8 +1979,20 @@ void ResourceFetcher::SetAutoLoadImages(bool enable) {
ReloadImagesIfNotDeferred();
}
+void ResourceFetcher::SetImagesEnabled(bool enable) {
+ if (enable == images_enabled_)
+ return;
+
+ images_enabled_ = enable;
+
+ if (!images_enabled_)
+ return;
+
+ ReloadImagesIfNotDeferred();
+}
+
bool ResourceFetcher::ShouldDeferImageLoad(const KURL& url) const {
- return !Context().AllowImage() ||
+ return !Context().AllowImage(images_enabled_, url) ||
(!auto_load_images_ && !url.ProtocolIsData());
}
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
@@ -224,6 +224,7 @@ class PLATFORM_EXPORT ResourceFetcher
bool StartLoad(Resource*);
void SetAutoLoadImages(bool);
+ void SetImagesEnabled(bool);
FetchContext& Context() const;
void ClearContext();
@@ -642,8 +643,9 @@ class PLATFORM_EXPORT ResourceFetcher
// This is not in the bit field below because we want to use AutoReset.
bool is_in_request_resource_ = false;
- // 28 bits left
+ // 27 bits left
bool auto_load_images_ : 1;
+ bool images_enabled_ : 1;
bool allow_stale_resources_ : 1;
bool image_fetched_ : 1;
bool stale_while_revalidate_enabled_ : 1;
--
@@ -1,48 +0,0 @@
From: Your Name <you@example.com>
Date: Sun, 14 Apr 2024 07:48:02 +0000
Subject: Temp Alert content setting revert
https://chromium-review.googlesource.com/c/chromium/src/+/5437554
---
.../page_specific_content_settings_delegate.cc | 5 +++--
components/content_settings/core/common/content_settings.cc | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
--- a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
+++ b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc
@@ -157,18 +157,19 @@ PageSpecificContentSettingsDelegate::CreateBrowsingDataModelDelegate() {
}
namespace {
+ fix me!
// By default, JavaScript, images and auto dark are allowed, and blockable mixed
// content is blocked in guest content
#if BUILDFLAG(ENABLE_EXTENSIONS)
void GetGuestViewDefaultContentSettingRules(
bool incognito,
RendererContentSettingRules* rules) {
- rules->mixed_content_rules.clear();
+ rules->mixed_content_rules.clear(); // do not remove
rules->mixed_content_rules.push_back(ContentSettingPatternSource(
ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK),
std::string(), incognito));
-}
+} // do not remove
#endif
} // namespace
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
--- a/components/content_settings/core/common/content_settings.cc
+++ b/components/content_settings/core/common/content_settings.cc
@@ -118,7 +118,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
for (ContentSettingRuleSource& info : settings_rules) {
FilterRulesForType(info.rules, outermost_main_frame_url);
}
- FilterRulesForType(mixed_content_rules, outermost_main_frame_url);
+ FilterRulesForType(mixed_content_rules, outermost_main_frame_url); // do not remove
}
RendererContentSettingRules::RendererContentSettingRules() = default;
--
+12 -15
View File
@@ -30,9 +30,9 @@ Require: Content-settings-infrastructure.patch
.../common/content_settings_mojom_traits.cc | 3 +-
.../common/content_settings_mojom_traits.h | 5 +
.../content_settings/core/common/pref_names.h | 3 +
.../renderer/content_settings_agent_impl.cc | 81 +++++++-
.../renderer/content_settings_agent_impl.cc | 78 +++++++
.../renderer/content_settings_agent_impl.h | 11 +
22 files changed, 681 insertions(+), 2 deletions(-)
22 files changed, 679 insertions(+), 1 deletion(-)
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
@@ -714,7 +714,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -146,6 +146,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
@@ -145,6 +145,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
ContentSettingToValue(CONTENT_SETTING_BLOCK), std::string(),
map->IsOffTheRecord()));
#endif
@@ -767,7 +767,7 @@ new file mode 100644
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
--- a/components/content_settings/core/common/content_settings.h
+++ b/components/content_settings/core/common/content_settings.h
@@ -104,6 +104,7 @@ struct RendererContentSettingRules {
@@ -106,6 +106,7 @@ struct RendererContentSettingRules {
bool operator==(const RendererContentSettingRules& other) const;
ContentSettingsForOneType mixed_content_rules;
@@ -839,26 +839,23 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings.mojom.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
@@ -365,6 +367,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
allow = allow || IsAllowlistedForContentSettings();
@@ -368,6 +370,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
allow = allow || IsAllowlistedForContentSettingsCromite();
cached_script_permissions_[frame] = allow;
+ if (allow) UpdateOverrides();
return allow;
}
@@ -380,7 +383,9 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource(
content_setting_rules_->script_rules, script_url);
allow = setting != CONTENT_SETTING_BLOCK;
@@ -383,6 +386,7 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource(
ContentSettingsType::JAVASCRIPT, script_url, enabled_per_settings);
}
- return allow || IsAllowlistedForContentSettings();
+ allow = allow || IsAllowlistedForContentSettings();
allow = allow || IsAllowlistedForContentSettingsCromite();
+ if (allow) UpdateOverrides();
+ return allow;
return allow;
}
bool ContentSettingsAgentImpl::AllowReadFromClipboard() {
@@ -477,4 +482,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
@@ -480,4 +484,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
return false;
}
@@ -952,7 +949,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h
namespace blink {
class WebFrame;
class WebURL;
@@ -173,6 +178,12 @@ class ContentSettingsAgentImpl
@@ -175,6 +180,12 @@ class ContentSettingsAgentImpl
std::unique_ptr<Delegate> delegate_;
mojo::AssociatedReceiverSet<mojom::ContentSettingsAgent> receivers_;
+2 -2
View File
@@ -554,7 +554,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b
// Informs the local root's document and its local descendant subtree that a
// media query value changed.
@@ -1087,6 +1088,7 @@ class CORE_EXPORT LocalFrame final
@@ -1081,6 +1082,7 @@ class CORE_EXPORT LocalFrame final
unsigned hidden_ : 1;
float page_zoom_factor_;
@@ -745,7 +745,7 @@ diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/re
namespace blink {
namespace {
@@ -1083,7 +1089,94 @@ void Page::UpdateAcceleratedCompositingSettings() {
@@ -1082,7 +1088,94 @@ void Page::UpdateAcceleratedCompositingSettings() {
}
}
@@ -121,7 +121,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"//chrome/test/data/android/",
"//chrome/test/data/autofill/",
"//chrome/test/data/background_sync/",
@@ -3850,6 +3857,7 @@ group("jni_headers") {
@@ -3851,6 +3858,7 @@ group("jni_headers") {
"//chrome/browser/util:jni_headers",
"//chrome/browser/webauthn/android:jni_headers",
"//components/browser_ui/device_lock/android:device_lock_bridge_jni_headers",
@@ -132,7 +132,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3516,6 +3516,17 @@ static_library("browser") {
@@ -3522,6 +3522,17 @@ static_library("browser") {
"webauthn/android/webauthn_request_delegate_android.h",
]
@@ -150,7 +150,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
public_deps += [
"//chrome/android/features/dev_ui:buildflags",
@@ -3713,6 +3724,9 @@ static_library("browser") {
@@ -3719,6 +3730,9 @@ static_library("browser") {
"//url",
]
@@ -176,7 +176,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
"//components/assist_ranker",
"//components/autofill/content/browser",
"//components/autofill/content/common:features",
@@ -3489,6 +3515,8 @@ static_library("browser") {
@@ -3495,6 +3521,8 @@ static_library("browser") {
"webauthn/android/webauthn_request_delegate_android.cc",
"webauthn/android/webauthn_request_delegate_android.h",
]
@@ -185,7 +185,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
public_deps += [
"//chrome/android/features/dev_ui:buildflags",
"//components/image_fetcher/core",
@@ -3685,6 +3713,7 @@ static_library("browser") {
@@ -3691,6 +3719,7 @@ static_library("browser") {
"//url",
]
@@ -55,12 +55,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
components/search_provider_logos/BUILD.gn | 2 -
.../logo_service_impl.cc | 16 +-
components/url_matcher/url_util.cc | 83 -----
...gled-chromium-no-special-hosts-domains.inc | 1 +
.../webid/identity_url_loader_throttle.cc | 1 +
...gled-chromium-no-special-hosts-domains.inc | 1 +
net/base/url_util.cc | 25 +-
services/network/network_context.cc | 2 +-
52 files changed, 58 insertions(+), 807 deletions(-)
create mode 100644 cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc
create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
@@ -1635,12 +1634,17 @@ diff --git a/components/url_matcher/url_util.cc b/components/url_matcher/url_uti
return GURL();
}
diff --git a/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_DISABLED(kFedCmIdpSigninStatusMetrics);
diff --git a/content/common/webid/identity_url_loader_throttle.cc b/content/common/webid/identity_url_loader_throttle.cc
--- a/content/common/webid/identity_url_loader_throttle.cc
+++ b/content/common/webid/identity_url_loader_throttle.cc
@@ -36,6 +36,7 @@ namespace content {
std::unique_ptr<blink::URLLoaderThrottle> MaybeCreateIdentityUrlLoaderThrottle(
SetIdpStatusCallback cb) {
+ if ((true)) return nullptr;
return std::make_unique<IdentityUrlLoaderThrottle>(std::move(cb));
}
diff --git a/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc
new file mode 100644
--- /dev/null