Patches for 141 (final)
This commit is contained in:
@@ -4,21 +4,22 @@ Subject: Add Alt+D hotkey to focus address bar
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../src/org/chromium/chrome/browser/KeyboardShortcuts.java | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
.../src/org/chromium/chrome/browser/KeyboardShortcuts.java | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
@@ -895,6 +895,11 @@ public class KeyboardShortcuts {
|
||||
@@ -895,6 +895,12 @@ public class KeyboardShortcuts {
|
||||
KeyEvent.KEYCODE_ESCAPE,
|
||||
KeyEvent.META_CTRL_ON);
|
||||
}
|
||||
+ addShortcut(context,
|
||||
+ shortcutGroupsById.get(R.string.keyboard_shortcut_chrome_feature_group_header),
|
||||
+ R.string.keyboard_shortcut_address_bar,
|
||||
+ KeyEvent.KEYCODE_D,
|
||||
+ KeyEvent.META_ALT_ON);
|
||||
+ shortcutGroupsById,
|
||||
+ R.string.keyboard_shortcut_chrome_feature_group_header,
|
||||
+ R.string.keyboard_shortcut_address_bar,
|
||||
+ KeyEvent.KEYCODE_D,
|
||||
+ KeyEvent.META_ALT_ON);
|
||||
return new ArrayList<>(shortcutGroupsById.values());
|
||||
}
|
||||
|
||||
|
||||
@@ -802,7 +802,7 @@ new file mode 100644
|
||||
+ ApplicationLifetime.terminate(true);
|
||||
+ }
|
||||
+ }, Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setDefaultLines(false)
|
||||
+ .setAction(getActivity().getString(R.string.relaunch),
|
||||
+ /*actionData*/null)
|
||||
+ .setDuration(/*durationMs*/70000);
|
||||
|
||||
@@ -164,7 +164,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -177,8 +177,8 @@ new file mode 100644
|
||||
+public class BromiteAutoplayContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteAutoplayContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.AUTOPLAY,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "autoplay",
|
||||
+ /*profilePrefKey*/ "autoplay");
|
||||
@@ -197,11 +197,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_autoplay_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_autoplay_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -229,8 +229,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/autoplay.grdp b/components/browser_ui/strings/bromite_content_settings/autoplay.grdp
|
||||
|
||||
@@ -605,7 +605,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
|
||||
+ ApplicationLifetime.terminate(true);
|
||||
+ }
|
||||
+ }, Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setDefaultLines(false)
|
||||
+ .setAction(mActivity.getString(R.string.relaunch),
|
||||
+ /*actionData*/null)
|
||||
+ .setDuration(/*durationMs*/70000);
|
||||
|
||||
@@ -81,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/Ext
|
||||
public boolean shouldDisableExternalIntentRequestsForUrl(
|
||||
ExternalNavigationParams params, Intent intent) {
|
||||
- return false;
|
||||
+ if ("tel".equals(url.getScheme())) return false;
|
||||
+ if ("tel".equals(params.getUrl().getScheme())) return false;
|
||||
+ return !sAllowExternalIntentRequests.getInstance().isEnabled();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../dialogs/DownloadLocationCustomView.java | 4 +-
|
||||
.../strings/android_chrome_strings.grd | 3 ++
|
||||
.../bookmark_ui_operations_helper.cc | 2 +
|
||||
.../bookmark_bar_page_handler.cc | 2 +
|
||||
components/bookmark_bar_strings.grdp | 6 +++
|
||||
.../bookmarks/browser/bookmark_codec.cc | 20 +++++++--
|
||||
components/bookmarks/browser/bookmark_codec.h | 7 ++-
|
||||
@@ -30,7 +31,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 | 9 +++-
|
||||
.../bookmark_specifics_conversions.cc | 1 +
|
||||
26 files changed, 255 insertions(+), 14 deletions(-)
|
||||
27 files changed, 257 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/values/ids.xml b/chrome/android/java/res/values/ids.xml
|
||||
--- a/chrome/android/java/res/values/ids.xml
|
||||
@@ -481,6 +482,18 @@ diff --git a/chrome/browser/ui/bookmarks/bookmark_ui_operations_helper.cc b/chro
|
||||
case bookmarks::BookmarkNode::URL:
|
||||
NOTREACHED();
|
||||
case bookmarks::BookmarkNode::FOLDER:
|
||||
diff --git a/chrome/browser/ui/webui_browser/bookmark_bar_page_handler.cc b/chrome/browser/ui/webui_browser/bookmark_bar_page_handler.cc
|
||||
--- a/chrome/browser/ui/webui_browser/bookmark_bar_page_handler.cc
|
||||
+++ b/chrome/browser/ui/webui_browser/bookmark_bar_page_handler.cc
|
||||
@@ -37,6 +37,8 @@ bookmark_bar::mojom::BookmarkType ConvertType(
|
||||
return bookmark_bar::mojom::BookmarkType::OTHER_NODE;
|
||||
case bookmarks::BookmarkNode::MOBILE:
|
||||
return bookmark_bar::mojom::BookmarkType::MOBILE;
|
||||
+ case bookmarks::BookmarkNode::TABS_COLLECTION:
|
||||
+ NOTREACHED();
|
||||
}
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/components/bookmark_bar_strings.grdp b/components/bookmark_bar_strings.grdp
|
||||
--- a/components/bookmark_bar_strings.grdp
|
||||
+++ b/components/bookmark_bar_strings.grdp
|
||||
|
||||
@@ -4,11 +4,11 @@ Subject: Add option to not persist tabs across sessions
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 5 ++++-
|
||||
.../privacy/settings/PrivacySettings.java | 16 +++++++++++++++-
|
||||
.../android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
4 files changed, 30 insertions(+), 2 deletions(-)
|
||||
.../android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 5 ++++-
|
||||
.../browser/privacy/settings/PrivacySettings.java | 15 ++++++++++++++-
|
||||
.../ui/android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
4 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -59,17 +59,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
@@ -21,7 +22,9 @@ import android.view.View;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@@ -22,6 +23,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
+import org.chromium.base.BuildInfo;
|
||||
import org.chromium.base.Callback;
|
||||
+import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.IntentUtils;
|
||||
import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.base.metrics.RecordUserAction;
|
||||
@@ -114,6 +117,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
@@ -114,6 +116,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
private final SharedPreferencesManager mSharedPreferencesManager =
|
||||
ChromeSharedPreferences.getInstance();
|
||||
|
||||
@@ -78,7 +76,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
@VisibleForTesting static final String PREF_THIRD_PARTY_COOKIES = "third_party_cookies";
|
||||
@VisibleForTesting static final String PREF_TRACKING_PROTECTION = "tracking_protection";
|
||||
@@ -382,7 +387,11 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
@@ -382,7 +386,11 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
@@ -91,7 +89,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
UserPrefs.get(getProfile())
|
||||
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
} else if (PREF_HTTPS_FIRST_MODE_LEGACY.equals(key)) {
|
||||
@@ -442,6 +451,11 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
@@ -442,6 +450,11 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
getContext(), getProfile()));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -65,8 +65,8 @@ new file mode 100644
|
||||
+public class BromiteWebGLContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteWebGLContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.WEBGL,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "webgl",
|
||||
+ /*profilePrefKey*/ "webgl");
|
||||
@@ -85,11 +85,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_webgl_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_webgl_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -117,8 +117,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/webgl.grdp b/components/browser_ui/strings/bromite_content_settings/webgl.grdp
|
||||
|
||||
@@ -49,7 +49,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -62,8 +62,8 @@ new file mode 100644
|
||||
+public class BromiteWebRTCContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteWebRTCContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.WEBRTC,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "webrtc",
|
||||
+ /*profilePrefKey*/ "webrtc");
|
||||
@@ -82,11 +82,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_webrtc_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_webrtc_disabled;
|
||||
+ default:
|
||||
+ // this will cause a runtime exception
|
||||
@@ -115,8 +115,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/webrtc.grdp b/components/browser_ui/strings/bromite_content_settings/webrtc.grdp
|
||||
|
||||
@@ -36,7 +36,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../settings/ChromeBaseSettingsFragment.java | 4 ++
|
||||
.../Pixel-perfect-mode.grdp | 9 ++++
|
||||
.../common/interventions_features.cc | 1 +
|
||||
components/input/BUILD.gn | 1 +
|
||||
components/input/BUILD.gn | 2 +
|
||||
components/input/android_input_helper.cc | 2 +-
|
||||
components/input/child_frame_input_helper.cc | 2 +-
|
||||
components/input/input_router_impl.cc | 2 +-
|
||||
@@ -109,7 +109,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
ui/display/mojom/screen_info_mojom_traits.h | 4 ++
|
||||
ui/display/screen_info.h | 1 +
|
||||
ui/events/blink/blink_event_util.cc | 2 +-
|
||||
99 files changed, 533 insertions(+), 140 deletions(-)
|
||||
99 files changed, 534 insertions(+), 140 deletions(-)
|
||||
create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sPixelPerfect.java
|
||||
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Pixel-perfect-mode.grdp
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Pixel-perfect-mode.inc
|
||||
@@ -740,10 +740,11 @@ diff --git a/components/fingerprinting_protection_filter/interventions/common/in
|
||||
diff --git a/components/input/BUILD.gn b/components/input/BUILD.gn
|
||||
--- a/components/input/BUILD.gn
|
||||
+++ b/components/input/BUILD.gn
|
||||
@@ -101,6 +101,7 @@ component("input") {
|
||||
@@ -101,6 +101,8 @@ component("input") {
|
||||
"//ui/events:gesture_detection",
|
||||
"//ui/events/blink",
|
||||
"//ui/events/gestures/blink",
|
||||
+ "//content/public/common:buildflags",
|
||||
+ "//tools/v8_context_snapshot:buildflags",
|
||||
]
|
||||
if (use_aura) {
|
||||
|
||||
@@ -199,7 +199,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in
|
||||
+ Snackbar snackbar = Snackbar.make(
|
||||
+ mContext.getString(R.string.ask_to_restart_on_connection_change_restart),
|
||||
+ /* snackbarController */ this, Snackbar.TYPE_PERSISTENT, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setDefaultLines(false)
|
||||
+ .setAction(mContext.getString(R.string.relaunch), /*actionData*/0)
|
||||
+ .setDismissAction(mContext.getString(R.string.ask_to_restart_on_connection_change_close_notification), /*actionData*/1);
|
||||
+ SnackbarManager snackbarManager = mSnackbarManagerSupplier.get();
|
||||
|
||||
@@ -15,9 +15,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../modules/webaudio/base_audio_context.cc | 12 ++++++++++++
|
||||
.../renderer/modules/webaudio/base_audio_context.h | 2 ++
|
||||
.../modules/webaudio/offline_audio_context.cc | 1 +
|
||||
.../renderer/modules/webaudio/realtime_analyser.cc | 9 ++++++++-
|
||||
.../renderer/modules/webaudio/realtime_analyser.cc | 13 ++++++++++---
|
||||
.../platform/runtime_enabled_features.json5 | 5 ++---
|
||||
11 files changed, 57 insertions(+), 5 deletions(-)
|
||||
11 files changed, 59 insertions(+), 7 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/AudioBuffer-AnalyserNode-fp-mitigations.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_h/AudioBuffer-AnalyserNode-fp-mitigations.inc
|
||||
@@ -180,8 +180,12 @@ diff --git a/third_party/blink/renderer/modules/webaudio/realtime_analyser.cc b/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,6 +160,8 @@ void RealtimeAnalyser::GetByteFrequencyData(DOMUint8Array* destination_array,
|
||||
const double scaled_value =
|
||||
@@ -155,9 +157,11 @@ void RealtimeAnalyser::GetByteFrequencyData(DOMUint8Array* destination_array,
|
||||
|
||||
// The range m_minDecibels to m_maxDecibels will be scaled to byte values
|
||||
// from 0 to UCHAR_MAX.
|
||||
- const double scaled_value =
|
||||
+ double scaled_value =
|
||||
UCHAR_MAX * (db_mag - min_decibels) * range_scale_factor;
|
||||
|
||||
+ scaled_value = BaseAudioContext::ShuffleAudioData(scaled_value, i);
|
||||
@@ -197,7 +201,12 @@ diff --git a/third_party/blink/renderer/modules/webaudio/realtime_analyser.cc b/
|
||||
UNSAFE_TODO(destination[i]) = value;
|
||||
}
|
||||
}
|
||||
@@ -215,6 +220,8 @@ void RealtimeAnalyser::GetByteTimeDomainData(DOMUint8Array* destination_array) {
|
||||
@@ -211,10 +216,12 @@ void RealtimeAnalyser::GetByteTimeDomainData(DOMUint8Array* destination_array) {
|
||||
|
||||
for (unsigned i = 0; i < len; ++i) {
|
||||
// Buffer access is protected due to modulo operation.
|
||||
- const float value = UNSAFE_TODO(
|
||||
+ float value = UNSAFE_TODO(
|
||||
input_buffer[(i + write_index - fft_size + kInputBufferSize) %
|
||||
kInputBufferSize]);
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -173,8 +173,8 @@ new file mode 100644
|
||||
+public class BromitePopupContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromitePopupContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.POPUPS,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "popups",
|
||||
+ /*profilePrefKey*/ "popups");
|
||||
@@ -193,13 +193,13 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_popup_allowed;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_popup_blocked;
|
||||
+ case ContentSettingValues.ASK:
|
||||
+ case ContentSetting.ASK:
|
||||
+ return R.string.website_settings_category_popup_block_all;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -236,8 +236,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return ContentSettingValues.ALLOW != value;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return ContentSetting.ALLOW != value;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/popups.grdp b/components/browser_ui/strings/bromite_content_settings/popups.grdp
|
||||
|
||||
@@ -7,22 +7,22 @@ Use Google Chrome branding for client hints
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
components/embedder_support/user_agent_utils.cc | 4 +---
|
||||
content/browser/client_hints/client_hints.cc | 14 +++++++++-----
|
||||
.../browser/loader/navigation_url_loader_impl.cc | 5 +++++
|
||||
.../about_flags_cc/Client-hints-overrides.inc | 9 +++++++++
|
||||
.../common/features_cc/Client-hints-overrides.inc | 1 +
|
||||
.../cpp/features_cc/Client-hints-overrides.inc | 1 +
|
||||
net/http/http_network_transaction.cc | 1 +
|
||||
services/network/public/cpp/client_hints.cc | 1 +
|
||||
.../blink/common/client_hints/client_hints.cc | 6 ++++--
|
||||
.../common/client_hints/enabled_client_hints.cc | 6 ++++++
|
||||
.../blink/renderer/core/frame/navigator_ua.idl | 4 +++-
|
||||
.../blink/renderer/core/frame/navigator_ua_data.cc | 1 +
|
||||
.../renderer/core/frame/navigator_ua_data.idl | 5 ++++-
|
||||
.../renderer/core/loader/frame_fetch_context.cc | 4 +++-
|
||||
.../platform/runtime_enabled_features.json5 | 8 ++++++--
|
||||
15 files changed, 55 insertions(+), 15 deletions(-)
|
||||
components/embedder_support/user_agent_utils.cc | 4 +---
|
||||
content/browser/client_hints/client_hints.cc | 15 ++++++++++-----
|
||||
.../browser/loader/navigation_url_loader_impl.cc | 5 +++++
|
||||
.../about_flags_cc/Client-hints-overrides.inc | 9 +++++++++
|
||||
.../common/features_cc/Client-hints-overrides.inc | 1 +
|
||||
.../cpp/features_cc/Client-hints-overrides.inc | 1 +
|
||||
net/http/http_network_transaction.cc | 1 +
|
||||
services/network/public/cpp/client_hints.cc | 1 +
|
||||
.../blink/common/client_hints/client_hints.cc | 6 ++++--
|
||||
.../common/client_hints/enabled_client_hints.cc | 6 ++++++
|
||||
.../blink/renderer/core/frame/navigator_ua.idl | 4 +++-
|
||||
.../renderer/core/frame/navigator_ua_data.cc | 1 +
|
||||
.../renderer/core/frame/navigator_ua_data.idl | 5 ++++-
|
||||
.../renderer/core/loader/frame_fetch_context.cc | 4 +++-
|
||||
.../platform/runtime_enabled_features.json5 | 8 ++++++--
|
||||
15 files changed, 56 insertions(+), 15 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc
|
||||
create mode 100644 cromite_flags/content/common/features_cc/Client-hints-overrides.inc
|
||||
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc
|
||||
@@ -62,7 +62,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie
|
||||
if (!disable_due_to_custom_ua) {
|
||||
if (!ua_metadata.has_value())
|
||||
ua_metadata = delegate->GetUserAgentMetadata();
|
||||
@@ -897,10 +899,11 @@ void AddRequestClientHintsHeaders(
|
||||
@@ -897,10 +899,12 @@ void AddRequestClientHintsHeaders(
|
||||
AddEctHeader(headers, network_quality_tracker, url);
|
||||
}
|
||||
|
||||
@@ -75,10 +75,11 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie
|
||||
+ delegate, is_ua_override_on, frame_tree_node,
|
||||
+ ClientUaHeaderCallType::kDuringCreation, headers, container_policy, data,
|
||||
+ ftn_for_devtools_override);
|
||||
+ }
|
||||
|
||||
if (ShouldAddClientHint(data, WebClientHintsType::kPrefersColorScheme)) {
|
||||
AddPrefersColorSchemeHeader(headers, frame_tree_node);
|
||||
@@ -988,6 +991,7 @@ ParseAndPersistAcceptCHForNavigation(
|
||||
@@ -988,6 +992,7 @@ ParseAndPersistAcceptCHForNavigation(
|
||||
BrowserContext* context,
|
||||
ClientHintsControllerDelegate* delegate,
|
||||
FrameTreeNode* frame_tree_node) {
|
||||
|
||||
@@ -32,7 +32,7 @@ Require: bromite-build-utils.patch
|
||||
.../ui/views/page_info/page_info_main_view.cc | 28 +-
|
||||
.../views/page_info/page_info_view_factory.cc | 20 +
|
||||
.../views/page_info/page_info_view_factory.h | 5 +
|
||||
.../page_info/permission_toggle_row_view.cc | 183 ++++++--
|
||||
.../page_info/permission_toggle_row_view.cc | 188 ++++++--
|
||||
.../page_info/permission_toggle_row_view.h | 18 +-
|
||||
.../settings_localized_strings_provider.cc | 54 +++
|
||||
.../ui/webui/settings/site_settings_helper.cc | 46 +-
|
||||
@@ -43,9 +43,9 @@ Require: bromite-build-utils.patch
|
||||
.../res/xml/site_settings_preferences.xml | 7 +
|
||||
.../site_settings/AllSiteSettings.java | 5 +-
|
||||
.../BromiteCustomContentSetting.java | 155 +++++++
|
||||
.../BromiteCustomContentSettingImpl.java | 412 ++++++++++++++++++
|
||||
.../BromiteCustomContentSettingImpl.java | 415 ++++++++++++++++++
|
||||
...tomTriStateSiteSettingsPreferenceImpl.java | 24 +
|
||||
.../ContentSettingsResources.java | 37 +-
|
||||
.../ContentSettingsResources.java | 39 +-
|
||||
.../site_settings/SingleCategorySettings.java | 57 ++-
|
||||
.../site_settings/SingleWebsiteSettings.java | 53 ++-
|
||||
.../site_settings/SiteSettings.java | 33 +-
|
||||
@@ -78,7 +78,6 @@ Require: bromite-build-utils.patch
|
||||
.../renderer/content_settings_agent_impl.cc | 74 ++++
|
||||
.../renderer/content_settings_agent_impl.h | 9 +
|
||||
.../PageInfoPermissionsController.java | 9 +
|
||||
.../PermissionParamsListBuilder.java | 8 +
|
||||
.../android/page_info_controller_android.cc | 18 +
|
||||
components/page_info/page_info.cc | 23 +-
|
||||
components/page_info/page_info_ui.cc | 25 ++
|
||||
@@ -86,7 +85,7 @@ Require: bromite-build-utils.patch
|
||||
.../platform/web_content_settings_client.h | 13 +
|
||||
.../execution_context/execution_context.cc | 16 +
|
||||
.../execution_context/execution_context.h | 5 +
|
||||
75 files changed, 1963 insertions(+), 108 deletions(-)
|
||||
74 files changed, 1965 insertions(+), 108 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
|
||||
@@ -866,14 +865,14 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom
|
||||
bool blocked_on_system_level) {
|
||||
PermissionSetting setting =
|
||||
permission.setting.value_or(permission.default_setting);
|
||||
+ return GetPermissionIcon(info, blocked_on_system_level, setting);
|
||||
+ return GetPermissionIcon(permission, blocked_on_system_level, setting);
|
||||
+}
|
||||
|
||||
+// static
|
||||
+const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
|
||||
+ const PageInfo::PermissionInfo& permission,
|
||||
+ bool blocked_on_system_level,
|
||||
+ ContentSetting setting) {
|
||||
+ PermissionSetting setting) {
|
||||
auto* info = content_settings::PermissionSettingsRegistry::GetInstance()->Get(
|
||||
permission.type);
|
||||
// For guard content settings and Automatic Picture-in-Picture, ASK is treated
|
||||
@@ -885,7 +884,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom
|
||||
+ content_settings::WebsiteSettingsRegistry* website_settings =
|
||||
+ content_settings::WebsiteSettingsRegistry::GetInstance();
|
||||
+ for (const content_settings::WebsiteSettingsInfo* cs : *website_settings) {
|
||||
+ if (cs->type() == info.type && cs->show_into_info_page()) {
|
||||
+ if (cs->type() == permission.type && cs->show_into_info_page()) {
|
||||
+ icon = &vector_icons::kProtectedContentIcon;
|
||||
+ found = true;
|
||||
+ break;
|
||||
@@ -905,7 +904,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.h b/chrome
|
||||
+ static const ui::ImageModel GetPermissionIcon(
|
||||
+ const PageInfo::PermissionInfo& info,
|
||||
+ bool blocked_on_system_level,
|
||||
+ ContentSetting setting);
|
||||
+ PermissionSetting setting);
|
||||
+
|
||||
// Returns the icon for the given object |info|.
|
||||
static const ui::ImageModel GetChosenObjectIcon(
|
||||
@@ -913,7 +912,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.h b/chrome
|
||||
diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc
|
||||
--- a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc
|
||||
+++ b/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc
|
||||
@@ -39,6 +39,31 @@
|
||||
@@ -39,6 +39,34 @@
|
||||
#include "ui/views/controls/styled_label.h"
|
||||
#include "ui/views/style/typography.h"
|
||||
#include "ui/views/view_class_properties.h"
|
||||
@@ -922,30 +921,33 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
+
|
||||
+namespace {
|
||||
+ bool IsAllowed(const PageInfo::PermissionInfo& permission) {
|
||||
+ if (permission.setting == CONTENT_SETTING_DEFAULT)
|
||||
+ return permission.default_setting == CONTENT_SETTING_ALLOW;
|
||||
+ auto value = std::get<ContentSetting>(permission.setting.value_or(CONTENT_SETTING_DEFAULT));
|
||||
+ if (value == CONTENT_SETTING_DEFAULT)
|
||||
+ return std::get<ContentSetting>(permission.default_setting) == CONTENT_SETTING_ALLOW;
|
||||
+ else
|
||||
+ return permission.setting == CONTENT_SETTING_ALLOW;
|
||||
+ return value == CONTENT_SETTING_ALLOW;
|
||||
+ }
|
||||
+
|
||||
+ bool IsBlocked(const PageInfo::PermissionInfo& permission) {
|
||||
+ if (permission.setting == CONTENT_SETTING_DEFAULT)
|
||||
+ return permission.default_setting == CONTENT_SETTING_BLOCK;
|
||||
+ auto value = std::get<ContentSetting>(permission.setting.value_or(CONTENT_SETTING_DEFAULT));
|
||||
+ if (value == CONTENT_SETTING_DEFAULT)
|
||||
+ return std::get<ContentSetting>(permission.default_setting) == CONTENT_SETTING_BLOCK;
|
||||
+ else
|
||||
+ return permission.setting == CONTENT_SETTING_BLOCK;
|
||||
+ return value == CONTENT_SETTING_BLOCK;
|
||||
+ }
|
||||
+
|
||||
+ bool IsAsk(const PageInfo::PermissionInfo& permission) {
|
||||
+ if (permission.setting == CONTENT_SETTING_DEFAULT)
|
||||
+ return permission.default_setting == CONTENT_SETTING_ASK;
|
||||
+ auto value = std::get<ContentSetting>(permission.setting.value_or(CONTENT_SETTING_DEFAULT));
|
||||
+ if (value == CONTENT_SETTING_DEFAULT)
|
||||
+ return std::get<ContentSetting>(permission.default_setting) == CONTENT_SETTING_ASK;
|
||||
+ else
|
||||
+ return permission.setting == CONTENT_SETTING_ASK;
|
||||
+ return value == CONTENT_SETTING_ASK;
|
||||
+ }
|
||||
+}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -73,17 +98,12 @@ PermissionToggleRowView::PermissionToggleRowView(
|
||||
@@ -73,17 +101,12 @@ PermissionToggleRowView::PermissionToggleRowView(
|
||||
navigation_handler_(navigation_handler) {
|
||||
SetUseDefaultFillLayout(true);
|
||||
row_view_ = AddChildView(std::make_unique<RichControlsContainerView>());
|
||||
@@ -964,7 +966,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
if (permission.requesting_origin.has_value()) {
|
||||
std::u16string requesting_origin_string;
|
||||
switch (permission.type) {
|
||||
@@ -181,6 +201,90 @@ void PermissionToggleRowView::UpdatePermission(
|
||||
@@ -181,6 +204,91 @@ void PermissionToggleRowView::UpdatePermission(
|
||||
UpdateUiOnPermissionChanged();
|
||||
}
|
||||
|
||||
@@ -1022,7 +1024,8 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
+}
|
||||
+
|
||||
+bool PermissionToggleRowView::IsCommandIdChecked(int command_id) const {
|
||||
+ if (permission_.setting == CONTENT_SETTING_DEFAULT && command_id == 4) {
|
||||
+ auto value = std::get<ContentSetting>(permission_.setting.value_or(CONTENT_SETTING_DEFAULT));
|
||||
+ if (value == CONTENT_SETTING_DEFAULT && command_id == 4) {
|
||||
+ return true;
|
||||
+ } else if (IsAllowed(permission_)) {
|
||||
+ return command_id == 1;
|
||||
@@ -1055,7 +1058,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
void PermissionToggleRowView::OnToggleButtonPressed() {
|
||||
PageInfoUI::ToggleBetweenAllowAndBlock(permission_);
|
||||
PermissionChanged();
|
||||
@@ -189,27 +293,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() {
|
||||
@@ -189,27 +297,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() {
|
||||
void PermissionToggleRowView::AddToggleButton(
|
||||
const std::u16string& toggle_accessible_name,
|
||||
int icon_label_spacing) {
|
||||
@@ -1090,7 +1093,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
}
|
||||
|
||||
void PermissionToggleRowView::InitForUserSource(
|
||||
@@ -251,12 +347,6 @@ void PermissionToggleRowView::InitForUserSource(
|
||||
@@ -251,12 +351,6 @@ void PermissionToggleRowView::InitForUserSource(
|
||||
auto spacer_view = std::make_unique<views::View>();
|
||||
spacer_view->SetPreferredSize(gfx::Size(icon_size, icon_size));
|
||||
spacer_view_ = row_view_->AddControl(std::move(spacer_view));
|
||||
@@ -1103,13 +1106,14 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -282,6 +372,14 @@ void PermissionToggleRowView::InitForManagedSource(
|
||||
@@ -282,6 +376,15 @@ void PermissionToggleRowView::InitForManagedSource(
|
||||
}
|
||||
|
||||
void PermissionToggleRowView::UpdateUiOnPermissionChanged() {
|
||||
+ auto value = std::get<ContentSetting>(permission_.setting.value_or(CONTENT_SETTING_DEFAULT));
|
||||
+ if (choose_button_) {
|
||||
+ choose_button_->SetEnabledTextColors(std::nullopt);
|
||||
+ if (permission_.setting == CONTENT_SETTING_DEFAULT) {
|
||||
+ if (value == CONTENT_SETTING_DEFAULT) {
|
||||
+ choose_button_->SetTextColor(views::Button::ButtonState::STATE_NORMAL,
|
||||
+ ui::kColorLabelForeground);
|
||||
+ }
|
||||
@@ -1118,7 +1122,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
if (blocked_on_system_level_label_) {
|
||||
if (!permission_.setting) {
|
||||
permission_blocked_on_system_level_ = false;
|
||||
@@ -326,6 +424,37 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() {
|
||||
@@ -326,6 +429,37 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1148,7 +1152,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c
|
||||
+ caption = u"Unknown";
|
||||
+ }
|
||||
+ choose_button_->SetText(caption);
|
||||
+ if (permission_.setting == CONTENT_SETTING_DEFAULT) {
|
||||
+ if (value == CONTENT_SETTING_DEFAULT) {
|
||||
+ choose_button_->SetTextColor(views::Button::ButtonState::STATE_NORMAL,
|
||||
+ ui::kColorLabelForeground);
|
||||
+ }
|
||||
@@ -1641,7 +1645,7 @@ new file mode 100644
|
||||
+
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -1655,15 +1659,15 @@ new file mode 100644
|
||||
+
|
||||
+ private @ContentSettingsType.EnumType int mContentSettingsType;
|
||||
+ private @SiteSettingsCategory.Type int mSiteSettingsCategory;
|
||||
+ private @ContentSettingValues Integer mDefaultEnabledValue;
|
||||
+ private @ContentSettingValues Integer mDefaultDisabledValue;
|
||||
+ private @ContentSetting Integer mDefaultEnabledValue;
|
||||
+ private @ContentSetting Integer mDefaultDisabledValue;
|
||||
+ private boolean mAllowException;
|
||||
+ private String mPreferenceKey;
|
||||
+ private String mProfilePrefKey;
|
||||
+
|
||||
+ public BromiteCustomContentSetting(@ContentSettingsType.EnumType int contentSettingsType,
|
||||
+ @ContentSettingValues Integer defaultEnabledValue,
|
||||
+ @ContentSettingValues Integer defaultDisabledValue,
|
||||
+ @ContentSetting Integer defaultEnabledValue,
|
||||
+ @ContentSetting Integer defaultDisabledValue,
|
||||
+ boolean allowException,
|
||||
+ String preferenceKey,
|
||||
+ String profilePrefKey) {
|
||||
@@ -1687,21 +1691,21 @@ new file mode 100644
|
||||
+ return mSiteSettingsCategory;
|
||||
+ }
|
||||
+
|
||||
+ protected @ContentSettingValues Integer getDefaultEnabledValue() {
|
||||
+ protected @ContentSetting Integer getDefaultEnabledValue() {
|
||||
+ return mDefaultEnabledValue;
|
||||
+ }
|
||||
+
|
||||
+ public @ContentSettingValues Integer getDefaultDisabledValue() {
|
||||
+ public @ContentSetting Integer getDefaultDisabledValue() {
|
||||
+ return mDefaultDisabledValue;
|
||||
+ }
|
||||
+
|
||||
+ public Preference createWebSitePreference(Context context,
|
||||
+ @ContentSettingValues @Nullable Integer value) {
|
||||
+ @ContentSetting @Nullable Integer value) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public boolean setWebSitePreferenceValue(Preference preference,
|
||||
+ @ContentSettingValues @Nullable Integer value) {
|
||||
+ @ContentSetting @Nullable Integer value) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@@ -1726,22 +1730,22 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ public abstract ContentSettingsResources.ResourceItem getResourceItem();
|
||||
+ public abstract int getCategorySummary(@Nullable @ContentSettingValues int value);
|
||||
+ public abstract int getCategorySummary(@Nullable @ContentSetting int value);
|
||||
+ public abstract int getAddExceptionDialogMessage();
|
||||
+ public abstract int getCategoryDescription();
|
||||
+
|
||||
+ public boolean processOnBlockList(@ContentSettingValues Integer value) {
|
||||
+ public boolean processOnBlockList(@ContentSetting Integer value) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isOnBlockList(@ContentSettingValues Integer contentSetting) {
|
||||
+ public boolean isOnBlockList(@ContentSetting Integer contentSetting) {
|
||||
+ return mDefaultDisabledValue == contentSetting;
|
||||
+ }
|
||||
+
|
||||
+ public abstract @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value);
|
||||
+ public abstract @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value);
|
||||
+
|
||||
+ public ContentSettingException createCustomException(@ContentSettingsType.EnumType int type,
|
||||
+ @ContentSettingValues int value,
|
||||
+ @ContentSetting int value,
|
||||
+ WebsiteAddress websiteAddress) {
|
||||
+ return null;
|
||||
+ }
|
||||
@@ -1777,7 +1781,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
@@ -0,0 +1,412 @@
|
||||
@@ -0,0 +1,415 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -1804,7 +1808,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.settings.SpinnerPreference;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.components.content_settings.ProviderType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
@@ -1824,17 +1828,17 @@ new file mode 100644
|
||||
+ extends BromiteCustomContentSettingImplBase {
|
||||
+
|
||||
+ static class ContentSettingsSpinnerOption {
|
||||
+ private @ContentSettingValues int mValue;
|
||||
+ private @ContentSetting int mValue;
|
||||
+ private String mDescription;
|
||||
+
|
||||
+ public ContentSettingsSpinnerOption(
|
||||
+ @ContentSettingValues int value,
|
||||
+ @ContentSetting int value,
|
||||
+ String description) {
|
||||
+ mValue = value;
|
||||
+ mDescription = description;
|
||||
+ }
|
||||
+
|
||||
+ public @ContentSettingValues int getValue() {
|
||||
+ public @ContentSetting int getValue() {
|
||||
+ return mValue;
|
||||
+ }
|
||||
+
|
||||
@@ -1870,7 +1874,7 @@ new file mode 100644
|
||||
+ public static Preference createWebSitePreference(
|
||||
+ @ContentSettingsType.EnumType int type,
|
||||
+ Context context,
|
||||
+ @ContentSettingValues @Nullable Integer value) {
|
||||
+ @ContentSetting @Nullable Integer value) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) {
|
||||
+ Preference pref = cs.createWebSitePreference(context, value);
|
||||
@@ -1881,13 +1885,13 @@ new file mode 100644
|
||||
+
|
||||
+ List<ContentSettingsSpinnerOption> options = new ArrayList<>();
|
||||
+ options.add(new ContentSettingsSpinnerOption(
|
||||
+ ContentSettingValues.ALLOW,
|
||||
+ ContentSetting.ALLOW,
|
||||
+ context.getText(descriptions[0]).toString()));
|
||||
+ options.add(new ContentSettingsSpinnerOption(
|
||||
+ ContentSettingValues.ASK,
|
||||
+ ContentSetting.ASK,
|
||||
+ context.getText(descriptions[1]).toString()));
|
||||
+ options.add(new ContentSettingsSpinnerOption(
|
||||
+ ContentSettingValues.BLOCK,
|
||||
+ ContentSetting.BLOCK,
|
||||
+ context.getText(descriptions[2]).toString()));
|
||||
+
|
||||
+ SpinnerPreference spinner = new SpinnerPreference(context, true);
|
||||
@@ -1900,14 +1904,14 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ private static int GetContentSettingValuesIndex(
|
||||
+ @ContentSettingValues @Nullable Integer value) {
|
||||
+ @ContentSetting @Nullable Integer value) {
|
||||
+ if (value == null)
|
||||
+ return 0;
|
||||
+ else if (value == ContentSettingValues.ALLOW)
|
||||
+ else if (value == ContentSetting.ALLOW)
|
||||
+ return 0;
|
||||
+ else if (value == ContentSettingValues.ASK)
|
||||
+ else if (value == ContentSetting.ASK)
|
||||
+ return 1;
|
||||
+ else if (value == ContentSettingValues.BLOCK)
|
||||
+ else if (value == ContentSetting.BLOCK)
|
||||
+ return 2;
|
||||
+ return 0;
|
||||
+ }
|
||||
@@ -1915,7 +1919,7 @@ new file mode 100644
|
||||
+ public static void setWebSitePreferenceValue(
|
||||
+ @ContentSettingsType.EnumType int type,
|
||||
+ Preference preference,
|
||||
+ @ContentSettingValues @Nullable Integer value) {
|
||||
+ @ContentSetting @Nullable Integer value) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) {
|
||||
+ if (cs.setWebSitePreferenceValue(preference, value))
|
||||
@@ -1984,7 +1988,10 @@ new file mode 100644
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public static int getCategorySummary(@ContentSettingsType.EnumType int type, @Nullable @ContentSettingValues int value) {
|
||||
+ public static int getCategorySummary(@ContentSettingsType.EnumType int type,
|
||||
+ @Nullable @ContentSetting int value,
|
||||
+ boolean isOneTime,
|
||||
+ boolean isApproximateGeolocation) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) return cs.getCategorySummary(value);
|
||||
+ return 0;
|
||||
@@ -2032,7 +2039,7 @@ new file mode 100644
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public static boolean processOnBlockList(@ContentSettingsType.EnumType int type, @ContentSettingValues Integer value) {
|
||||
+ public static boolean processOnBlockList(@ContentSettingsType.EnumType int type, @ContentSetting Integer value) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) return cs.processOnBlockList(value);
|
||||
+ return false;
|
||||
@@ -2040,13 +2047,13 @@ new file mode 100644
|
||||
+
|
||||
+ public static boolean isOnBlockList(@ContentSettingsType.EnumType int type,
|
||||
+ WebsitePreference website,
|
||||
+ @ContentSettingValues Integer contentSetting) {
|
||||
+ @ContentSetting Integer contentSetting) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) return cs.isOnBlockList(contentSetting);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public static @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ public static @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ for (BromiteCustomContentSetting cs : mItemList) {
|
||||
+ if (category.getType() == cs.getSiteSettingsCategory()) {
|
||||
+ return cs.considerException(category, value);
|
||||
@@ -2131,7 +2138,7 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ public static ContentSettingException createCustomException(@ContentSettingsType.EnumType int type,
|
||||
+ @ContentSettingValues int value,
|
||||
+ @ContentSetting int value,
|
||||
+ WebsiteAddress websiteAddress) {
|
||||
+ BromiteCustomContentSetting cs = getContentSetting(type);
|
||||
+ if (cs != null) {
|
||||
@@ -2159,7 +2166,7 @@ new file mode 100644
|
||||
+ descriptions[1] = context.getString(values[1]); // ASK
|
||||
+ descriptions[2] = context.getString(values[2]); // BLOCKED
|
||||
+
|
||||
+ @ContentSettingValues
|
||||
+ @ContentSetting
|
||||
+ Integer value = site.getContentSetting(browserContextHandle, type);
|
||||
+
|
||||
+ return new AlertDialog.Builder(context, R.style.ThemeOverlay_BrowserUI_AlertDialog)
|
||||
@@ -2167,19 +2174,19 @@ new file mode 100644
|
||||
+ .setNegativeButton(R.string.remove,
|
||||
+ (dialog, which) -> {
|
||||
+ site.setContentSetting(browserContextHandle, type,
|
||||
+ ContentSettingValues.DEFAULT);
|
||||
+ ContentSetting.DEFAULT);
|
||||
+ listener.onClick(dialog, which);
|
||||
+ dialog.dismiss();
|
||||
+ })
|
||||
+ .setSingleChoiceItems(descriptions,
|
||||
+ value == ContentSettingValues.ALLOW ? 0 :
|
||||
+ value == ContentSettingValues.ASK ? 1 :
|
||||
+ value == ContentSetting.ALLOW ? 0 :
|
||||
+ value == ContentSetting.ASK ? 1 :
|
||||
+ 2,
|
||||
+ (dialog, which) -> {
|
||||
+ @ContentSettingValues
|
||||
+ int permission = which == 0 ? ContentSettingValues.ALLOW :
|
||||
+ which == 1 ? ContentSettingValues.ASK :
|
||||
+ ContentSettingValues.BLOCK;
|
||||
+ @ContentSetting
|
||||
+ int permission = which == 0 ? ContentSetting.ALLOW :
|
||||
+ which == 1 ? ContentSetting.ASK :
|
||||
+ ContentSetting.BLOCK;
|
||||
+ site.setContentSetting(
|
||||
+ browserContextHandle, type, permission);
|
||||
+
|
||||
@@ -2214,10 +2221,10 @@ new file mode 100644
|
||||
+
|
||||
+package org.chromium.components.browser_ui.site_settings;
|
||||
+
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+
|
||||
+public interface BromiteCustomTriStateSiteSettingsPreferenceImpl {
|
||||
+ public @ContentSettingValues int getCheckedSetting();
|
||||
+ public @ContentSetting int getCheckedSetting();
|
||||
+}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
@@ -2239,8 +2246,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
+ public ResourceItem(
|
||||
+ int icon,
|
||||
+ int title,
|
||||
+ @ContentSettingValues @Nullable Integer defaultEnabledValue,
|
||||
+ @ContentSettingValues @Nullable Integer defaultDisabledValue,
|
||||
+ @ContentSetting @Nullable Integer defaultEnabledValue,
|
||||
+ @ContentSetting @Nullable Integer defaultDisabledValue,
|
||||
+ int enabledSummary,
|
||||
+ int disabledSummary,
|
||||
+ int summaryOverrideForScreenReader) {
|
||||
@@ -2270,14 +2277,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
assert false; // NOTREACHED
|
||||
return assumeNonNull(null);
|
||||
}
|
||||
@@ -824,6 +847,14 @@ public class ContentSettingsResources {
|
||||
@@ -824,6 +847,16 @@ public class ContentSettingsResources {
|
||||
return getCategorySummary(value, isOneTime, /* isApproximateGeolocation= */ false);
|
||||
}
|
||||
|
||||
+ public static int getCategorySummary(int contentType,
|
||||
+ @Nullable @ContentSettingValues int value,
|
||||
+ boolean isOneTime) {
|
||||
+ int result = BromiteCustomContentSettingImpl.getCategorySummary(contentType, value);
|
||||
+ @Nullable @ContentSetting int value,
|
||||
+ boolean isOneTime,
|
||||
+ boolean isApproximateGeolocation) {
|
||||
+ int result = BromiteCustomContentSettingImpl.getCategorySummary(contentType,
|
||||
+ value, isOneTime, isApproximateGeolocation);
|
||||
+ if (result != 0) return result;
|
||||
+ return getCategorySummary(value, isOneTime);
|
||||
+ }
|
||||
@@ -2285,7 +2294,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
/**
|
||||
* Returns the string resource id for a given ContentSetting to show with a permission category.
|
||||
*
|
||||
@@ -1002,6 +1033,8 @@ public class ContentSettingsResources {
|
||||
@@ -1002,6 +1035,8 @@ public class ContentSettingsResources {
|
||||
*/
|
||||
public static int @Nullable [] getTriStateSettingDescriptionIDs(
|
||||
int contentType, boolean isPermissionSiteSettingsRadioButtonFeatureEnabled) {
|
||||
@@ -2486,7 +2495,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
- for (@ContentSettingsType.EnumType int type : SiteSettingsUtil.SETTINGS_ORDER) {
|
||||
+ List<Integer> order = BromiteCustomContentSettingImpl.getSettingsOrder();
|
||||
+ for (@ContentSettingsType.EnumType int type : order) {
|
||||
+ @ContentSettingValues @Nullable Integer value =
|
||||
+ @ContentSetting @Nullable Integer value =
|
||||
+ mSite.getContentSetting(
|
||||
+ getSiteSettingsDelegate().getBrowserContextHandle(), type);
|
||||
+ if (value == null) {
|
||||
@@ -2545,7 +2554,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
- switchPreference.setBackgroundColor(
|
||||
+ Preference switchPreference = preference;
|
||||
+ if (preference instanceof ChromeSwitchPreference) {
|
||||
+ ((ChromeSwitchPreference)switchPreference).setChecked(value != ContentSettingValues.BLOCK);
|
||||
+ ((ChromeSwitchPreference)switchPreference).setChecked(value != ContentSetting.BLOCK);
|
||||
+ } else {
|
||||
+ BromiteCustomContentSettingImpl.setWebSitePreferenceValue(content_type, preference, value);
|
||||
+ }
|
||||
@@ -2626,7 +2635,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
- ContentSettingsResources.getCategorySummary(
|
||||
- defaultForToggle, /* isOneTime= */ false));
|
||||
+ int summary = ContentSettingsResources.getCategorySummary(
|
||||
+ contentType, setting, /* isOneTime= */ false);
|
||||
+ contentType, setting, /* isOneTime= */ false, /*isApproximateGeolocation*/ false);
|
||||
+ if (summary != 0) {
|
||||
+ p.setSummary(summary);
|
||||
+ } else {
|
||||
@@ -2637,7 +2646,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
+ : ContentSettingsResources.getDefaultDisabledValue(contentType);
|
||||
+ assumeNonNull(defaultForToggle);
|
||||
+ summary = ContentSettingsResources.getCategorySummary(
|
||||
+ contentType, defaultForToggle, /* isOneTime= */ false);
|
||||
+ contentType, defaultForToggle, /* isOneTime= */ false, /*isApproximateGeolocation*/ false);
|
||||
+ p.setSummary(summary);
|
||||
+ }
|
||||
}
|
||||
@@ -3415,24 +3424,6 @@ diff --git a/components/page_info/android/java/src/org/chromium/components/page_
|
||||
// More than 2 permissions.
|
||||
if (same) {
|
||||
int resId =
|
||||
diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java
|
||||
--- a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java
|
||||
+++ b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java
|
||||
@@ -100,6 +100,14 @@ public class PermissionParamsListBuilder {
|
||||
nameStringMidSentence.setSpan(
|
||||
span, 0, nameStringMidSentence.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
|
||||
+ if (permission.setting == ContentSettingValues.ASK) {
|
||||
+ allowed = false;
|
||||
+ }
|
||||
+ if (permission.type == ContentSettingsType.FILE_SYSTEM_WRITE_GUARD
|
||||
+ && permission.setting == ContentSettingValues.ASK) {
|
||||
+ // see https://source.chromium.org/chromium/chromium/src/+/e3e48613de29440ae1cf11b0ff7fa7c613d9f416
|
||||
+ allowed = true;
|
||||
+ }
|
||||
return new PermissionObject(
|
||||
/* type= */ permission.type,
|
||||
/* name= */ nameString,
|
||||
diff --git a/components/page_info/android/page_info_controller_android.cc b/components/page_info/android/page_info_controller_android.cc
|
||||
--- a/components/page_info/android/page_info_controller_android.cc
|
||||
+++ b/components/page_info/android/page_info_controller_android.cc
|
||||
|
||||
@@ -42,6 +42,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../prefs/chrome_pref_service_factory.cc | 6 +-
|
||||
.../profiles/profile_shortcut_manager_win.cc | 2 +-
|
||||
.../settings/settings_menu/settings_menu.html | 14 ++-
|
||||
.../OmniboxSuggestionsContainer.java | 8 +-
|
||||
.../strings/android_chrome_strings.grd | 2 +-
|
||||
.../toolbar/chrome_labs/chrome_labs_utils.cc | 1 +
|
||||
chrome/common/url_constants.h | 4 +-
|
||||
@@ -62,7 +63,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
content/child/runtime_features.cc | 44 ++++-----
|
||||
.../Cromite-Branding.inc | 1 +
|
||||
tools/grit/grit/grd_reader.py | 35 +++++++
|
||||
58 files changed, 204 insertions(+), 130 deletions(-)
|
||||
59 files changed, 210 insertions(+), 132 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Cromite-Branding.inc
|
||||
|
||||
diff --git a/build/BUILD.gn b/build/BUILD.gn
|
||||
@@ -13281,6 +13282,31 @@ diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html
|
||||
$i18n{aboutPageTitle}
|
||||
<cr-ripple></cr-ripple>
|
||||
</a>
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsContainer.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsContainer.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsContainer.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsContainer.java
|
||||
@@ -34,6 +34,7 @@ import org.chromium.components.omnibox.OmniboxFeatures;
|
||||
import org.chromium.ui.KeyboardVisibilityDelegate;
|
||||
import org.chromium.ui.base.DeviceFormFactor;
|
||||
import org.chromium.ui.base.ViewUtils;
|
||||
+import org.chromium.ui.KeyboardUtils;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -104,8 +105,11 @@ public class OmniboxSuggestionsContainer extends FrameLayout {
|
||||
// Omnibox.
|
||||
// Making the container `clickable=true` achieves similar goal, but this consumes all
|
||||
// activators, including keyboard <Enter> key.
|
||||
- super.onTouchEvent(event);
|
||||
- return true;
|
||||
+ if (KeyboardUtils.isAndroidSoftKeyboardShowing(this)) {
|
||||
+ KeyboardUtils.hideAndroidSoftKeyboard(this);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
}
|
||||
|
||||
private void maybeUpdateLayoutParams(int topMargin) {
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -19101,7 +19127,7 @@ new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Cromite-Branding.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kSwapNewTabAndNewTabInGroupAndroid);
|
||||
+// Empty file
|
||||
diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py
|
||||
--- a/tools/grit/grit/grd_reader.py
|
||||
+++ b/tools/grit/grit/grd_reader.py
|
||||
|
||||
@@ -10,9 +10,9 @@ Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/android/java/res/layout/url_bar.xml | 1 +
|
||||
.../browser/omnibox/LocationBarMediator.java | 13 ++++++++--
|
||||
.../browser/omnibox/LocationBarMediator.java | 14 ++++++++---
|
||||
.../chrome/browser/omnibox/UrlBar.java | 24 +++++++++++++++++++
|
||||
3 files changed, 36 insertions(+), 2 deletions(-)
|
||||
3 files changed, 36 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/res/layout/url_bar.xml
|
||||
--- a/chrome/android/java/res/layout/url_bar.xml
|
||||
@@ -37,7 +37,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
+ UrlBarData data = mLocationBarDataProvider.getUrlBarData();
|
||||
+ @SelectionState int selectionState = SelectionState.SELECT_ALL;
|
||||
+ GURL url = mLocationBarDataProvider.getUrlBarData().url;
|
||||
+ if (url != null && mTemplateUrlServiceSupplier.hasValue()) {
|
||||
+ if (url != null && mTemplateUrlServiceSupplier.get() != null) {
|
||||
+ String searchParams =
|
||||
+ mTemplateUrlServiceSupplier.get().getSearchQueryForUrl(url);
|
||||
+ if (searchParams != null && !searchParams.isEmpty()) {
|
||||
@@ -48,6 +48,14 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
} else if (shouldRetainOmniboxOnFocus) {
|
||||
mUrlCoordinator.setSelectAllOnFocus(true);
|
||||
}
|
||||
@@ -1642,7 +1651,6 @@ class LocationBarMediator
|
||||
mUrlCoordinator.setKeyboardVisibility(true, false);
|
||||
}
|
||||
|
||||
-
|
||||
// UrlBarDelegate implementation.
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
|
||||
@@ -16,6 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../permissions/chrome_permissions_client.cc | 2 --
|
||||
.../passage_embedder_delegate.cc | 2 ++
|
||||
.../prediction_model_handler_provider.cc | 9 ++++++---
|
||||
.../prediction_model_handler_provider.h | 2 ++
|
||||
.../predictors/autocomplete_action_predictor.cc | 2 ++
|
||||
.../predictors/loading_predictor_config.cc | 4 ++--
|
||||
chrome/browser/predictors/predictors_features.cc | 3 +--
|
||||
@@ -24,6 +25,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../chrome_browser_main_extra_parts_profiles.cc | 1 -
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 -
|
||||
...fication_content_detection_service_factory.cc | 6 ++++++
|
||||
.../preloading/AndroidPrerenderManager.java | 1 +
|
||||
.../ui/autofill/chrome_autofill_client.cc | 15 ---------------
|
||||
chrome/browser/ui/tab_helpers.cc | 1 -
|
||||
.../autofill_ml_internals_page_handler.cc | 2 ++
|
||||
@@ -36,9 +38,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
chrome/utility/BUILD.gn | 2 +-
|
||||
chrome/utility/services.cc | 8 --------
|
||||
components/BUILD.gn | 2 +-
|
||||
.../core/browser/foundations/autofill_manager.cc | 2 ++
|
||||
.../core/browser/foundations/autofill_manager.h | 3 +++
|
||||
.../autofill_optimization_guide_decider.cc | 5 +++--
|
||||
.../field_classification_model_handler.cc | 12 ++++++++----
|
||||
.../field_classification_model_handler.h | 8 ++++++--
|
||||
.../field_classification_model_handler.h | 10 ++++++++--
|
||||
.../browser/aim_eligibility_service_features.cc | 1 +
|
||||
.../omnibox/browser/autocomplete_controller.cc | 4 ++++
|
||||
.../omnibox/browser/base_search_provider.cc | 4 ++--
|
||||
@@ -59,13 +63,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../features_cc/Disable-all-predictors-code.inc | 1 +
|
||||
.../features_cc/Disable-all-predictors-code.inc | 1 +
|
||||
.../features_cc/Disable-all-predictors-code.inc | 2 ++
|
||||
services/on_device_model/ml/BUILD.gn | 2 +-
|
||||
services/on_device_model/ml/ts_model.cc | 4 ++--
|
||||
services/on_device_model/safety/BUILD.gn | 2 +-
|
||||
services/webnn/BUILD.gn | 2 +-
|
||||
services/webnn/features.gni | 2 +-
|
||||
services/webnn/webnn_context_provider_impl.cc | 16 +---------------
|
||||
.../core/html/parser/html_document_parser.cc | 1 +
|
||||
.../document_speculation_rules.cc | 1 +
|
||||
.../platform/runtime_enabled_features.json5 | 2 +-
|
||||
60 files changed, 151 insertions(+), 89 deletions(-)
|
||||
67 files changed, 165 insertions(+), 93 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-all-predictors-code.inc
|
||||
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
|
||||
@@ -290,6 +297,21 @@ diff --git a/chrome/browser/permissions/prediction_service/prediction_model_hand
|
||||
VLOG(1) << "[PermissionsAI] PredictionModelHandlerProvider ctor "
|
||||
"passage_embedder available: "
|
||||
<< (passage_embedder ? "true" : "false");
|
||||
diff --git a/chrome/browser/permissions/prediction_service/prediction_model_handler_provider.h b/chrome/browser/permissions/prediction_service/prediction_model_handler_provider.h
|
||||
--- a/chrome/browser/permissions/prediction_service/prediction_model_handler_provider.h
|
||||
+++ b/chrome/browser/permissions/prediction_service/prediction_model_handler_provider.h
|
||||
@@ -59,9 +59,11 @@ class PredictionModelHandlerProvider
|
||||
#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
|
||||
private:
|
||||
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
// EmbedderMetadataObserver:
|
||||
void EmbedderMetadataUpdated(
|
||||
passage_embeddings::EmbedderMetadata metadata) override;
|
||||
+#endif
|
||||
|
||||
std::unique_ptr<PermissionsAiv1Handler> permissions_aiv1_handler_;
|
||||
#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
@@ -410,6 +432,17 @@ diff --git a/chrome/browser/safe_browsing/notification_content_detection/notific
|
||||
}
|
||||
|
||||
} // namespace safe_browsing
|
||||
diff --git a/chrome/browser/ui/android/preloading/java/src/org/chromium/chrome/browser/preloading/AndroidPrerenderManager.java b/chrome/browser/ui/android/preloading/java/src/org/chromium/chrome/browser/preloading/AndroidPrerenderManager.java
|
||||
--- a/chrome/browser/ui/android/preloading/java/src/org/chromium/chrome/browser/preloading/AndroidPrerenderManager.java
|
||||
+++ b/chrome/browser/ui/android/preloading/java/src/org/chromium/chrome/browser/preloading/AndroidPrerenderManager.java
|
||||
@@ -89,6 +89,7 @@ public class AndroidPrerenderManager {
|
||||
* @param prerenderUrl The url to be prerendered.
|
||||
*/
|
||||
public void startPrerendering(GURL prerenderUrl) {
|
||||
+ if ((true)) return;
|
||||
if (mNativeAndroidPrerenderManager == 0 || mWebContents == null) return;
|
||||
AndroidPrerenderManagerJni.get()
|
||||
.startPrerendering(mNativeAndroidPrerenderManager, prerenderUrl, mWebContents);
|
||||
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
||||
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
||||
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
||||
@@ -769,6 +802,50 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn
|
||||
"//components/privacy_sandbox/privacy_sandbox_attestations:unit_tests",
|
||||
"//components/safety_check:unit_tests",
|
||||
"//components/security_interstitials/content:unit_tests",
|
||||
diff --git a/components/autofill/core/browser/foundations/autofill_manager.cc b/components/autofill/core/browser/foundations/autofill_manager.cc
|
||||
--- a/components/autofill/core/browser/foundations/autofill_manager.cc
|
||||
+++ b/components/autofill/core/browser/foundations/autofill_manager.cc
|
||||
@@ -895,6 +895,7 @@ void AutofillManager::LogCurrentFieldTypes(const FormStructure& form) {
|
||||
}
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
void AutofillManager::SubscribeToMlModelChanges(
|
||||
FieldClassificationModelHandler& handler,
|
||||
optimization_guide::proto::OptimizationTarget optimization_target) {
|
||||
@@ -919,5 +920,6 @@ void AutofillManager::SubscribeToMlModelChanges(
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace autofill
|
||||
diff --git a/components/autofill/core/browser/foundations/autofill_manager.h b/components/autofill/core/browser/foundations/autofill_manager.h
|
||||
--- a/components/autofill/core/browser/foundations/autofill_manager.h
|
||||
+++ b/components/autofill/core/browser/foundations/autofill_manager.h
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "components/autofill/core/common/signatures.h"
|
||||
#include "components/autofill/core/common/unique_ids.h"
|
||||
#include "components/optimization_guide/proto/models.pb.h"
|
||||
+#include "components/optimization_guide/machine_learning_tflite_buildflags.h"
|
||||
#include "components/translate/core/browser/translate_driver.h"
|
||||
|
||||
namespace autofill {
|
||||
@@ -355,12 +356,14 @@ class AutofillManager
|
||||
// Reparses all known forms.
|
||||
void ReparseKnownForms();
|
||||
|
||||
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
// After subscribing, FieldClassificationModelHandler::OnModelUpdated() will
|
||||
// trigger ReparseKnownForms(). There may be a handler for Autofill and/or
|
||||
// Password Manager.
|
||||
void SubscribeToMlModelChanges(
|
||||
FieldClassificationModelHandler& handler,
|
||||
optimization_guide::proto::OptimizationTarget optimization_target);
|
||||
+#endif
|
||||
|
||||
protected:
|
||||
explicit AutofillManager(AutofillDriver* driver);
|
||||
diff --git a/components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc b/components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc
|
||||
--- a/components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc
|
||||
+++ b/components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc
|
||||
@@ -866,7 +943,7 @@ diff --git a/components/autofill/core/browser/ml_model/field_classification_mode
|
||||
diff --git a/components/autofill/core/browser/ml_model/field_classification_model_handler.h b/components/autofill/core/browser/ml_model/field_classification_model_handler.h
|
||||
--- a/components/autofill/core/browser/ml_model/field_classification_model_handler.h
|
||||
+++ b/components/autofill/core/browser/ml_model/field_classification_model_handler.h
|
||||
@@ -17,9 +17,12 @@
|
||||
@@ -17,8 +17,11 @@
|
||||
#include "components/autofill/core/browser/field_types.h"
|
||||
#include "components/autofill/core/browser/form_structure.h"
|
||||
#include "components/autofill/core/browser/ml_model/field_classification_model_encoder.h"
|
||||
@@ -874,11 +951,10 @@ diff --git a/components/autofill/core/browser/ml_model/field_classification_mode
|
||||
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
#include "components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom.h"
|
||||
#include "components/autofill/core/browser/ml_model/logging/ml_log_router.h"
|
||||
#include "components/autofill/core/browser/ml_model/model_predictions.h"
|
||||
+#endif
|
||||
#include "components/autofill/core/browser/ml_model/model_predictions.h"
|
||||
#include "components/keyed_service/core/keyed_service.h"
|
||||
#include "components/optimization_guide/core/delivery/optimization_guide_model_provider.h"
|
||||
#include "components/optimization_guide/core/inference/model_handler.h"
|
||||
@@ -50,8 +53,7 @@ class FieldClassificationModelHandler
|
||||
|
||||
FieldClassificationModelHandler(
|
||||
@@ -889,7 +965,18 @@ diff --git a/components/autofill/core/browser/ml_model/field_classification_mode
|
||||
~FieldClassificationModelHandler() override;
|
||||
|
||||
// This function asynchronously queries predictions for the `form_structure`
|
||||
@@ -155,7 +157,9 @@ class FieldClassificationModelHandler
|
||||
@@ -132,8 +134,10 @@ class FieldClassificationModelHandler
|
||||
ModelInputHash CalculateModelInputHash(
|
||||
const FieldClassificationModelEncoder::ModelInput& input);
|
||||
|
||||
+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
autofill_ml_internals::mojom::MlPredictionLogPtr CreateMlPredictionLog(
|
||||
const FormData& form_structure) const;
|
||||
+#endif
|
||||
|
||||
struct ModelState {
|
||||
optimization_guide::proto::AutofillFieldClassificationModelMetadata
|
||||
@@ -155,7 +159,9 @@ class FieldClassificationModelHandler
|
||||
|
||||
ModelChangeCallbackList model_change_callback_list_;
|
||||
|
||||
@@ -1140,14 +1227,14 @@ new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc
|
||||
@@ -0,0 +1,2 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kBookmarkTriggerForPrerender2);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kBookmarkTriggerForPrerender2KillSwitch);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageTriggerForPrerender2);
|
||||
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-all-predictors-code.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-all-predictors-code.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageAndroidTriggerForPrerender2);
|
||||
+// Empty file
|
||||
diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -1181,6 +1268,51 @@ new file mode 100644
|
||||
@@ -0,0 +1,2 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel);
|
||||
diff --git a/services/on_device_model/ml/BUILD.gn b/services/on_device_model/ml/BUILD.gn
|
||||
--- a/services/on_device_model/ml/BUILD.gn
|
||||
+++ b/services/on_device_model/ml/BUILD.gn
|
||||
@@ -79,7 +79,7 @@ if (use_blink || (is_ios && build_with_internal_optimization_guide)) {
|
||||
if (use_blink) {
|
||||
deps += [ "//gpu/config" ]
|
||||
}
|
||||
- if (!is_fuchsia) {
|
||||
+ if (build_with_tflite_lib && !is_fuchsia) {
|
||||
deps += [ "//services/on_device_model/safety:bert_safety_model" ]
|
||||
}
|
||||
public_deps = [
|
||||
diff --git a/services/on_device_model/ml/ts_model.cc b/services/on_device_model/ml/ts_model.cc
|
||||
--- a/services/on_device_model/ml/ts_model.cc
|
||||
+++ b/services/on_device_model/ml/ts_model.cc
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "services/on_device_model/public/mojom/on_device_model_service.mojom.h"
|
||||
#include "services/on_device_model/safety/safety_util.h"
|
||||
|
||||
-#if !BUILDFLAG(IS_FUCHSIA)
|
||||
+#if false && !BUILDFLAG(IS_FUCHSIA)
|
||||
#include "services/on_device_model/safety/bert_safety_model.h"
|
||||
#endif
|
||||
|
||||
@@ -189,7 +189,7 @@ void TsHolder::Reset(mojom::TextSafetyModelParamsPtr params,
|
||||
mojo::PendingReceiver<mojom::TextSafetyModel> model) {
|
||||
model_.Clear();
|
||||
|
||||
-#if !BUILDFLAG(IS_FUCHSIA)
|
||||
+#if false && !BUILDFLAG(IS_FUCHSIA)
|
||||
if (params->safety_assets->which() ==
|
||||
mojom::SafetyModelAssets::Tag::kTsAssets) {
|
||||
auto impl = TsModel::Create(*chrome_ml_, std::move(params));
|
||||
diff --git a/services/on_device_model/safety/BUILD.gn b/services/on_device_model/safety/BUILD.gn
|
||||
--- a/services/on_device_model/safety/BUILD.gn
|
||||
+++ b/services/on_device_model/safety/BUILD.gn
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import("//components/optimization_guide/features.gni")
|
||||
|
||||
-if (!is_fuchsia) {
|
||||
+if (build_with_tflite_lib && !is_fuchsia) {
|
||||
source_set("bert_safety_op_resolver") {
|
||||
sources = [
|
||||
"bert_safety_op_resolver.cc",
|
||||
diff --git a/services/webnn/BUILD.gn b/services/webnn/BUILD.gn
|
||||
--- a/services/webnn/BUILD.gn
|
||||
+++ b/services/webnn/BUILD.gn
|
||||
|
||||
@@ -188,7 +188,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSe
|
||||
}
|
||||
|
||||
- if (DeviceInfo.isAutomotive()) {
|
||||
+ if (((true)) || isAutomotive()) {
|
||||
+ if (((true)) || DeviceInfo.isAutomotive()) {
|
||||
getPreferenceScreen().removePreference(findPreference(PREF_SAFETY_HUB));
|
||||
} else {
|
||||
findPreference(PREF_SAFETY_HUB)
|
||||
@@ -281,5 +281,5 @@ new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-safety-check.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kSafetyHub);
|
||||
+// intentionally empty
|
||||
--
|
||||
|
||||
@@ -8,8 +8,8 @@ disabling the use of system certificates by default (which can be activated from
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
chrome/browser/net/profile_network_context_service.cc | 7 ++++++-
|
||||
.../chrome_features_cc/Enable-Cert-Management-UI.inc | 5 +++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
.../chrome_features_cc/Enable-Cert-Management-UI.inc | 1 +
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-Cert-Management-UI.inc
|
||||
|
||||
diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc
|
||||
@@ -33,10 +33,6 @@ diff --git a/cromite_flags/chrome/common/chrome_features_cc/Enable-Cert-Manageme
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/common/chrome_features_cc/Enable-Cert-Management-UI.inc
|
||||
@@ -0,0 +1,5 @@
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+SET_CROMITE_FEATURE_ENABLED(kEnableCertManagementUIV2);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kEnableCertManagementUIV2Write);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kEnableCertManagementUIV2EditCerts);
|
||||
+#endif
|
||||
@@ -0,0 +1 @@
|
||||
+// Empty file
|
||||
--
|
||||
|
||||
@@ -696,7 +696,7 @@ diff --git a/components/update_client/utils.cc b/components/update_client/utils.
|
||||
}
|
||||
|
||||
+ DLOG(INFO) << "VerifyFileHash256 "
|
||||
+ << "sha256_hash=" << base::HexEncode(sha256_hash);
|
||||
+ << "sha256_hash=" << base::HexEncode(hash);
|
||||
+
|
||||
return base::span(hash) == base::span(expected_hash);
|
||||
}
|
||||
|
||||
@@ -15,10 +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 | 83 +++++++++++++++-
|
||||
.../settings/PasswordSettings.java | 84 +++++++++++++++-
|
||||
.../chrome/browser/settings/MainSettings.java | 16 +--
|
||||
.../chromium/chrome/browser/tab/TabImpl.java | 42 ++++++--
|
||||
chrome/browser/about_flags.cc | 3 -
|
||||
chrome/browser/android/tab_android.cc | 3 +-
|
||||
chrome/browser/autofill/android/BUILD.gn | 2 +-
|
||||
.../autofill/AutofillClientProviderUtils.java | 2 +-
|
||||
@@ -43,25 +42,25 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/foundations/autofill_manager.h | 2 +
|
||||
.../foundations/browser_autofill_manager.cc | 2 +
|
||||
.../foundations/browser_autofill_manager.h | 2 +
|
||||
.../autofill/core/common/autofill_features.cc | 2 +-
|
||||
.../autofill/core/common/autofill_features.cc | 1 -
|
||||
.../autofill/core/common/autofill_prefs.cc | 4 +-
|
||||
.../autofill/core/common/autofill_prefs.h | 5 +
|
||||
31 files changed, 278 insertions(+), 138 deletions(-)
|
||||
30 files changed, 278 insertions(+), 135 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
|
||||
@@ -27,6 +27,8 @@ import androidx.preference.PreferenceCategory;
|
||||
@@ -26,6 +26,8 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
import org.chromium.base.BuildInfo;
|
||||
+import org.chromium.base.StrictModeContext;
|
||||
+import org.chromium.base.supplier.Supplier;
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
@@ -58,6 +60,11 @@ import java.lang.annotation.Retention;
|
||||
@@ -57,6 +59,11 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -73,7 +72,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 +72,7 @@ import java.util.Locale;
|
||||
@@ -64,7 +71,7 @@ import java.util.Locale;
|
||||
public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
implements PasswordListObserver,
|
||||
Preference.OnPreferenceClickListener,
|
||||
@@ -82,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
|
||||
@IntDef({
|
||||
TrustedVaultBannerState.NOT_SHOWN,
|
||||
TrustedVaultBannerState.OFFER_OPT_IN,
|
||||
@@ -95,6 +102,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
@@ -94,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";
|
||||
|
||||
@@ -95,24 +94,25 @@ 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 +140,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
@@ -126,6 +139,9 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
private Preference mLinkPref;
|
||||
private Menu mMenu;
|
||||
|
||||
+ private ChromeSwitchPreference mEnableAndroidAutofillSwitch;
|
||||
+ private ChromeSwitchPreference mEnableAndroidAutofillIncognitoSwitch;
|
||||
private @ManagePasswordsReferrer int mManagePasswordsReferrer;
|
||||
+
|
||||
private final ObservableSupplierImpl<String> mPageTitle = new ObservableSupplierImpl<>();
|
||||
|
||||
@@ -321,6 +336,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
}
|
||||
/** For controlling the UX flow of exporting passwords. */
|
||||
@@ -305,6 +321,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
|
||||
createSavePasswordsSwitch();
|
||||
createAutoSignInCheckbox();
|
||||
+ createEnableAndroidAutofillSwitch();
|
||||
if (shouldShowAutoSigninOption()) {
|
||||
createAutoSignInCheckbox();
|
||||
}
|
||||
@@ -589,6 +605,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
|
||||
PasswordManagerHandlerProvider.getForProfile(getProfile())
|
||||
.getPasswordManagerHandler()
|
||||
@@ -565,6 +582,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
|
||||
getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE));
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
|
||||
+ ApplicationLifetime.terminate(true);
|
||||
+ }
|
||||
+ }, Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setDefaultLines(false)
|
||||
+ .setAction(getActivity().getString(R.string.relaunch),
|
||||
+ /*actionData*/null)
|
||||
+ .setDuration(/*durationMs*/70000);
|
||||
@@ -294,19 +294,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
|
||||
return true;
|
||||
}
|
||||
|
||||
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
|
||||
@@ -3984,9 +3984,6 @@ const FeatureEntry::FeatureVariation kLinkPreviewTriggerTypeVariations[] = {
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
-
|
||||
-#endif // BUILDFLAG(IS_ANDROID)
|
||||
-
|
||||
const FeatureEntry::FeatureParam kGroupSuggestionEnableRecentlyOpenedOnly[] = {
|
||||
{"group_suggestion_enable_recently_opened", "true"},
|
||||
{"group_suggestion_enable_switch_between", "false"},
|
||||
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
|
||||
--- a/chrome/browser/android/tab_android.cc
|
||||
+++ b/chrome/browser/android/tab_android.cc
|
||||
@@ -907,12 +894,11 @@ diff --git a/components/autofill/core/browser/foundations/browser_autofill_manag
|
||||
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc
|
||||
--- a/components/autofill/core/common/autofill_features.cc
|
||||
+++ b/components/autofill/core/common/autofill_features.cc
|
||||
@@ -935,7 +935,7 @@ BASE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid,
|
||||
@@ -935,7 +935,6 @@ BASE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid,
|
||||
BASE_FEATURE(kAutofillThirdPartyModeContentProvider,
|
||||
"AutofillThirdPartyModeContentProvider",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
-
|
||||
+SET_CROMITE_FEATURE_ENABLED(kAutofillVirtualViewStructureAndroid);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Defines if the "Your Saved Info" page is eligible to be shown in Chrome
|
||||
|
||||
@@ -74,12 +74,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../cr_components/theme_color_picker/BUILD.gn | 2 +-
|
||||
ui/webui/resources/cr_elements/BUILD.gn | 6 +-
|
||||
.../cr_elements/cr_dialog/cr_dialog.css | 2 +-
|
||||
.../resources/cr_elements/cr_shared_vars.css | 4 +
|
||||
.../cr_elements/cr_shared_style_lit.css | 2 +-
|
||||
.../resources/cr_elements/cr_shared_vars.css | 8 +
|
||||
ui/webui/resources/css/BUILD.gn | 2 +-
|
||||
ui/webui/resources/images/BUILD.gn | 2 +-
|
||||
ui/webui/resources/js/BUILD.gn | 2 +-
|
||||
ui/webui/resources/js/load_time_data.ts | 17 +-
|
||||
72 files changed, 1166 insertions(+), 72 deletions(-)
|
||||
73 files changed, 1171 insertions(+), 73 deletions(-)
|
||||
create mode 100644 chrome/app/settings_strings_android.grdp
|
||||
create mode 100644 chrome/browser/search_engines/android/java/res/layout/search_engine_layout.xml
|
||||
create mode 100644 chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.cc
|
||||
@@ -751,7 +752,7 @@ diff --git a/chrome/browser/resources/settings/search_page/search_page_index.htm
|
||||
}
|
||||
+<if expr="is_android">
|
||||
+ settings-search-engines-page {
|
||||
+ width: 90%;
|
||||
+ width: 100%;
|
||||
+ }
|
||||
+</if>
|
||||
</style>
|
||||
@@ -2354,20 +2355,36 @@ diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.css b/ui/webui/r
|
||||
overflow-y: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
diff --git a/ui/webui/resources/cr_elements/cr_shared_style_lit.css b/ui/webui/resources/cr_elements/cr_shared_style_lit.css
|
||||
--- a/ui/webui/resources/cr_elements/cr_shared_style_lit.css
|
||||
+++ b/ui/webui/resources/cr_elements/cr_shared_style_lit.css
|
||||
@@ -61,7 +61,7 @@ iron-list.cr-separators > *:not([first]) {
|
||||
height: inherit;
|
||||
margin: 0 auto;
|
||||
max-width: var(--cr-centered-card-max-width);
|
||||
- min-width: 550px;
|
||||
+ min-width: var(--cr-centered-card-min-width);
|
||||
position: relative;
|
||||
width: calc(100% * var(--cr-centered-card-width-percentage));
|
||||
}
|
||||
diff --git a/ui/webui/resources/cr_elements/cr_shared_vars.css b/ui/webui/resources/cr_elements/cr_shared_vars.css
|
||||
--- a/ui/webui/resources/cr_elements/cr_shared_vars.css
|
||||
+++ b/ui/webui/resources/cr_elements/cr_shared_vars.css
|
||||
@@ -228,6 +228,10 @@ html {
|
||||
@@ -226,6 +226,14 @@ html {
|
||||
--cr-form-field-label-font-size: .625rem;
|
||||
--cr-form-field-label-height: 1em;
|
||||
--cr-form-field-label-line-height: 1;
|
||||
}
|
||||
|
||||
+html[chrome-android] {
|
||||
+ --cr-section-indent-width: 0px;
|
||||
+
|
||||
+ --cr-centered-card-min-width: 550px;
|
||||
+}
|
||||
+
|
||||
+html[chrome-android] {
|
||||
+ --cr-section-indent-width: 0px;
|
||||
+ --cr-centered-card-width-percentage: 1;
|
||||
+ --cr-centered-card-min-width: 0px;
|
||||
}
|
||||
|
||||
html {
|
||||
/* Colors: These variables should never be overridden and should only be used
|
||||
as fallback values for shared cr_elements or in UIs that do not have
|
||||
diff --git a/ui/webui/resources/css/BUILD.gn b/ui/webui/resources/css/BUILD.gn
|
||||
--- a/ui/webui/resources/css/BUILD.gn
|
||||
+++ b/ui/webui/resources/css/BUILD.gn
|
||||
|
||||
@@ -48,9 +48,10 @@ suit Cromite logic.
|
||||
.../browser/adblock_content_browser_client.h | 241 +-
|
||||
.../browser/adblock_internals_page_handler.cc | 9 +-
|
||||
.../browser/adblock_url_loader_factory.cc | 71 +-
|
||||
.../browser/adblock_webcontents_observer.cc | 62 +-
|
||||
.../adblock_web_ui_controller_factory.cc | 1 +
|
||||
.../browser/adblock_webcontents_observer.cc | 63 +-
|
||||
.../browser/adblock_webcontents_observer.h | 5 +-
|
||||
.../content/browser/element_hider_impl.cc | 13 +-
|
||||
.../content/browser/element_hider_impl.cc | 17 +-
|
||||
.../content/browser/eyeo_document_info.cc | 15 +
|
||||
.../content/browser/eyeo_document_info.h | 9 +
|
||||
.../adblock_request_throttle_factory.cc | 2 +-
|
||||
@@ -60,25 +61,28 @@ suit Cromite logic.
|
||||
.../factories/subscription_service_factory.cc | 22 +-
|
||||
.../factories/subscription_service_factory.h | 1 +
|
||||
.../browser/frame_hierarchy_builder.cc | 1 +
|
||||
.../content/browser/page_view_stats.cc | 71 +-
|
||||
.../content/browser/page_view_stats.cc | 83 +-
|
||||
.../browser/resource_classification_runner.h | 7 +
|
||||
.../resource_classification_runner_impl.cc | 71 +-
|
||||
.../resource_classification_runner_impl.h | 8 +
|
||||
components/adblock/core/BUILD.gn | 39 -
|
||||
components/adblock/core/common/BUILD.gn | 8 -
|
||||
.../adblock/core/common/adblock_constants.cc | 2 -
|
||||
.../adblock/core/common/adblock_constants.cc | 17 +-
|
||||
.../adblock/core/common/adblock_constants.h | 1 -
|
||||
.../adblock/core/common/adblock_prefs.cc | 57 +-
|
||||
.../adblock/core/common/adblock_prefs.h | 7 +-
|
||||
components/adblock/core/common/app_info.cc | 12 -
|
||||
.../adblock/core/common/adblock_prefs.cc | 66 +-
|
||||
.../adblock/core/common/adblock_prefs.h | 9 +-
|
||||
components/adblock/core/common/app_info.cc | 17 +-
|
||||
components/adblock/core/common/app_info.h | 1 -
|
||||
.../configuration/filtering_configuration.h | 5 +
|
||||
.../persistent_filtering_configuration.cc | 28 +-
|
||||
.../persistent_filtering_configuration.cc | 37 +-
|
||||
.../persistent_filtering_configuration.h | 6 +
|
||||
.../core/converter/flatbuffer_converter.cc | 2 +-
|
||||
.../adblock/core/converter/parser/metadata.cc | 1 +
|
||||
.../converter/parser/filter_classifier.cc | 5 +-
|
||||
.../adblock/core/converter/parser/metadata.cc | 14 +-
|
||||
.../core/converter/parser/test/test_rules.txt | 21 +
|
||||
.../core/converter/parser/url_filter.cc | 15 +-
|
||||
.../converter/parser/url_filter_options.cc | 21 +-
|
||||
.../core/converter/parser/url_filter.cc | 20 +-
|
||||
.../converter/parser/url_filter_options.cc | 34 +-
|
||||
.../serializer/filter_keyword_extractor.cc | 13 +-
|
||||
.../serializer/flatbuffer_serializer.cc | 102 +-
|
||||
components/adblock/core/features.cc | 6 +-
|
||||
.../core/net/adblock_resource_request_impl.cc | 26 +-
|
||||
@@ -99,7 +103,7 @@ suit Cromite logic.
|
||||
.../adblock/core/subscription/subscription.cc | 20 +
|
||||
.../adblock/core/subscription/subscription.h | 3 +
|
||||
.../subscription_collection_impl.cc | 1 +
|
||||
.../core/subscription/subscription_config.cc | 41 +-
|
||||
.../core/subscription/subscription_config.cc | 92 +-
|
||||
.../core/subscription/subscription_config.h | 6 +-
|
||||
.../subscription_downloader_impl.cc | 19 +-
|
||||
.../subscription_persistent_metadata.h | 1 +
|
||||
@@ -127,7 +131,7 @@ suit Cromite logic.
|
||||
.../renderer/core/exported/web_document.cc | 13 +-
|
||||
.../blink/renderer/core/html/html_element.cc | 8 +-
|
||||
.../definitions/adblock_private.d.ts | 14 +
|
||||
122 files changed, 9249 insertions(+), 618 deletions(-)
|
||||
126 files changed, 9337 insertions(+), 689 deletions(-)
|
||||
rename chrome/browser/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (59%)
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts
|
||||
@@ -3081,16 +3085,28 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/
|
||||
} else {
|
||||
// We blocked a subresource request. Collapse whitespace around the
|
||||
// blocked element.
|
||||
diff --git a/components/adblock/content/browser/adblock_web_ui_controller_factory.cc b/components/adblock/content/browser/adblock_web_ui_controller_factory.cc
|
||||
--- a/components/adblock/content/browser/adblock_web_ui_controller_factory.cc
|
||||
+++ b/components/adblock/content/browser/adblock_web_ui_controller_factory.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "components/adblock/content/browser/adblock_internals_ui.h"
|
||||
#include "components/adblock/core/common/web_ui_constants.h"
|
||||
#include "content/public/common/url_utils.h"
|
||||
+#include "url/gurl.h"
|
||||
|
||||
namespace adblock {
|
||||
|
||||
diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc b/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
--- a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
+++ b/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
@@ -22,10 +22,15 @@
|
||||
@@ -22,10 +22,16 @@
|
||||
#include "components/adblock/content/browser/request_initiator.h"
|
||||
#include "components/adblock/core/common/sitekey.h"
|
||||
#include "components/adblock/core/subscription/subscription_service.h"
|
||||
+#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
+#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
+#include "content/public/browser/navigation_controller.h"
|
||||
#include "net/base/url_util.h"
|
||||
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
|
||||
|
||||
@@ -3100,7 +3116,7 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
namespace {
|
||||
const char* WindowOpenDispositionToString(WindowOpenDisposition value) {
|
||||
switch (value) {
|
||||
@@ -84,6 +89,16 @@ bool ShouldSkipElementHiding(const GURL& url) {
|
||||
@@ -84,6 +90,16 @@ bool ShouldSkipElementHiding(const GURL& url) {
|
||||
!url.IsAboutBlank();
|
||||
}
|
||||
|
||||
@@ -3117,7 +3133,7 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
} // namespace
|
||||
|
||||
namespace adblock {
|
||||
@@ -94,14 +109,16 @@ AdblockWebContentObserver::AdblockWebContentObserver(
|
||||
@@ -94,14 +110,16 @@ AdblockWebContentObserver::AdblockWebContentObserver(
|
||||
ElementHider* element_hider,
|
||||
SitekeyStorage* sitekey_storage,
|
||||
std::unique_ptr<FrameHierarchyBuilder> frame_hierarchy_builder,
|
||||
@@ -3136,7 +3152,7 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
|
||||
AdblockWebContentObserver::~AdblockWebContentObserver() = default;
|
||||
|
||||
@@ -141,7 +158,8 @@ void AdblockWebContentObserver::DidFinishNavigation(
|
||||
@@ -141,7 +159,8 @@ void AdblockWebContentObserver::DidFinishNavigation(
|
||||
VLOG(1) << "[eyeo] Finished navigation: URL=" << url
|
||||
<< ", has_commited=" << navigation_handle->HasCommitted()
|
||||
<< ", is_error=" << navigation_handle->IsErrorPage()
|
||||
@@ -3146,7 +3162,7 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
content::RenderFrameHost* frame = nullptr;
|
||||
if (navigation_handle->HasCommitted()) {
|
||||
frame = navigation_handle->GetRenderFrameHost();
|
||||
@@ -153,6 +171,44 @@ void AdblockWebContentObserver::DidFinishNavigation(
|
||||
@@ -153,6 +172,44 @@ void AdblockWebContentObserver::DidFinishNavigation(
|
||||
VLOG(1) << "[eyeo] Unsupported scheme, skipping injection.";
|
||||
return;
|
||||
}
|
||||
@@ -3223,6 +3239,24 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.h b
|
||||
diff --git a/components/adblock/content/browser/element_hider_impl.cc b/components/adblock/content/browser/element_hider_impl.cc
|
||||
--- a/components/adblock/content/browser/element_hider_impl.cc
|
||||
+++ b/components/adblock/content/browser/element_hider_impl.cc
|
||||
@@ -133,7 +133,7 @@ void GenerateElemHidingEmuJavaScript(const GURL& url,
|
||||
}
|
||||
|
||||
std::string GenerateXpath3Dep() {
|
||||
- static std::string xpath3_dep =
|
||||
+ std::string xpath3_dep =
|
||||
"(" +
|
||||
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
|
||||
IDR_ADBLOCK_SNIPPETS_XPATH3_DEP_JS) +
|
||||
@@ -155,7 +155,7 @@ void GenerateSnippetScript(const GURL& url,
|
||||
serializer.Serialize(std::move(input));
|
||||
// snippets_lib should be the library as-is, without any escaping or JSON
|
||||
// parsing.
|
||||
- static std::string snippets_lib =
|
||||
+ std::string snippets_lib =
|
||||
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
|
||||
IDR_ADBLOCK_SNIPPETS_JS);
|
||||
|
||||
@@ -242,7 +242,7 @@ void InsertUserCSSAndApplyElemHidingEmuJS(
|
||||
if (!frame_host) {
|
||||
// Render frame host was destroyed before element hiding could be applied.
|
||||
@@ -3500,7 +3534,7 @@ diff --git a/components/adblock/content/browser/frame_hierarchy_builder.cc b/com
|
||||
diff --git a/components/adblock/content/browser/page_view_stats.cc b/components/adblock/content/browser/page_view_stats.cc
|
||||
--- a/components/adblock/content/browser/page_view_stats.cc
|
||||
+++ b/components/adblock/content/browser/page_view_stats.cc
|
||||
@@ -57,21 +57,6 @@ const char kBlockedStatsCountKey[] = "blocked_pageviews";
|
||||
@@ -57,47 +57,26 @@ const char kBlockedStatsCountKey[] = "blocked_pageviews";
|
||||
// than AA page views.
|
||||
const char kTotalPagesStatsCountKey[] = "pageviews";
|
||||
|
||||
@@ -3517,12 +3551,29 @@ diff --git a/components/adblock/content/browser/page_view_stats.cc b/components/
|
||||
- case PageViewStats::Metric::TotalPages:
|
||||
- return kTotalPagesStatsCountKey;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
base::WeakPtr<PageViewStats> g_last_used_instance;
|
||||
+base::WeakPtr<PageViewStats>& GetLastUsedInstance() {
|
||||
+ static base::NoDestructor<base::WeakPtr<PageViewStats>> instance;
|
||||
+ return *instance;
|
||||
}
|
||||
|
||||
-base::WeakPtr<PageViewStats> g_last_used_instance;
|
||||
-
|
||||
void RegisterNavigationWithLastUsedPageViewStats(
|
||||
@@ -89,15 +74,6 @@ void RegisterAcceptableAdsBlockthroughtHitWithLastUsedPageViewStats(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
- if (g_last_used_instance) {
|
||||
- g_last_used_instance->RegisterMainFrameNavigation(render_frame_host);
|
||||
+ if (GetLastUsedInstance()) {
|
||||
+ GetLastUsedInstance()->RegisterMainFrameNavigation(render_frame_host);
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterAcceptableAdsBlockthroughtHitWithLastUsedPageViewStats(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
- if (g_last_used_instance) {
|
||||
- g_last_used_instance->RegisterAcceptableAdsBlockthroughtHit(
|
||||
+ if (GetLastUsedInstance()) {
|
||||
+ GetLastUsedInstance()->RegisterAcceptableAdsBlockthroughtHit(
|
||||
render_frame_host);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3538,7 +3589,15 @@ diff --git a/components/adblock/content/browser/page_view_stats.cc b/components/
|
||||
} // namespace
|
||||
|
||||
PageViewStats::PageViewStats(
|
||||
@@ -215,22 +191,6 @@ void PageViewStats::RecordParkedMetrics(content::Page& page) {
|
||||
@@ -107,7 +86,6 @@ PageViewStats::PageViewStats(
|
||||
DCHECK(classification_runner_);
|
||||
DCHECK(prefs_);
|
||||
classification_runner_->AddObserver(this);
|
||||
- g_last_used_instance = weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
PageViewStats::~PageViewStats() {
|
||||
@@ -215,22 +193,6 @@ void PageViewStats::RecordParkedMetrics(content::Page& page) {
|
||||
}
|
||||
// If this is the entry matching Page we are looking for...
|
||||
if (main_frame_id == it->first) {
|
||||
@@ -3561,7 +3620,7 @@ diff --git a/components/adblock/content/browser/page_view_stats.cc b/components/
|
||||
it = parked_metrics_before_main_navigation_.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
@@ -239,42 +199,13 @@ void PageViewStats::RecordParkedMetrics(content::Page& page) {
|
||||
@@ -239,42 +201,13 @@ void PageViewStats::RecordParkedMetrics(content::Page& page) {
|
||||
}
|
||||
|
||||
void PageViewStats::RecordPageView(content::Page& page, Metric metric) {
|
||||
@@ -3878,7 +3937,14 @@ diff --git a/components/adblock/core/common/BUILD.gn b/components/adblock/core/c
|
||||
diff --git a/components/adblock/core/common/adblock_constants.cc b/components/adblock/core/common/adblock_constants.cc
|
||||
--- a/components/adblock/core/common/adblock_constants.cc
|
||||
+++ b/components/adblock/core/common/adblock_constants.cc
|
||||
@@ -23,8 +23,6 @@
|
||||
@@ -17,14 +17,13 @@
|
||||
|
||||
#include "components/adblock/core/common/adblock_constants.h"
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/base64.h"
|
||||
#include "components/adblock/core/schema/filter_list_schema_generated.h"
|
||||
#include "components/adblock/core/schema/schema_hash.h"
|
||||
|
||||
namespace adblock {
|
||||
|
||||
@@ -3887,6 +3953,34 @@ diff --git a/components/adblock/core/common/adblock_constants.cc b/components/ad
|
||||
const char kAllowlistEverythingFilter[] = "@@*$document";
|
||||
|
||||
const char kAdblockFilteringConfigurationName[] = "adblock";
|
||||
@@ -108,20 +107,20 @@ const char kBlankPng32x32[] =
|
||||
"3BAQEAAACCIP+vbkhAAQAAAO8GECAAAZf3V9cAAAAASUVORK5CYII=";
|
||||
|
||||
const std::string& CurrentSchemaVersion() {
|
||||
- static std::string kCurrentSchemaVersion =
|
||||
- base::Base64Encode(kSha256_filter_list_schema_generated_h);
|
||||
- return kCurrentSchemaVersion;
|
||||
+ static const base::NoDestructor<std::string> kCurrentSchemaVersion(
|
||||
+ base::Base64Encode(kSha256_filter_list_schema_generated_h));
|
||||
+ return *kCurrentSchemaVersion;
|
||||
}
|
||||
|
||||
const GURL& TestPagesSubscriptionUrl() {
|
||||
- static GURL kTestPagesUrl(
|
||||
+ static const base::NoDestructor<GURL> kTestPagesUrl(
|
||||
"https://abptestpages.org/en/abp-testcase-subscription.txt");
|
||||
- return kTestPagesUrl;
|
||||
+ return *kTestPagesUrl;
|
||||
}
|
||||
|
||||
const GURL& CustomFiltersUrl() {
|
||||
- static GURL kCustomFiltersUrl("adblock:custom");
|
||||
- return kCustomFiltersUrl;
|
||||
+ static const base::NoDestructor<GURL> kCustomFiltersUrl("adblock:custom");
|
||||
+ return *kCustomFiltersUrl;
|
||||
}
|
||||
|
||||
std::string_view RewriteUrl(flat::AbpResource type) {
|
||||
diff --git a/components/adblock/core/common/adblock_constants.h b/components/adblock/core/common/adblock_constants.h
|
||||
--- a/components/adblock/core/common/adblock_constants.h
|
||||
+++ b/components/adblock/core/common/adblock_constants.h
|
||||
@@ -3901,7 +3995,14 @@ diff --git a/components/adblock/core/common/adblock_constants.h b/components/adb
|
||||
diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adblock/core/common/adblock_prefs.cc
|
||||
--- a/components/adblock/core/common/adblock_prefs.cc
|
||||
+++ b/components/adblock/core/common/adblock_prefs.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
@@ -17,13 +17,16 @@
|
||||
|
||||
#include "components/adblock/core/common/adblock_prefs.h"
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/logging.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
|
||||
namespace adblock::common::prefs {
|
||||
|
||||
// Legacy: Whether to block ads
|
||||
@@ -3912,7 +4013,7 @@ diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adbloc
|
||||
|
||||
// Legacy: Whether to allow acceptable ads or block them all.
|
||||
// Used now just to map CLI switch. Otherwise use kAdblockSubscriptionsLegacy.
|
||||
@@ -65,35 +67,6 @@ const char kLastUsedSchemaVersion[] = "adblock.last_used_schema_version";
|
||||
@@ -65,35 +68,6 @@ const char kLastUsedSchemaVersion[] = "adblock.last_used_schema_version";
|
||||
// and for setting query parameters in subscription download requests.
|
||||
const char kSubscriptionMetadata[] = "adblock.subscription_metadata";
|
||||
|
||||
@@ -3948,7 +4049,7 @@ diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adbloc
|
||||
// FilteringConfiguration data
|
||||
const char kConfigurationsPrefsPath[] = "filtering.configurations";
|
||||
|
||||
@@ -106,21 +79,12 @@ const char kAutoInstalledSubscriptionsNextUpdateTime[] =
|
||||
@@ -106,21 +80,12 @@ const char kAutoInstalledSubscriptionsNextUpdateTime[] =
|
||||
"adblock.auto_installed_subscriptions.last_update_time";
|
||||
|
||||
// Dict containing stats about acceptable ads page views
|
||||
@@ -3973,7 +4074,7 @@ diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adbloc
|
||||
registry->RegisterListPref(kAdblockAllowedDomainsLegacy, {});
|
||||
registry->RegisterListPref(kAdblockCustomFiltersLegacy, {});
|
||||
registry->RegisterListPref(kAdblockSubscriptionsLegacy, {});
|
||||
@@ -130,11 +94,10 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
@@ -130,17 +95,16 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
registry->RegisterStringPref(kLastUsedSchemaVersion, "");
|
||||
registry->RegisterDictionaryPref(kSubscriptionMetadata);
|
||||
registry->RegisterDictionaryPref(kConfigurationsPrefsPath);
|
||||
@@ -3986,7 +4087,15 @@ diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adbloc
|
||||
|
||||
VLOG(3) << "[eyeo] Registered prefs";
|
||||
}
|
||||
@@ -152,12 +115,6 @@ std::vector<std::string_view> GetPrefs() {
|
||||
|
||||
-std::vector<std::string_view> GetPrefs() {
|
||||
- static std::vector<std::string_view> prefs = {
|
||||
+const std::vector<std::string_view>& GetPrefs() {
|
||||
+ static const base::NoDestructor<std::vector<std::string_view>> prefs({
|
||||
kEnableAdblockLegacy,
|
||||
kEnableAcceptableAdsLegacy,
|
||||
kAdblockMoreOptionsEnabled,
|
||||
@@ -152,16 +116,10 @@ std::vector<std::string_view> GetPrefs() {
|
||||
kSubscriptionSignatures,
|
||||
kLastUsedSchemaVersion,
|
||||
kSubscriptionMetadata,
|
||||
@@ -3998,7 +4107,13 @@ diff --git a/components/adblock/core/common/adblock_prefs.cc b/components/adbloc
|
||||
- kTelemetryPageViewStats,
|
||||
kConfigurationsPrefsPath,
|
||||
kEnableAutoInstalledSubscriptions,
|
||||
kAutoInstalledSubscriptionsNextUpdateTime};
|
||||
- kAutoInstalledSubscriptionsNextUpdateTime};
|
||||
- return prefs;
|
||||
+ kAutoInstalledSubscriptionsNextUpdateTime});
|
||||
+ return *prefs;
|
||||
}
|
||||
|
||||
} // namespace adblock::common::prefs
|
||||
diff --git a/components/adblock/core/common/adblock_prefs.h b/components/adblock/core/common/adblock_prefs.h
|
||||
--- a/components/adblock/core/common/adblock_prefs.h
|
||||
+++ b/components/adblock/core/common/adblock_prefs.h
|
||||
@@ -4010,7 +4125,7 @@ diff --git a/components/adblock/core/common/adblock_prefs.h b/components/adblock
|
||||
extern const char kEnableAcceptableAdsLegacy[];
|
||||
extern const char kAdblockAllowedDomainsLegacy[];
|
||||
extern const char kAdblockCustomFiltersLegacy[];
|
||||
@@ -36,12 +37,6 @@ extern const char kInstallFirstStartSubscriptions[];
|
||||
@@ -36,19 +37,13 @@ extern const char kInstallFirstStartSubscriptions[];
|
||||
extern const char kSubscriptionSignatures[];
|
||||
extern const char kLastUsedSchemaVersion[];
|
||||
extern const char kSubscriptionMetadata[];
|
||||
@@ -4023,10 +4138,33 @@ diff --git a/components/adblock/core/common/adblock_prefs.h b/components/adblock
|
||||
extern const char kConfigurationsPrefsPath[];
|
||||
extern const char kEnableAutoInstalledSubscriptions[];
|
||||
extern const char kAutoInstalledSubscriptionsNextUpdateTime[];
|
||||
|
||||
void RegisterProfilePrefs(PrefRegistrySimple* registry);
|
||||
|
||||
-std::vector<std::string_view> GetPrefs();
|
||||
+const std::vector<std::string_view>& GetPrefs();
|
||||
|
||||
} // namespace adblock::common::prefs
|
||||
|
||||
diff --git a/components/adblock/core/common/app_info.cc b/components/adblock/core/common/app_info.cc
|
||||
--- a/components/adblock/core/common/app_info.cc
|
||||
+++ b/components/adblock/core/common/app_info.cc
|
||||
@@ -29,18 +29,6 @@ const AppInfo& AppInfo::Get() {
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "components/adblock/core/common/app_info.h"
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
|
||||
@@ -24,23 +25,11 @@ namespace adblock {
|
||||
|
||||
// static
|
||||
const AppInfo& AppInfo::Get() {
|
||||
- static AppInfo instance;
|
||||
- return instance;
|
||||
+ static const base::NoDestructor<AppInfo> instance;
|
||||
+ return *instance;
|
||||
}
|
||||
|
||||
AppInfo::AppInfo() {
|
||||
@@ -4045,6 +4183,17 @@ diff --git a/components/adblock/core/common/app_info.cc b/components/adblock/cor
|
||||
}
|
||||
|
||||
} // namespace adblock
|
||||
diff --git a/components/adblock/core/common/app_info.h b/components/adblock/core/common/app_info.h
|
||||
--- a/components/adblock/core/common/app_info.h
|
||||
+++ b/components/adblock/core/common/app_info.h
|
||||
@@ -34,7 +34,6 @@ class AppInfo {
|
||||
std::string client_os;
|
||||
std::string version;
|
||||
|
||||
- private:
|
||||
AppInfo();
|
||||
};
|
||||
|
||||
diff --git a/components/adblock/core/configuration/filtering_configuration.h b/components/adblock/core/configuration/filtering_configuration.h
|
||||
--- a/components/adblock/core/configuration/filtering_configuration.h
|
||||
+++ b/components/adblock/core/configuration/filtering_configuration.h
|
||||
@@ -4070,7 +4219,12 @@ diff --git a/components/adblock/core/configuration/filtering_configuration.h b/c
|
||||
diff --git a/components/adblock/core/configuration/persistent_filtering_configuration.cc b/components/adblock/core/configuration/persistent_filtering_configuration.cc
|
||||
--- a/components/adblock/core/configuration/persistent_filtering_configuration.cc
|
||||
+++ b/components/adblock/core/configuration/persistent_filtering_configuration.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -21,10 +21,12 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "components/adblock/core/common/adblock_prefs.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/prefs/scoped_user_pref_update.h"
|
||||
@@ -4078,7 +4232,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
@@ -34,6 +35,7 @@ namespace {
|
||||
@@ -34,6 +36,7 @@ namespace {
|
||||
constexpr auto kEnabledKey = std::string_view("enabled");
|
||||
constexpr auto kDomainsKey = std::string_view("domains");
|
||||
constexpr auto kCustomFiltersKey = std::string_view("filters");
|
||||
@@ -4086,7 +4240,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
constexpr auto kFilterListsKey = std::string_view("subscriptions");
|
||||
|
||||
base::Value::Dict ReadFromPrefs(PrefService* pref_service,
|
||||
@@ -42,7 +44,9 @@ base::Value::Dict ReadFromPrefs(PrefService* pref_service,
|
||||
@@ -42,7 +45,9 @@ base::Value::Dict ReadFromPrefs(PrefService* pref_service,
|
||||
pref_service->GetValue(common::prefs::kConfigurationsPrefsPath).GetDict();
|
||||
const auto* this_config = all_configurations.FindDict(configuration_name);
|
||||
if (this_config) {
|
||||
@@ -4097,7 +4251,19 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
}
|
||||
return base::Value::Dict();
|
||||
}
|
||||
@@ -63,6 +67,7 @@ void SetDefaultValuesIfNeeded(base::Value::Dict& configuration) {
|
||||
@@ -51,9 +56,9 @@ void StoreToPrefs(const base::Value::Dict& configuration,
|
||||
PrefService* pref_service,
|
||||
std::string_view configuration_name) {
|
||||
// ScopedDictPrefUpdate requires an std::string for some reason:
|
||||
- static std::string kConfigurationsPrefsPathString(
|
||||
+ static const base::NoDestructor<std::string> kConfigurationsPrefsPathString(
|
||||
common::prefs::kConfigurationsPrefsPath);
|
||||
- ScopedDictPrefUpdate update(pref_service, kConfigurationsPrefsPathString);
|
||||
+ ScopedDictPrefUpdate update(pref_service, *kConfigurationsPrefsPathString);
|
||||
update.Get().Set(configuration_name, configuration.Clone());
|
||||
}
|
||||
|
||||
@@ -63,6 +68,7 @@ void SetDefaultValuesIfNeeded(base::Value::Dict& configuration) {
|
||||
}
|
||||
configuration.EnsureList(kDomainsKey);
|
||||
configuration.EnsureList(kCustomFiltersKey);
|
||||
@@ -4105,7 +4271,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
configuration.EnsureList(kFilterListsKey);
|
||||
}
|
||||
|
||||
@@ -133,6 +138,7 @@ const std::string& PersistentFilteringConfiguration::GetName() const {
|
||||
@@ -133,6 +139,7 @@ const std::string& PersistentFilteringConfiguration::GetName() const {
|
||||
}
|
||||
|
||||
void PersistentFilteringConfiguration::SetEnabled(bool enabled) {
|
||||
@@ -4113,7 +4279,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
if (IsEnabled() == enabled) {
|
||||
return;
|
||||
}
|
||||
@@ -141,6 +147,14 @@ void PersistentFilteringConfiguration::SetEnabled(bool enabled) {
|
||||
@@ -141,6 +148,14 @@ void PersistentFilteringConfiguration::SetEnabled(bool enabled) {
|
||||
NotifyEnabledStateChanged();
|
||||
}
|
||||
|
||||
@@ -4128,7 +4294,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
bool PersistentFilteringConfiguration::IsEnabled() const {
|
||||
const auto pref_value = dictionary_.FindBool(kEnabledKey);
|
||||
DCHECK(pref_value);
|
||||
@@ -209,6 +223,18 @@ void PersistentFilteringConfiguration::RemoveCustomFilter(
|
||||
@@ -209,6 +224,18 @@ void PersistentFilteringConfiguration::RemoveCustomFilter(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4147,6 +4313,18 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
std::vector<std::string> PersistentFilteringConfiguration::GetCustomFilters()
|
||||
const {
|
||||
return GetFromList<std::string>(dictionary_, kCustomFiltersKey);
|
||||
@@ -261,9 +288,9 @@ PersistentFilteringConfiguration::GetPersistedConfigurations(
|
||||
void PersistentFilteringConfiguration::RemovePersistedData(
|
||||
PrefService* pref_service,
|
||||
const std::string& name) {
|
||||
- static std::string kConfigurationsPrefsPathString(
|
||||
+ static const base::NoDestructor<std::string> kConfigurationsPrefsPathString(
|
||||
common::prefs::kConfigurationsPrefsPath);
|
||||
- ScopedDictPrefUpdate update(pref_service, kConfigurationsPrefsPathString);
|
||||
+ ScopedDictPrefUpdate update(pref_service, *kConfigurationsPrefsPathString);
|
||||
update.Get().Remove(name);
|
||||
}
|
||||
|
||||
diff --git a/components/adblock/core/configuration/persistent_filtering_configuration.h b/components/adblock/core/configuration/persistent_filtering_configuration.h
|
||||
--- a/components/adblock/core/configuration/persistent_filtering_configuration.h
|
||||
+++ b/components/adblock/core/configuration/persistent_filtering_configuration.h
|
||||
@@ -4182,17 +4360,89 @@ diff --git a/components/adblock/core/converter/flatbuffer_converter.cc b/compone
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/components/adblock/core/converter/parser/filter_classifier.cc b/components/adblock/core/converter/parser/filter_classifier.cc
|
||||
--- a/components/adblock/core/converter/parser/filter_classifier.cc
|
||||
+++ b/components/adblock/core/converter/parser/filter_classifier.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "components/adblock/core/converter/parser/filter_classifier.h"
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "third_party/re2/src/re2/re2.h"
|
||||
|
||||
namespace adblock {
|
||||
@@ -26,8 +27,8 @@ FilterType FilterClassifier::Classify(std::string_view filter) {
|
||||
if (!filter.empty() && filter.back() == '}' &&
|
||||
(base::StartsWith(filter, kElemHideFilterSeparator) ||
|
||||
base::StartsWith(filter, kElemHideEmulationFilterSeparator))) {
|
||||
- static re2::RE2 remove_re("\\{\\s*remove\\s*:\\s*true\\s*;\\s*\\}$");
|
||||
- if (re2::RE2::PartialMatch(filter, remove_re)) {
|
||||
+ static const base::NoDestructor<re2::RE2> remove_re("\\{\\s*remove\\s*:\\s*true\\s*;\\s*\\}$");
|
||||
+ if (re2::RE2::PartialMatch(filter, *remove_re)) {
|
||||
return FilterType::Remove;
|
||||
} else {
|
||||
return FilterType::InlineCss;
|
||||
diff --git a/components/adblock/core/converter/parser/metadata.cc b/components/adblock/core/converter/parser/metadata.cc
|
||||
--- a/components/adblock/core/converter/parser/metadata.cc
|
||||
+++ b/components/adblock/core/converter/parser/metadata.cc
|
||||
@@ -108,6 +108,7 @@ Metadata::~Metadata() = default;
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -30,7 +31,7 @@ namespace adblock {
|
||||
// comment line any upcoming comments will be skipped.
|
||||
// static
|
||||
absl::optional<Metadata> Metadata::FromStream(std::istream& filter_stream) {
|
||||
- static re2::RE2 comment_re("^!\\s*(.*?)\\s*:\\s*(.*)");
|
||||
+ static base::NoDestructor<re2::RE2> comment_re("^!\\s*(.*?)\\s*:\\s*(.*)");
|
||||
|
||||
std::string homepage;
|
||||
std::string title;
|
||||
@@ -51,7 +52,7 @@ absl::optional<Metadata> Metadata::FromStream(std::istream& filter_stream) {
|
||||
auto position_in_stream = filter_stream.tellg();
|
||||
while (std::getline(filter_stream, line)) {
|
||||
base::TrimWhitespaceASCII(line, base::TRIM_ALL, &line);
|
||||
- if (!re2::RE2::FullMatch(line, comment_re, &key, &value)) {
|
||||
+ if (!re2::RE2::FullMatch(line, *comment_re, &key, &value)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,14 +109,15 @@ Metadata::~Metadata() = default;
|
||||
|
||||
// static
|
||||
bool Metadata::IsValidAdblockHeader(const std::string& adblock_header) {
|
||||
- static re2::RE2 adblock_header_re("^\\[Adblock.*\\]");
|
||||
+ if ((true)) return true;
|
||||
static re2::RE2 adblock_header_re("^\\[Adblock.*\\]");
|
||||
+ static base::NoDestructor<re2::RE2> adblock_header_re("^\\[Adblock.*\\]");
|
||||
std::string adblock_header_trimmed;
|
||||
|
||||
base::TrimWhitespaceASCII(adblock_header, base::TRIM_ALL,
|
||||
&adblock_header_trimmed);
|
||||
if (!re2::RE2::FullMatch(re2::StringPiece(adblock_header_trimmed.data(),
|
||||
adblock_header_trimmed.size()),
|
||||
- adblock_header_re)) {
|
||||
+ *adblock_header_re)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -126,11 +128,11 @@ bool Metadata::IsValidAdblockHeader(const std::string& adblock_header) {
|
||||
// static
|
||||
base::TimeDelta Metadata::ParseExpirationTime(
|
||||
const std::string& expiration_value) {
|
||||
- static re2::RE2 expiration_time_re("\\s*([0-9]+)\\s*(h)?.*");
|
||||
+ static base::NoDestructor<re2::RE2> expiration_time_re("\\s*([0-9]+)\\s*(h)?.*");
|
||||
std::string expiration_unit;
|
||||
uint64_t expiration_time;
|
||||
|
||||
- if (!re2::RE2::FullMatch(expiration_value, expiration_time_re,
|
||||
+ if (!re2::RE2::FullMatch(expiration_value, *expiration_time_re,
|
||||
&expiration_time, &expiration_unit)) {
|
||||
VLOG(1) << "[eyeo] Invalid expiration time format: " << expiration_value
|
||||
<< ". Will use default value of "
|
||||
diff --git a/components/adblock/core/converter/parser/test/test_rules.txt b/components/adblock/core/converter/parser/test/test_rules.txt
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -4222,7 +4472,15 @@ new file mode 100644
|
||||
diff --git a/components/adblock/core/converter/parser/url_filter.cc b/components/adblock/core/converter/parser/url_filter.cc
|
||||
--- a/components/adblock/core/converter/parser/url_filter.cc
|
||||
+++ b/components/adblock/core/converter/parser/url_filter.cc
|
||||
@@ -50,6 +50,10 @@ std::string SanitizePipeCharacters(std::string pattern) {
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <string_view>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -50,6 +51,10 @@ std::string SanitizePipeCharacters(std::string pattern) {
|
||||
// Skip up to one trailing | characters, this is the right anchor.
|
||||
bool pattern_has_right_anchor = base::EndsWith(piece, "|");
|
||||
if (pattern_has_right_anchor) {
|
||||
@@ -4233,7 +4491,18 @@ diff --git a/components/adblock/core/converter/parser/url_filter.cc b/components
|
||||
piece.remove_suffix(1);
|
||||
}
|
||||
if (piece.find('|') == std::string_view::npos) {
|
||||
@@ -133,25 +137,18 @@ absl::optional<UrlFilter> UrlFilter::FromString(std::string filter_str) {
|
||||
@@ -81,8 +86,8 @@ bool IsInvalidHostAnchoredFilter(const std::string& pattern) {
|
||||
// "http://domain.com".
|
||||
// However, "||domain.com/url=http://example.com" is valid.
|
||||
// Discard filters that start with "||http://" or similar.
|
||||
- static re2::RE2 starts_with_protocol(R"(^\|\|\w*:\/\/)");
|
||||
- return re2::RE2::PartialMatch(pattern, starts_with_protocol);
|
||||
+ static const base::NoDestructor<re2::RE2> starts_with_protocol(R"(^\|\|\w*:\/\/)");
|
||||
+ return re2::RE2::PartialMatch(pattern, *starts_with_protocol);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -133,25 +138,18 @@ absl::optional<UrlFilter> UrlFilter::FromString(std::string filter_str) {
|
||||
|
||||
if (options->Csp().has_value() && options->Csp().value().empty() &&
|
||||
!is_allowing) {
|
||||
@@ -4264,7 +4533,15 @@ diff --git a/components/adblock/core/converter/parser/url_filter.cc b/components
|
||||
diff --git a/components/adblock/core/converter/parser/url_filter_options.cc b/components/adblock/core/converter/parser/url_filter_options.cc
|
||||
--- a/components/adblock/core/converter/parser/url_filter_options.cc
|
||||
+++ b/components/adblock/core/converter/parser/url_filter_options.cc
|
||||
@@ -92,20 +92,14 @@ absl::optional<UrlFilterOptions> UrlFilterOptions::FromString(
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "components/adblock/core/converter/parser/url_filter_options.h"
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -92,20 +93,14 @@ absl::optional<UrlFilterOptions> UrlFilterOptions::FromString(
|
||||
return {};
|
||||
}
|
||||
} else if (key == "sitekey") {
|
||||
@@ -4291,7 +4568,7 @@ diff --git a/components/adblock/core/converter/parser/url_filter_options.cc b/co
|
||||
} else {
|
||||
ContentType content_type = ContentTypeFromString(key);
|
||||
if (content_type != ContentType::Unknown) {
|
||||
@@ -188,6 +182,7 @@ absl::optional<UrlFilterOptions::RewriteOption> UrlFilterOptions::ParseRewrite(
|
||||
@@ -188,6 +183,7 @@ absl::optional<UrlFilterOptions::RewriteOption> UrlFilterOptions::ParseRewrite(
|
||||
// static
|
||||
SiteKeys UrlFilterOptions::ParseSitekeys(const std::string& sitekey_value) {
|
||||
SiteKeys sitekeys;
|
||||
@@ -4299,22 +4576,72 @@ diff --git a/components/adblock/core/converter/parser/url_filter_options.cc b/co
|
||||
for (auto& sitekey : base::SplitString(
|
||||
base::ToUpperASCII(sitekey_value), kDomainOrSitekeySeparator,
|
||||
base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
|
||||
@@ -199,6 +194,7 @@ SiteKeys UrlFilterOptions::ParseSitekeys(const std::string& sitekey_value) {
|
||||
@@ -199,23 +195,25 @@ SiteKeys UrlFilterOptions::ParseSitekeys(const std::string& sitekey_value) {
|
||||
|
||||
// static
|
||||
bool UrlFilterOptions::IsValidCsp(const std::string& csp_value) {
|
||||
- static re2::RE2 invalid_csp(
|
||||
+ if ((true)) return false;
|
||||
static re2::RE2 invalid_csp(
|
||||
+ static const base::NoDestructor<re2::RE2> invalid_csp(
|
||||
"(;|^) "
|
||||
"?(base-uri|referrer|report-to|report-uri|upgrade-insecure-requests)\\b");
|
||||
@@ -209,6 +205,7 @@ bool UrlFilterOptions::IsValidCsp(const std::string& csp_value) {
|
||||
|
||||
return !(re2::RE2::PartialMatch(
|
||||
- re2::StringPiece(csp_value.data(), csp_value.size()), invalid_csp));
|
||||
+ re2::StringPiece(csp_value.data(), csp_value.size()), *invalid_csp));
|
||||
}
|
||||
|
||||
// static
|
||||
void UrlFilterOptions::ParseHeaders(std::string& headers_value) {
|
||||
+ if ((true)) return;
|
||||
// replace \x2c with actual ,
|
||||
static re2::RE2 r1("([^\\\\])\\\\x2c");
|
||||
re2::RE2::GlobalReplace(&headers_value, r1, "\\1,");
|
||||
- static re2::RE2 r1("([^\\\\])\\\\x2c");
|
||||
- re2::RE2::GlobalReplace(&headers_value, r1, "\\1,");
|
||||
+ static const base::NoDestructor<re2::RE2> r1("([^\\\\])\\\\x2c");
|
||||
+ re2::RE2::GlobalReplace(&headers_value, *r1, "\\1,");
|
||||
|
||||
// remove extra escape for \\x2c which left
|
||||
- static re2::RE2 r2("\\\\x2c");
|
||||
- re2::RE2::GlobalReplace(&headers_value, r2, "x2c");
|
||||
+ static const base::NoDestructor<re2::RE2> r2("\\\\x2c");
|
||||
+ re2::RE2::GlobalReplace(&headers_value, *r2, "x2c");
|
||||
}
|
||||
|
||||
// static
|
||||
diff --git a/components/adblock/core/converter/serializer/filter_keyword_extractor.cc b/components/adblock/core/converter/serializer/filter_keyword_extractor.cc
|
||||
--- a/components/adblock/core/converter/serializer/filter_keyword_extractor.cc
|
||||
+++ b/components/adblock/core/converter/serializer/filter_keyword_extractor.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "components/adblock/core/common/keyword_extractor_utils.h"
|
||||
#include "third_party/re2/src/re2/re2.h"
|
||||
@@ -38,16 +39,16 @@ absl::optional<std::string> FilterKeywordExtractor::GetNextKeyword() {
|
||||
// keyword because when we have a valid to block url like this one
|
||||
// domain.cc/in_discovery5 returns with "discovery5" as
|
||||
// one of the extracted keywords instead of "discovery"
|
||||
- static const re2::RE2 filter_keyword_extractor(
|
||||
+ static const base::NoDestructor<re2::RE2> filter_keyword_extractor(
|
||||
"([^a-zA-Z0-9%*][a-zA-Z0-9%]{2,})");
|
||||
- static const re2::RE2 has_a_following_keyword("(^[^a-zA-Z0-9%*])");
|
||||
- static const re2::RE2 following_keyword_consume("(^[a-zA-Z0-9%*]*)");
|
||||
- if (!RE2::FindAndConsume(&input_, filter_keyword_extractor,
|
||||
+ static const base::NoDestructor<re2::RE2> has_a_following_keyword("(^[^a-zA-Z0-9%*])");
|
||||
+ static const base::NoDestructor<re2::RE2> following_keyword_consume("(^[a-zA-Z0-9%*]*)");
|
||||
+ if (!RE2::FindAndConsume(&input_, *filter_keyword_extractor,
|
||||
¤t_keyword)) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
- if (!RE2::PartialMatch(input_, has_a_following_keyword)) {
|
||||
- RE2::Consume(&input_, following_keyword_consume);
|
||||
+ if (!RE2::PartialMatch(input_, *has_a_following_keyword)) {
|
||||
+ RE2::Consume(&input_, *following_keyword_consume);
|
||||
current_keyword.clear();
|
||||
continue;
|
||||
}
|
||||
diff --git a/components/adblock/core/converter/serializer/flatbuffer_serializer.cc b/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
--- a/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
+++ b/components/adblock/core/converter/serializer/flatbuffer_serializer.cc
|
||||
@@ -11848,15 +12175,16 @@ diff --git a/components/adblock/core/subscription/subscription_collection_impl.c
|
||||
diff --git a/components/adblock/core/subscription/subscription_config.cc b/components/adblock/core/subscription/subscription_config.cc
|
||||
--- a/components/adblock/core/subscription/subscription_config.cc
|
||||
+++ b/components/adblock/core/subscription/subscription_config.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "components/adblock/core/common/adblock_constants.h"
|
||||
@@ -29,7 +30,7 @@ namespace {
|
||||
@@ -29,7 +31,7 @@ namespace {
|
||||
int g_port_for_testing = 0;
|
||||
|
||||
std::string GetHost() {
|
||||
@@ -11865,7 +12193,53 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
if (!g_port_for_testing) {
|
||||
return url.spec();
|
||||
}
|
||||
@@ -108,7 +109,19 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
@@ -43,29 +45,29 @@ std::string GetHost() {
|
||||
namespace adblock {
|
||||
|
||||
const GURL& AdblockBaseFilterListUrl() {
|
||||
- static GURL kAdblockBaseFilterListUrl(GetHost());
|
||||
- return kAdblockBaseFilterListUrl;
|
||||
+ static const base::NoDestructor<GURL> kAdblockBaseFilterListUrl(GetHost());
|
||||
+ return *kAdblockBaseFilterListUrl;
|
||||
}
|
||||
|
||||
const GURL& AcceptableAdsUrl() {
|
||||
- static GURL kAcceptableAds(GetHost() + "exceptionrules.txt");
|
||||
- return kAcceptableAds;
|
||||
+ static const base::NoDestructor<GURL> kAcceptableAds(GetHost() + "exceptionrules.txt");
|
||||
+ return *kAcceptableAds;
|
||||
}
|
||||
|
||||
const GURL& AntiCVUrl() {
|
||||
- static GURL kAntiCV(GetHost() + "abp-filters-anti-cv.txt");
|
||||
- return kAntiCV;
|
||||
+ static const base::NoDestructor<GURL> kAntiCV(GetHost() + "abp-filters-anti-cv.txt");
|
||||
+ return *kAntiCV;
|
||||
}
|
||||
|
||||
const GURL& DefaultSubscriptionUrl() {
|
||||
- static GURL kEasylistUrl(GetHost() + "easylist.txt");
|
||||
- return kEasylistUrl;
|
||||
+ static const base::NoDestructor<GURL> kEasylistUrl(GetHost() + "easylist.txt");
|
||||
+ return *kEasylistUrl;
|
||||
}
|
||||
|
||||
const GURL& RecommendedSubscriptionListUrl() {
|
||||
- static GURL kRecommendedSubscriptionListUrl(GetHost() +
|
||||
+ static const base::NoDestructor<GURL> kRecommendedSubscriptionListUrl(GetHost() +
|
||||
"recommendations.json");
|
||||
- return kRecommendedSubscriptionListUrl;
|
||||
+ return *kRecommendedSubscriptionListUrl;
|
||||
}
|
||||
|
||||
KnownSubscriptionInfo::KnownSubscriptionInfo() = default;
|
||||
@@ -103,12 +105,24 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
// The list isn't updated very often. If it starts to become a burden to
|
||||
// align the C++ representation, better to update it manually because it also
|
||||
// contains visibility and first run behavior options.
|
||||
- static std::vector<KnownSubscriptionInfo> recommendations = {
|
||||
+ static const base::NoDestructor<std::vector<KnownSubscriptionInfo>> recommendations({
|
||||
{DefaultSubscriptionUrl(),
|
||||
"EasyList",
|
||||
{"en"},
|
||||
SubscriptionUiVisibility::Visible,
|
||||
@@ -11886,7 +12260,7 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
SubscriptionPrivilegedFilterStatus::Forbidden},
|
||||
{GURL(GetHost() + "abpindo.txt"),
|
||||
"ABPindo",
|
||||
@@ -262,17 +275,23 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
@@ -262,17 +276,23 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
SubscriptionFirstRunBehavior::SubscribeIfLocaleMatch,
|
||||
SubscriptionPrivilegedFilterStatus::Forbidden},
|
||||
{AcceptableAdsUrl(),
|
||||
@@ -11914,7 +12288,7 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
{GURL(GetHost() + "i_dont_care_about_cookies.txt"),
|
||||
"I don't care about cookies",
|
||||
{},
|
||||
@@ -303,13 +322,13 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
@@ -303,13 +323,13 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
{},
|
||||
SubscriptionUiVisibility::Invisible,
|
||||
SubscriptionFirstRunBehavior::Ignore,
|
||||
@@ -11930,7 +12304,19 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
|
||||
// You can customize subscriptions available on first run and in settings
|
||||
// here. Items are displayed in settings in order declared here. See
|
||||
@@ -346,7 +365,7 @@ bool config::AllowPrivilegedFilters(const GURL& url) {
|
||||
@@ -329,9 +349,9 @@ const std::vector<KnownSubscriptionInfo>& config::GetKnownSubscriptions() {
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
- };
|
||||
+ });
|
||||
|
||||
- return recommendations;
|
||||
+ return *recommendations;
|
||||
}
|
||||
|
||||
bool config::AllowPrivilegedFilters(const GURL& url) {
|
||||
@@ -346,7 +366,7 @@ bool config::AllowPrivilegedFilters(const GURL& url) {
|
||||
for (const auto& cur : GetKnownSubscriptions()) {
|
||||
if (cur.url == url) {
|
||||
return cur.privileged_status ==
|
||||
@@ -11939,7 +12325,7 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,9 +375,7 @@ bool config::AllowPrivilegedFilters(const GURL& url) {
|
||||
@@ -356,9 +376,7 @@ bool config::AllowPrivilegedFilters(const GURL& url) {
|
||||
const std::vector<PreloadedSubscriptionInfo>&
|
||||
config::GetPreloadedSubscriptionConfiguration() {
|
||||
static const std::vector<PreloadedSubscriptionInfo> preloaded_subscriptions =
|
||||
@@ -11950,6 +12336,49 @@ diff --git a/components/adblock/core/subscription/subscription_config.cc b/compo
|
||||
return preloaded_subscriptions;
|
||||
}
|
||||
|
||||
@@ -368,10 +386,11 @@ void SetFilterListServerPortForTesting(int port_for_testing) {
|
||||
|
||||
const std::vector<std::string_view>& config::MaybeSplitCombinedAdblockList(
|
||||
const GURL& filter_list) {
|
||||
- static std::vector<std::string_view> EMPTY_VALUE;
|
||||
- static std::string_view VALUE_EASYLIST_EN = "easylist.txt";
|
||||
- static std::map<std::string_view, std::vector<std::string_view>>
|
||||
- filter_lists_map = {
|
||||
+ static const base::NoDestructor<std::vector<std::string_view>> EMPTY_VALUE;
|
||||
+ static constexpr std::string_view VALUE_EASYLIST_EN = "easylist.txt";
|
||||
+ static const base::NoDestructor<
|
||||
+ std::map<std::string_view, std::vector<std::string_view>>>
|
||||
+ filter_lists_map({
|
||||
{"abpindo+easylist.txt", {"abpindo.txt", VALUE_EASYLIST_EN}},
|
||||
{"abpvn+easylist", {"abpvn.txt", VALUE_EASYLIST_EN}},
|
||||
{"bulgarian_list+easylist.",
|
||||
@@ -410,17 +429,20 @@ const std::vector<std::string_view>& config::MaybeSplitCombinedAdblockList(
|
||||
{"rolist+easylist.txt", {"rolist.txt", VALUE_EASYLIST_EN}},
|
||||
{"ruadlist+easylist.txt", {"ruadlist.txt", VALUE_EASYLIST_EN}},
|
||||
{"turkish+easylist.txt", {"turkish.txt", VALUE_EASYLIST_EN}},
|
||||
- };
|
||||
+ });
|
||||
if (filter_list.host() != AdblockBaseFilterListUrl().host()) {
|
||||
- // This method works only for ad block maintained lists.
|
||||
- return EMPTY_VALUE;
|
||||
+ return *EMPTY_VALUE;
|
||||
}
|
||||
+
|
||||
auto path =
|
||||
base::TrimString(filter_list.path_piece(), "/", base::TRIM_LEADING);
|
||||
- if (filter_lists_map.find(path) == filter_lists_map.end()) {
|
||||
- return EMPTY_VALUE;
|
||||
+
|
||||
+ auto it = filter_lists_map->find(path);
|
||||
+ if (it == filter_lists_map->end()) {
|
||||
+ return *EMPTY_VALUE;
|
||||
}
|
||||
- return filter_lists_map[path];
|
||||
+
|
||||
+ return it->second;
|
||||
}
|
||||
|
||||
} // namespace adblock
|
||||
diff --git a/components/adblock/core/subscription/subscription_config.h b/components/adblock/core/subscription/subscription_config.h
|
||||
--- a/components/adblock/core/subscription/subscription_config.h
|
||||
+++ b/components/adblock/core/subscription/subscription_config.h
|
||||
|
||||
@@ -164,7 +164,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -177,8 +177,8 @@ new file mode 100644
|
||||
+public class BromiteJavascriptJITContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteJavascriptJITContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.JAVASCRIPT_JIT,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "javascript_jit",
|
||||
+ /*profilePrefKey*/ "javascript_jit");
|
||||
@@ -197,11 +197,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_javascript_jit_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_javascript_jit_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -229,8 +229,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/javascript_jit.grdp b/components/browser_ui/strings/bromite_content_settings/javascript_jit.grdp
|
||||
|
||||
@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../crash_upload_list_android.h | 1 +
|
||||
chrome/browser/net/chrome_network_delegate.cc | 7 +
|
||||
chrome/browser/ui/BUILD.gn | 1 +
|
||||
chrome/browser/ui/webui/crashes/crashes_ui.cc | 175 ++++++++++++++++--
|
||||
chrome/browser/ui/webui/crashes/crashes_ui.cc | 176 ++++++++++++++++--
|
||||
.../crash/core/browser/crashes_ui_util.h | 4 +
|
||||
.../crash/core/browser/resources/crashes.css | 67 ++++++-
|
||||
.../crash/core/browser/resources/crashes.html | 17 ++
|
||||
@@ -18,11 +18,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/crash_strings.grdp | 22 ++-
|
||||
.../minidump_uploader/CrashFileManager.java | 7 +-
|
||||
.../MinidumpUploadCallable.java | 24 +--
|
||||
.../minidump_uploader/MinidumpUploader.java | 31 +---
|
||||
.../minidump_uploader/MinidumpUploader.java | 31 +--
|
||||
.../upload_list/text_log_upload_list.cc | 1 +
|
||||
components/upload_list/upload_list.cc | 14 ++
|
||||
components/upload_list/upload_list.h | 9 +
|
||||
17 files changed, 377 insertions(+), 138 deletions(-)
|
||||
17 files changed, 378 insertions(+), 138 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java
|
||||
@@ -164,7 +164,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/webui/crashes/crashes_ui.cc
|
||||
--- a/chrome/browser/ui/webui/crashes/crashes_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/crashes/crashes_ui.cc
|
||||
@@ -39,6 +39,19 @@
|
||||
@@ -39,6 +39,20 @@
|
||||
#include "ui/base/resource/resource_scale_factor.h"
|
||||
#include "ui/webui/webui_util.h"
|
||||
|
||||
@@ -177,6 +177,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
+#include "base/task/thread_pool.h"
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
+#include "base/android/path_utils.h"
|
||||
+#include "content/public/browser/navigation_controller.h"
|
||||
+#endif
|
||||
+#include "net/base/filename_util.h"
|
||||
+#include "third_party/zlib/google/zip.h"
|
||||
@@ -184,7 +185,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "chromeos/ash/components/dbus/debug_daemon/debug_daemon_client.h"
|
||||
#endif
|
||||
@@ -68,6 +81,10 @@ void CreateAndAddCrashesUIHTMLSource(Profile* profile) {
|
||||
@@ -68,6 +82,10 @@ void CreateAndAddCrashesUIHTMLSource(Profile* profile) {
|
||||
IDR_CRASHES_CRASHES_HTML);
|
||||
}
|
||||
|
||||
@@ -195,7 +196,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CrashesDOMHandler
|
||||
@@ -77,7 +94,7 @@ void CreateAndAddCrashesUIHTMLSource(Profile* profile) {
|
||||
@@ -77,7 +95,7 @@ void CreateAndAddCrashesUIHTMLSource(Profile* profile) {
|
||||
// The handler for Javascript messages for the chrome://crashes/ page.
|
||||
class CrashesDOMHandler : public WebUIMessageHandler {
|
||||
public:
|
||||
@@ -204,7 +205,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
|
||||
CrashesDOMHandler(const CrashesDOMHandler&) = delete;
|
||||
CrashesDOMHandler& operator=(const CrashesDOMHandler&) = delete;
|
||||
@@ -94,6 +111,8 @@ class CrashesDOMHandler : public WebUIMessageHandler {
|
||||
@@ -94,6 +112,8 @@ class CrashesDOMHandler : public WebUIMessageHandler {
|
||||
// Asynchronously fetches the list of crashes. Called from JS.
|
||||
void HandleRequestCrashes(const base::Value::List& args);
|
||||
|
||||
@@ -213,7 +214,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Asynchronously triggers crash uploading. Called from JS.
|
||||
void HandleRequestUploads(const base::Value::List& args);
|
||||
@@ -105,13 +124,30 @@ class CrashesDOMHandler : public WebUIMessageHandler {
|
||||
@@ -105,13 +125,30 @@ class CrashesDOMHandler : public WebUIMessageHandler {
|
||||
// Asynchronously requests a user triggered upload. Called from JS.
|
||||
void HandleRequestSingleCrashUpload(const base::Value::List& args);
|
||||
|
||||
@@ -245,7 +246,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
}
|
||||
|
||||
CrashesDOMHandler::~CrashesDOMHandler() {
|
||||
@@ -137,6 +173,16 @@ void CrashesDOMHandler::RegisterMessages() {
|
||||
@@ -137,6 +174,16 @@ void CrashesDOMHandler::RegisterMessages() {
|
||||
crash_reporter::kCrashesUIRequestSingleCrashUpload,
|
||||
base::BindRepeating(&CrashesDOMHandler::HandleRequestSingleCrashUpload,
|
||||
base::Unretained(this)));
|
||||
@@ -262,7 +263,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
}
|
||||
|
||||
void CrashesDOMHandler::OnJavascriptDisallowed() {
|
||||
@@ -145,6 +191,10 @@ void CrashesDOMHandler::OnJavascriptDisallowed() {
|
||||
@@ -145,6 +192,10 @@ void CrashesDOMHandler::OnJavascriptDisallowed() {
|
||||
|
||||
void CrashesDOMHandler::HandleRequestCrashes(const base::Value::List& args) {
|
||||
AllowJavascript();
|
||||
@@ -273,7 +274,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
if (first_load_) {
|
||||
first_load_ = false;
|
||||
if (list_available_) {
|
||||
@@ -178,8 +228,7 @@ void CrashesDOMHandler::OnUploadListAvailable() {
|
||||
@@ -178,8 +229,7 @@ void CrashesDOMHandler::OnUploadListAvailable() {
|
||||
}
|
||||
|
||||
void CrashesDOMHandler::UpdateUI() {
|
||||
@@ -283,7 +284,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
|
||||
bool system_crash_reporter = false;
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -228,14 +277,117 @@ void CrashesDOMHandler::UpdateUI() {
|
||||
@@ -228,14 +278,117 @@ void CrashesDOMHandler::UpdateUI() {
|
||||
|
||||
void CrashesDOMHandler::HandleRequestSingleCrashUpload(
|
||||
const base::Value::List& args) {
|
||||
@@ -407,7 +408,7 @@ diff --git a/chrome/browser/ui/webui/crashes/crashes_ui.cc b/chrome/browser/ui/w
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -247,7 +399,8 @@ void CrashesDOMHandler::HandleRequestSingleCrashUpload(
|
||||
@@ -247,7 +400,8 @@ void CrashesDOMHandler::HandleRequestSingleCrashUpload(
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CrashesUI::CrashesUI(content::WebUI* web_ui) : WebUIController(web_ui) {
|
||||
|
||||
@@ -22,19 +22,20 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../tab_management/TabGroupUiProperties.java | 5 +
|
||||
.../tab_management/TabGroupUiToolbarView.java | 17 ++
|
||||
.../tab_management/TabGroupUiViewBinder.java | 3 +
|
||||
.../tab_management/TabListCoordinator.java | 156 +++++++++++++++++-
|
||||
.../tab_management/TabListCoordinator.java | 148 +++++++++++++++++-
|
||||
.../TabListEmptyCoordinator.java | 17 +-
|
||||
.../tab_management/TabSwitcherPaneBase.java | 9 +
|
||||
.../tab_management/TabSwitcherPaneBase.java | 9 ++
|
||||
.../browser/feed/FeedSurfaceCoordinator.java | 4 +
|
||||
.../android/java/res/xml/main_preferences.xml | 3 +-
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 70 ++++++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 3 +-
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 70 +++++++++
|
||||
.../HeadlessBrowserControlsStateProvider.java | 5 +
|
||||
.../compositor/CompositorViewHolder.java | 7 +
|
||||
.../layouts/LayoutManagerChrome.java | 12 +-
|
||||
.../layouts/LayoutManagerChromeTablet.java | 4 +-
|
||||
.../layouts/LayoutManagerChromeTablet.java | 7 +-
|
||||
.../layouts/ToolbarSwipeLayout.java | 14 +-
|
||||
.../overlays/strip/ScrollDelegate.java | 2 +-
|
||||
.../strip/StripLayoutHelperManager.java | 38 ++++-
|
||||
.../strip/StripLayoutHelperManager.java | 37 ++++-
|
||||
.../scene_layer/StaticTabSceneLayer.java | 7 +-
|
||||
.../scene_layer/TabListSceneLayer.java | 8 +
|
||||
.../scene_layer/TabStripSceneLayer.java | 20 ++-
|
||||
@@ -47,10 +48,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../chrome/browser/ntp/RecentTabsPage.java | 31 +++-
|
||||
.../browser/searchwidget/SearchActivity.java | 11 ++
|
||||
.../settings/FragmentDependencyProvider.java | 5 +
|
||||
.../StatusIndicatorCoordinator.java | 9 +
|
||||
.../StatusIndicatorCoordinator.java | 9 ++
|
||||
.../StatusIndicatorSceneLayer.java | 6 +-
|
||||
.../browser/toolbar/ToolbarManager.java | 37 ++++-
|
||||
.../chrome/browser/ui/BottomContainer.java | 18 ++
|
||||
.../chrome/browser/ui/BottomContainer.java | 18 +++
|
||||
.../ui/system/StatusBarColorController.java | 8 +
|
||||
.../android/compositor/layer/toolbar_layer.cc | 10 +-
|
||||
.../scene_layer/tab_strip_scene_layer.cc | 16 +-
|
||||
@@ -76,30 +77,30 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
...mniboxSuggestionsDropdownEmbedderImpl.java | 31 ++++
|
||||
.../suggestions/AutocompleteCoordinator.java | 14 ++
|
||||
.../suggestions/AutocompleteMediator.java | 6 +-
|
||||
.../DropdownItemViewInfoListManager.java | 1 +
|
||||
.../OmniboxSuggestionsDropdown.java | 11 +-
|
||||
.../OmniboxSuggestionsDropdown.java | 8 +
|
||||
.../OmniboxSuggestionsDropdownEmbedder.java | 6 +
|
||||
.../base/BaseSuggestionViewBinder.java | 7 +
|
||||
.../strings/android_chrome_strings.grd | 6 +
|
||||
chrome/browser/ui/android/toolbar/BUILD.gn | 1 +
|
||||
.../toolbar/LocationBarFocusScrimHandler.java | 5 +
|
||||
.../toolbar/ToolbarLongPressMenuHandler.java | 8 -
|
||||
.../bottom/BottomControlsContentDelegate.java | 12 +-
|
||||
.../bottom/BottomControlsCoordinator.java | 11 +-
|
||||
.../bottom/BottomControlsMediator.java | 32 +++-
|
||||
.../bottom/BottomControlsProperties.java | 6 +-
|
||||
.../bottom/BottomControlsViewBinder.java | 2 +
|
||||
.../bottom/ScrollingBottomViewSceneLayer.java | 19 ++-
|
||||
.../toolbar/top/ToolbarControlContainer.java | 9 +
|
||||
.../toolbar/top/ToolbarControlContainer.java | 9 ++
|
||||
.../top/TopToolbarOverlayCoordinator.java | 10 ++
|
||||
.../top/TopToolbarOverlayProperties.java | 8 +-
|
||||
.../toolbar/top/TopToolbarSceneLayer.java | 10 +-
|
||||
.../res/xml/accessibility_preferences.xml | 8 +
|
||||
.../accessibility/AccessibilitySettings.java | 27 +++
|
||||
.../AccessibilitySettingsDelegate.java | 9 +
|
||||
.../accessibility/AccessibilitySettings.java | 27 ++++
|
||||
.../AccessibilitySettingsDelegate.java | 9 ++
|
||||
components/viz/common/features.cc | 2 +
|
||||
.../render_widget_host_view_android.cc | 3 +
|
||||
.../Move-navigation-bar-to-bottom.inc | 17 ++
|
||||
86 files changed, 1061 insertions(+), 78 deletions(-)
|
||||
87 files changed, 1053 insertions(+), 87 deletions(-)
|
||||
create mode 100644 chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc
|
||||
|
||||
@@ -562,19 +563,11 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
mRecyclerView.setLayoutManager(gridLayoutManager);
|
||||
mMediator.registerOrientationListener(gridLayoutManager);
|
||||
mMediator.updateSpanCount(
|
||||
@@ -435,6 +567,25 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
@@ -435,6 +567,17 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
}
|
||||
};
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
+ } else if (mMode == TabListMode.LIST) {
|
||||
+ if (dialogHandler == null && selectionDelegateProvider == null &&
|
||||
+ ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) {
|
||||
+ FrameLayout.LayoutParams recyclerViewParams =
|
||||
+ (FrameLayout.LayoutParams) mRecyclerView.getLayoutParams();
|
||||
+ int toolbarHeightPx = mBrowserControlsStateProvider.getTopControlsHeight();
|
||||
+ recyclerViewParams.topMargin = toolbarHeightPx;
|
||||
+ mRecyclerView.setLayoutParams(recyclerViewParams);
|
||||
+ }
|
||||
+ LinearLayoutManager layout =
|
||||
+ new LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false) {
|
||||
+ @Override
|
||||
@@ -588,7 +581,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
}
|
||||
mMediator.setRecyclerViewItemAnimationToggle(mRecyclerView::setDisableItemAnimations);
|
||||
}
|
||||
@@ -455,7 +606,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
@@ -455,7 +598,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
assumeNonNull(mTabListEmptyCoordinator);
|
||||
mTabListEmptyCoordinator =
|
||||
new TabListEmptyCoordinator(
|
||||
@@ -597,7 +590,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
}
|
||||
mTabListHighlighter = new TabListHighlighter(mModelList);
|
||||
mTabListMergeAnimationManager = new TabListMergeAnimationManager(mRecyclerView);
|
||||
@@ -792,6 +943,9 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
@@ -792,6 +935,9 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
void prepareTabSwitcherPaneView() {
|
||||
registerLayoutChangeListener();
|
||||
mRecyclerView.setupCustomItemAnimator();
|
||||
@@ -731,6 +724,19 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.PrivacySettings"
|
||||
android:key="privacy"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
@@ -1048,7 +1048,8 @@ public class ChromeTabbedActivity extends ChromeActivity {
|
||||
mRootUiCoordinator.getBottomSheetController(),
|
||||
mRootUiCoordinator.getShareDelegateSupplier(),
|
||||
mXrSceneCoreSessionManagerSupplier.get(),
|
||||
- mRootUiCoordinator.getTopControlsStacker());
|
||||
+ mRootUiCoordinator.getTopControlsStacker(),
|
||||
+ /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager());
|
||||
mLayoutStateProviderSupplier.set(mLayoutManager);
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
|
||||
@@ -814,7 +820,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s
|
||||
+ ApplicationLifetime.terminate(true);
|
||||
+ }
|
||||
+ }, Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setDefaultLines(false)
|
||||
+ .setAction(activity.getString(R.string.relaunch),
|
||||
+ /*actionData*/null)
|
||||
+ .setDuration(/*durationMs*/70000);
|
||||
@@ -920,13 +926,23 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -153,7 +154,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome {
|
||||
@@ -114,7 +115,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome {
|
||||
BottomSheetController bottomSheetController,
|
||||
Supplier<ShareDelegate> shareDelegateSupplier,
|
||||
@Nullable XrSceneCoreSessionManager xrSceneCoreSessionManager,
|
||||
- TopControlsStacker topControlsStacker) {
|
||||
+ TopControlsStacker topControlsStacker,
|
||||
+ Supplier<BrowserControlsManager> browserControlsManagerSupplier) {
|
||||
super(
|
||||
host,
|
||||
contentContainer,
|
||||
@@ -153,7 +155,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome {
|
||||
bottomSheetController,
|
||||
shareDelegateSupplier,
|
||||
xrSpaceModeObservableSupplier,
|
||||
- topControlsStacker);
|
||||
+ topControlsStacker,
|
||||
+ /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager());
|
||||
+ browserControlsManagerSupplier);
|
||||
addSceneOverlay(mTabStripLayoutHelperManager);
|
||||
addObserver(mTabStripLayoutHelperManager.getTabSwitcherObserver());
|
||||
mDesktopWindowStateManager = desktopWindowStateManager;
|
||||
@@ -983,15 +999,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
|
||||
@@ -30,6 +30,7 @@ import androidx.appcompat.content.res.AppCompatResources;
|
||||
|
||||
import org.chromium.base.Callback;
|
||||
import org.chromium.base.metrics.RecordUserAction;
|
||||
+import org.chromium.base.supplier.Supplier;
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.build.annotations.EnsuresNonNullIf;
|
||||
@@ -116,6 +117,8 @@ import org.chromium.ui.interpolators.Interpolators;
|
||||
@@ -116,6 +116,8 @@ import org.chromium.ui.interpolators.Interpolators;
|
||||
import org.chromium.ui.resources.ResourceManager;
|
||||
import org.chromium.ui.util.ColorUtils;
|
||||
import org.chromium.url.GURL;
|
||||
@@ -1000,7 +1008,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -274,12 +277,16 @@ public class StripLayoutHelperManager
|
||||
@@ -274,12 +276,16 @@ public class StripLayoutHelperManager
|
||||
// Drag-Drop
|
||||
private @Nullable TabStripDragHandler mTabStripDragHandler;
|
||||
|
||||
@@ -1017,7 +1025,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
if (mModelSelectorButton != null && mModelSelectorButton.onDown(x, y, buttons)) {
|
||||
return;
|
||||
}
|
||||
@@ -304,6 +311,7 @@ public class StripLayoutHelperManager
|
||||
@@ -304,6 +310,7 @@ public class StripLayoutHelperManager
|
||||
if (DragDropGlobalState.hasValue()) {
|
||||
return;
|
||||
}
|
||||
@@ -1025,7 +1033,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
if (mModelSelectorButton != null) {
|
||||
mModelSelectorButton.drag(x, y);
|
||||
}
|
||||
@@ -315,6 +323,7 @@ public class StripLayoutHelperManager
|
||||
@@ -315,6 +322,7 @@ public class StripLayoutHelperManager
|
||||
if (DragDropGlobalState.hasValue()) {
|
||||
return;
|
||||
}
|
||||
@@ -1033,7 +1041,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
long time = time();
|
||||
if (mModelSelectorButton != null && mModelSelectorButton.click(x, y, buttons)) {
|
||||
mModelSelectorButton.handleClick(time, buttons, modifiers);
|
||||
@@ -328,6 +337,7 @@ public class StripLayoutHelperManager
|
||||
@@ -328,6 +336,7 @@ public class StripLayoutHelperManager
|
||||
if (DragDropGlobalState.hasValue()) {
|
||||
return;
|
||||
}
|
||||
@@ -1041,7 +1049,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
getActiveStripLayoutHelper().fling(time(), x, y, velocityX, velocityY);
|
||||
}
|
||||
|
||||
@@ -336,6 +346,7 @@ public class StripLayoutHelperManager
|
||||
@@ -336,6 +345,7 @@ public class StripLayoutHelperManager
|
||||
if (DragDropGlobalState.hasValue()) {
|
||||
return;
|
||||
}
|
||||
@@ -1049,7 +1057,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
getActiveStripLayoutHelper().onLongPress(x, y);
|
||||
}
|
||||
|
||||
@@ -477,7 +488,8 @@ public class StripLayoutHelperManager
|
||||
@@ -477,7 +487,8 @@ public class StripLayoutHelperManager
|
||||
BottomSheetController bottomSheetController,
|
||||
Supplier<ShareDelegate> shareDelegateSupplier,
|
||||
@Nullable ObservableSupplier<Boolean> xrSpaceModeObservableSupplier,
|
||||
@@ -1059,7 +1067,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
mContext = context;
|
||||
Resources res = context.getResources();
|
||||
mManagerHost = managerHost;
|
||||
@@ -591,6 +603,8 @@ public class StripLayoutHelperManager
|
||||
@@ -591,6 +602,8 @@ public class StripLayoutHelperManager
|
||||
multiInstanceManager,
|
||||
shareDelegateSupplier,
|
||||
TabGroupListBottomSheetCoordinator::new);
|
||||
@@ -1068,7 +1076,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
|
||||
tabHoverCardViewStub.setOnInflateListener(
|
||||
(viewStub, view) -> {
|
||||
@@ -860,6 +874,10 @@ public class StripLayoutHelperManager
|
||||
@@ -860,6 +873,10 @@ public class StripLayoutHelperManager
|
||||
yOffset = 0;
|
||||
}
|
||||
|
||||
@@ -1079,7 +1087,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
mTabStripTreeProvider.pushAndUpdateStrip(
|
||||
this,
|
||||
mLayerTitleCacheSupplier.get(),
|
||||
@@ -873,7 +891,9 @@ public class StripLayoutHelperManager
|
||||
@@ -873,7 +890,9 @@ public class StripLayoutHelperManager
|
||||
mStripTransitionScrimOpacity,
|
||||
getActiveStripLayoutHelper().getLeftPaddingToDraw(),
|
||||
getActiveStripLayoutHelper().getRightPaddingToDraw(),
|
||||
@@ -1090,7 +1098,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
|
||||
return mTabStripTreeProvider;
|
||||
}
|
||||
|
||||
@@ -939,11 +959,21 @@ public class StripLayoutHelperManager
|
||||
@@ -939,11 +958,21 @@ public class StripLayoutHelperManager
|
||||
mRightPadding,
|
||||
mTopPadding);
|
||||
|
||||
@@ -2343,7 +2351,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
? ControlsPosition.TOP
|
||||
: mBrowserControlsStateProvider.getControlsPosition(),
|
||||
mDeferredIMEWindowInsetApplicationCallback::getCurrentKeyboardHeight,
|
||||
+ deferredIMEWindowInsetApplicationCallback::getSystemBarInsetsBottom,
|
||||
+ mDeferredIMEWindowInsetApplicationCallback::getSystemBarInsetsBottom,
|
||||
bottomWindowPaddingSupplier);
|
||||
|
||||
mUrlBar = mLocationBarLayout.findViewById(R.id.url_bar);
|
||||
@@ -2526,17 +2534,6 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java
|
||||
@@ -8,6 +8,7 @@ import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.ui.theme.BrandedColorScheme;
|
||||
import org.chromium.ui.base.DeviceFormFactor;
|
||||
import org.chromium.ui.modelutil.MVCListAdapter.ListItem;
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java
|
||||
@@ -2550,28 +2547,25 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
/** A widget for showing a list of omnibox suggestions. */
|
||||
@NullMarked
|
||||
public class OmniboxSuggestionsDropdown extends RecyclerView {
|
||||
@@ -274,7 +277,6 @@ public class OmniboxSuggestionsDropdown extends RecyclerView {
|
||||
addItemDecoration(new SuggestionHorizontalDivider(context));
|
||||
|
||||
mLayoutScrollListener = suggestionLayoutScrollListener;
|
||||
- setLayoutManager(mLayoutScrollListener);
|
||||
mSelectionController =
|
||||
new RecyclerViewSelectionController(
|
||||
mLayoutScrollListener, SelectionController.Mode.SATURATING_WITH_SENTINEL);
|
||||
@@ -285,6 +287,13 @@ public class OmniboxSuggestionsDropdown extends RecyclerView {
|
||||
@@ -285,6 +288,9 @@ public class OmniboxSuggestionsDropdown extends RecyclerView {
|
||||
resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_bottom);
|
||||
int paddingTop =
|
||||
resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_top);
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) {
|
||||
+ // reverse the layout so that the items are at the bottom (in reverse order)
|
||||
+ // and anchored to the bottom edge
|
||||
+ mLayoutScrollListener.setReverseLayout(true);
|
||||
+ paddingTop = 0;
|
||||
+ }
|
||||
+ setLayoutManager(mLayoutScrollListener);
|
||||
this.setPaddingRelative(0, paddingTop, 0, mBaseBottomPadding);
|
||||
|
||||
if (OmniboxFeatures.sAsyncViewInflation.isEnabled()) {
|
||||
@@ -502,6 +508,8 @@ public class OmniboxSuggestionsDropdown extends RecyclerView {
|
||||
}
|
||||
|
||||
/* package */ void setToolbarPosition(@ControlsPosition int toolbarPosition) {
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ toolbarPosition = ControlsPosition.BOTTOM;
|
||||
mToolbarOnTop = toolbarPosition != ControlsPosition.BOTTOM;
|
||||
mLayoutScrollListener.setToolbarPosition(mToolbarOnTop);
|
||||
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java
|
||||
@@ -2673,6 +2667,24 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
|
||||
mLightScrimColor = context.getColor(R.color.omnibox_focused_fading_background_color_light);
|
||||
mScrimModel =
|
||||
new PropertyModel.Builder(ScrimProperties.ALL_KEYS)
|
||||
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarLongPressMenuHandler.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarLongPressMenuHandler.java
|
||||
--- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarLongPressMenuHandler.java
|
||||
+++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarLongPressMenuHandler.java
|
||||
@@ -216,14 +216,6 @@ public class ToolbarLongPressMenuHandler implements ConfigurationChangedObserver
|
||||
@VisibleForTesting
|
||||
ModelList buildMenuItems(boolean onTop) {
|
||||
ModelList itemList = new ModelList();
|
||||
- itemList.add(
|
||||
- new ListItemBuilder()
|
||||
- .withTitleRes(
|
||||
- onTop
|
||||
- ? R.string.toolbar_move_to_the_bottom
|
||||
- : R.string.toolbar_move_to_the_top)
|
||||
- .withMenuId(MenuItemType.MOVE_ADDRESS_BAR_TO)
|
||||
- .build());
|
||||
itemList.add(
|
||||
new ListItemBuilder()
|
||||
.withTitleRes(R.string.toolbar_copy_link)
|
||||
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsContentDelegate.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsContentDelegate.java
|
||||
--- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsContentDelegate.java
|
||||
+++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsContentDelegate.java
|
||||
|
||||
@@ -107,7 +107,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -120,8 +120,8 @@ new file mode 100644
|
||||
+public class BromiteInsecurePrivateNetworkContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteInsecurePrivateNetworkContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.INSECURE_PRIVATE_NETWORK,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "insecure_private_network",
|
||||
+ /*profilePrefKey*/ "insecure_private_network");
|
||||
@@ -140,11 +140,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_insecure_private_network_allowed;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_insecure_private_network_blocked;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -172,8 +172,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/insecure_private_network.grdp b/components/browser_ui/strings/bromite_content_settings/insecure_private_network.grdp
|
||||
|
||||
@@ -97,8 +97,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../components/webauthn/GmsCoreUtils.java | 31 +-
|
||||
.../webauthn/IdentityCredentialsHelper.java | 78 +-
|
||||
.../webauthn/WebauthnModeProvider.java | 15 -
|
||||
.../webauthn/cred_man/CredManHelper.java | 15 +-
|
||||
.../cred_man/CredManMetricsHelper.java | 2 +-
|
||||
.../webauthn/cred_man/CredManHelper.java | 24 +-
|
||||
.../cred_man/CredManMetricsHelper.java | 17 +-
|
||||
.../push_messaging/push_messaging_manager.cc | 2 +-
|
||||
content/public/android/BUILD.gn | 4 -
|
||||
content/test/BUILD.gn | 4 -
|
||||
@@ -112,7 +112,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../gms/ChromiumPlayServicesAvailability.java | 10 +-
|
||||
third_party/androidx/customizations.gni | 14 +-
|
||||
third_party/cardboard/BUILD.gn | 4 -
|
||||
88 files changed, 128 insertions(+), 2603 deletions(-)
|
||||
88 files changed, 137 insertions(+), 2618 deletions(-)
|
||||
create mode 100644 components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java
|
||||
|
||||
diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
||||
@@ -732,7 +732,7 @@ diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrom
|
||||
import org.jni_zero.JniType;
|
||||
import org.jni_zero.NativeMethods;
|
||||
|
||||
@@ -534,13 +532,6 @@ public class PasswordManagerHelper {
|
||||
@@ -531,13 +529,6 @@ public class PasswordManagerHelper {
|
||||
// If the exception is not a Chrome-defined one, it means that the call failed at the
|
||||
// API call level. It could have either failed with a known ApiException or because of a
|
||||
// different error (e.g. a different exception thrown by the implementation of the API).
|
||||
@@ -3816,17 +3816,33 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java
|
||||
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java
|
||||
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java
|
||||
@@ -40,8 +40,7 @@ import org.chromium.build.annotations.NullMarked;
|
||||
@@ -40,8 +40,6 @@ import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.components.webauthn.AuthenticationContextProvider;
|
||||
import org.chromium.components.webauthn.Barrier;
|
||||
-import org.chromium.components.webauthn.Fido2CredentialRequest.CancellableUiState;
|
||||
-import org.chromium.components.webauthn.Fido2CredentialRequestJni;
|
||||
+import org.chromium.components.webauthn.CancellableUiState;
|
||||
import org.chromium.components.webauthn.GetAssertionOutcome;
|
||||
import org.chromium.components.webauthn.GetCredentialResponseCallback;
|
||||
import org.chromium.components.webauthn.MakeCredentialOutcome;
|
||||
@@ -113,8 +112,7 @@ public class CredManHelper {
|
||||
@@ -83,6 +81,16 @@ public class CredManHelper {
|
||||
private CredManMetricsHelper mMetricsHelper;
|
||||
private @Nullable Runnable mNoCredentialsFallback;
|
||||
|
||||
+ public enum CancellableUiState {
|
||||
+ NONE,
|
||||
+ WAITING_FOR_RP_ID_VALIDATION,
|
||||
+ WAITING_FOR_CREDENTIAL_LIST,
|
||||
+ WAITING_FOR_SELECTION,
|
||||
+ REQUEST_SENT_TO_PLATFORM,
|
||||
+ CANCEL_PENDING,
|
||||
+ CANCEL_PENDING_RP_ID_VALIDATION_COMPLETE,
|
||||
+ }
|
||||
+
|
||||
// A callback that provides an AuthenticatorStatus error in the first argument, and optionally a
|
||||
// metrics recording outcome in the second.
|
||||
public interface ErrorCallback {
|
||||
@@ -113,8 +121,7 @@ public class CredManHelper {
|
||||
ErrorCallback errorCallback) {
|
||||
log(TAG, "startMakeRequest");
|
||||
mClientDataJson = clientDataJson;
|
||||
@@ -3836,7 +3852,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
|
||||
OutcomeReceiver<CreateCredentialResponse, CreateCredentialException> receiver =
|
||||
new OutcomeReceiver<>() {
|
||||
@@ -450,8 +448,7 @@ public class CredManHelper {
|
||||
@@ -450,8 +457,7 @@ public class CredManHelper {
|
||||
CRED_MAN_PREFIX
|
||||
+ "BUNDLE_KEY_AUTHENTICATION_RESPONSE_JSON");
|
||||
assertNonNull(json);
|
||||
@@ -3846,7 +3862,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
if (responseSerialized == null) {
|
||||
logError(
|
||||
TAG,
|
||||
@@ -619,8 +616,7 @@ public class CredManHelper {
|
||||
@@ -619,8 +625,7 @@ public class CredManHelper {
|
||||
boolean requestPasswords,
|
||||
boolean preferImmediatelyAvailable,
|
||||
boolean ignoreGpm) {
|
||||
@@ -3856,7 +3872,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
|
||||
boolean hasAllowCredentials =
|
||||
options.allowCredentials != null && options.allowCredentials.length != 0;
|
||||
@@ -658,8 +654,7 @@ public class CredManHelper {
|
||||
@@ -658,8 +663,7 @@ public class CredManHelper {
|
||||
Bundle data) {
|
||||
String json = data.getString(BUNDLE_KEY_REGISTRATION_RESPONSE_JSON);
|
||||
assertNonNull(json);
|
||||
@@ -3869,15 +3885,36 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java
|
||||
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java
|
||||
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManMetricsHelper.java
|
||||
@@ -8,7 +8,7 @@ import androidx.annotation.IntDef;
|
||||
@@ -8,7 +8,6 @@ import androidx.annotation.IntDef;
|
||||
|
||||
import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
-import org.chromium.components.webauthn.Fido2CredentialRequest.CancellableUiState;
|
||||
+import org.chromium.components.webauthn.CancellableUiState;
|
||||
|
||||
/**
|
||||
* This class is responsible for emitting histograms regarding CredMan usage in
|
||||
@@ -104,20 +103,6 @@ public class CredManMetricsHelper {
|
||||
}
|
||||
|
||||
public void reportGetCredentialMetrics(
|
||||
- @CredManGetRequestEnum int value, CancellableUiState cancellableUiState) {
|
||||
- assert !(cancellableUiState == CancellableUiState.NONE)
|
||||
- || !(value == CredManGetRequestEnum.SUCCESS_PASSWORD)
|
||||
- : "Passwords cannot be received from modal requests!";
|
||||
- if (cancellableUiState == CancellableUiState.NONE) {
|
||||
- RecordHistogram.recordEnumeratedHistogram(
|
||||
- "WebAuthentication.Android.CredManModalRequests",
|
||||
- value,
|
||||
- CredManGetRequestEnum.NUM_ENTRIES);
|
||||
- return;
|
||||
- }
|
||||
- RecordHistogram.recordEnumeratedHistogram(
|
||||
- "WebAuthentication.Android.CredManConditionalRequest",
|
||||
- value,
|
||||
- CredManGetRequestEnum.NUM_ENTRIES);
|
||||
+ @CredManGetRequestEnum int value, Object cancellableUiState) {
|
||||
}
|
||||
}
|
||||
diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/browser/push_messaging/push_messaging_manager.cc
|
||||
--- a/content/browser/push_messaging/push_messaging_manager.cc
|
||||
+++ b/content/browser/push_messaging/push_messaging_manager.cc
|
||||
|
||||
@@ -10,11 +10,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../browser/blob/blob_memory_controller.cc | 20 ++++++++++---------
|
||||
.../browser/quota/quota_device_info_helper.cc | 17 ++++++++++++++--
|
||||
.../approximated_device_memory.cc | 7 ++++++-
|
||||
.../frame/navigator_concurrent_hardware.cc | 18 ++++++-----------
|
||||
.../frame/navigator_concurrent_hardware.cc | 20 ++++++-------------
|
||||
.../measure_memory_controller.cc | 5 +++++
|
||||
.../blink/renderer/core/timing/memory_info.cc | 14 ++++++++++---
|
||||
.../core/timing/window_performance.cc | 2 +-
|
||||
10 files changed, 66 insertions(+), 28 deletions(-)
|
||||
10 files changed, 66 insertions(+), 30 deletions(-)
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Remove-support-for-device-memory-and-cpu-recovery.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_h/Remove-support-for-device-memory-and-cpu-recovery.inc
|
||||
|
||||
@@ -65,10 +65,10 @@ diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/bl
|
||||
|
||||
+// static
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = GiB(4.0);
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = base::GiB(4.0);
|
||||
+constexpr int64_t approximated_device_disk_size = 8ull * 1024 * 1024 * 1024;
|
||||
+#else
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = GiB(8.0);
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = base::GiB(8.0);
|
||||
+constexpr int64_t approximated_device_disk_size = 200ull * 1024 * 1024 * 1024;
|
||||
+#endif
|
||||
+
|
||||
@@ -111,10 +111,10 @@ diff --git a/storage/browser/quota/quota_device_info_helper.cc b/storage/browser
|
||||
+
|
||||
+// static
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = GiB(4.0);
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = base::GiB(4.0);
|
||||
+constexpr int64_t approximated_device_disk_size = 8ull * 1024 * 1024 * 1024;
|
||||
+#else
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = GiB(8.0);
|
||||
+constexpr base::ByteCount approximated_device_memory_gb_ = base::GiB(8.0);
|
||||
+constexpr int64_t approximated_device_disk_size = 200ull * 1024 * 1024 * 1024;
|
||||
+#endif
|
||||
+
|
||||
@@ -162,7 +162,7 @@ diff --git a/third_party/blink/common/device_memory/approximated_device_memory.c
|
||||
diff --git a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
|
||||
--- a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
|
||||
@@ -3,26 +3,20 @@
|
||||
@@ -3,26 +3,18 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "third_party/blink/renderer/core/frame/navigator_concurrent_hardware.h"
|
||||
@@ -180,8 +180,8 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware
|
||||
-// form-factor in order to maintain plausibility over time.
|
||||
-constexpr unsigned kReducedHardwareConcurrencyValue = 8u;
|
||||
-
|
||||
} // namespace
|
||||
|
||||
-} // namespace
|
||||
-
|
||||
unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
|
||||
- if (RuntimeEnabledFeatures::ReduceHardwareConcurrencyEnabled()) {
|
||||
- return kReducedHardwareConcurrencyValue;
|
||||
|
||||
@@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../chrome/browser/ui/RootUiCoordinator.java | 18 -----
|
||||
chrome/browser/ui/android/omnibox/BUILD.gn | 1 -
|
||||
.../chrome/browser/omnibox/LocationBar.java | 6 --
|
||||
.../omnibox/LocationBarCoordinator.java | 12 ----
|
||||
.../omnibox/LocationBarCoordinator.java | 14 +---
|
||||
.../browser/omnibox/LocationBarLayout.java | 6 --
|
||||
.../browser/omnibox/LocationBarMediator.java | 65 ++-----------------
|
||||
.../chrome/browser/omnibox/OmniboxStub.java | 8 ---
|
||||
@@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../suggestions/AutocompleteMediator.java | 8 ---
|
||||
.../omnibox/voice/VoiceRecognitionUtil.java | 1 +
|
||||
chrome/browser/ui/android/toolbar/BUILD.gn | 1 -
|
||||
20 files changed, 9 insertions(+), 257 deletions(-)
|
||||
20 files changed, 10 insertions(+), 258 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java
|
||||
@@ -422,6 +422,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
@Override
|
||||
public @Nullable OmniboxStub getOmniboxStub() {
|
||||
return mLocationBarMediator;
|
||||
@@ -688,7 +681,7 @@ public class LocationBarCoordinator
|
||||
public void startAutocompletePrefetch() {
|
||||
if (!mNativeInitialized) return;
|
||||
mAutocompleteCoordinator.prefetchZeroSuggestResults(
|
||||
- mLocationBarMediator.getLocationBarDataProvider().getTab());
|
||||
+ /* tab */ null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -854,11 +847,6 @@ public class LocationBarCoordinator
|
||||
|
||||
// End tablet-specific methods.
|
||||
|
||||
@@ -11,11 +11,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../last_tab_standing_tracker_factory.cc | 36 +++++++++++
|
||||
.../last_tab_standing_tracker_factory.h | 40 +++++++++++++
|
||||
.../last_tab_standing_tracker_observer.h | 24 ++++++++
|
||||
.../last_tab_standing_tracker_tab_helper.cc | 45 ++++++++++++++
|
||||
.../last_tab_standing_tracker_tab_helper.cc | 46 +++++++++++++++
|
||||
.../last_tab_standing_tracker_tab_helper.h | 37 ++++++++++++
|
||||
...hrome_browser_main_extra_parts_profiles.cc | 2 +
|
||||
chrome/browser/ui/tab_helpers.cc | 2 +
|
||||
11 files changed, 297 insertions(+)
|
||||
11 files changed, 298 insertions(+)
|
||||
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker.cc
|
||||
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker.h
|
||||
create mode 100644 chrome/browser/permissions/last_tab_standing_tracker_factory.cc
|
||||
@@ -291,7 +291,7 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/permissions/last_tab_standing_tracker_tab_helper.cc
|
||||
@@ -0,0 +1,45 @@
|
||||
@@ -0,0 +1,46 @@
|
||||
+// Copyright 2020 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -301,6 +301,7 @@ new file mode 100644
|
||||
+#include "chrome/browser/permissions/last_tab_standing_tracker.h"
|
||||
+#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
|
||||
+#include "content/public/browser/navigation_handle.h"
|
||||
+#include "content/public/browser/page.h"
|
||||
+
|
||||
+LastTabStandingTrackerTabHelper::~LastTabStandingTrackerTabHelper() = default;
|
||||
+
|
||||
|
||||
@@ -11,11 +11,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 1 +
|
||||
.../chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
.../DropdownItemViewInfoListBuilder.java | 11 +++++++++--
|
||||
.../DropdownItemViewInfoListBuilder.java | 9 ++++++++-
|
||||
.../restore-Search-Ready-Omnibox-flag.inc | 13 +++++++++++++
|
||||
.../restore-Search-Ready-Omnibox-flag.inc | 3 +++
|
||||
.../restore-Search-Ready-Omnibox-flag.inc | 1 +
|
||||
6 files changed, 28 insertions(+), 2 deletions(-)
|
||||
6 files changed, 27 insertions(+), 1 deletion(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/restore-Search-Ready-Omnibox-flag.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/restore-Search-Ready-Omnibox-flag.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/restore-Search-Ready-Omnibox-flag.inc
|
||||
@@ -66,11 +66,10 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
mGroupSeparatorProcessor = new GroupSeparatorProcessor(uiContext.context);
|
||||
mHeaderProcessor = new HeaderProcessor(uiContext.context);
|
||||
- registerSuggestionProcessor(new EditUrlSuggestionProcessor(uiContext));
|
||||
+ mEditUrlSuggestionProcessor = new EditUrlSuggestionProcessor(uiContext));
|
||||
+ mEditUrlSuggestionProcessor = new EditUrlSuggestionProcessor(uiContext);
|
||||
registerSuggestionProcessor(new AnswerSuggestionProcessor(uiContext));
|
||||
registerSuggestionProcessor(new ClipboardSuggestionProcessor(uiContext));
|
||||
- registerSuggestionProcessor(new EntitySuggestionProcessor(uiContext));
|
||||
+ registerSuggestionProcessor(new EntitySuggestionProcessor(uiContext);
|
||||
registerSuggestionProcessor(new EntitySuggestionProcessor(uiContext));
|
||||
+ registerSuggestionProcessor(mEditUrlSuggestionProcessor);
|
||||
+
|
||||
registerSuggestionProcessor(new TailSuggestionProcessor(uiContext));
|
||||
|
||||
@@ -21,11 +21,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
chrome/android/java/res/values/attrs.xml | 4 +
|
||||
chrome/android/java/res/values/dimens.xml | 2 +
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 3 +-
|
||||
.../browser/TabbedModeTabDelegateFactory.java | 10 +-
|
||||
.../browser/TabbedModeTabDelegateFactory.java | 12 +-
|
||||
.../feedback/ChromeFeedbackCollector.java | 1 +
|
||||
.../feedback/SimplifiedNtpFeedbackSource.java | 38 +++
|
||||
.../identity_disc/IdentityDiscController.java | 5 +-
|
||||
.../native_page/NativePageFactory.java | 19 +-
|
||||
.../native_page/NativePageFactory.java | 20 +-
|
||||
.../NativePageNavigationDelegateImpl.java | 2 +-
|
||||
.../chrome/browser/ntp/NewTabPage.java | 8 +-
|
||||
.../chrome/browser/ntp/NewTabPageLayout.java | 29 +-
|
||||
@@ -42,12 +42,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/flags/ChromeFeatureList.java | 3 +-
|
||||
.../client_util/HomeModulesRankingHelper.java | 1 +
|
||||
.../strings/android_chrome_strings.grd | 6 +
|
||||
.../history/core/browser/top_sites_impl.h | 4 +-
|
||||
.../core/browser/top_sites_constants.h | 2 +-
|
||||
components/ntp_tiles/custom_links_store.cc | 2 -
|
||||
.../Restore-Simplified-NTP-launch.inc | 12 +
|
||||
.../Restore-Simplified-NTP-launch.inc | 5 +
|
||||
.../Restore-Simplified-NTP-launch.inc | 10 +
|
||||
.../Restore-Simplified-NTP-launch.inc | 1 +
|
||||
41 files changed, 632 insertions(+), 61 deletions(-)
|
||||
41 files changed, 639 insertions(+), 60 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/drawable-hdpi/ic_most_visited_placeholder.png
|
||||
create mode 100644 chrome/android/java/res/drawable-mdpi/ic_most_visited_placeholder.png
|
||||
create mode 100644 chrome/android/java/res/drawable-xhdpi/ic_most_visited_placeholder.png
|
||||
@@ -594,7 +594,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
|
||||
import org.chromium.chrome.browser.compositor.CompositorViewHolder;
|
||||
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
|
||||
@@ -89,6 +90,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
@@ -55,6 +56,8 @@ import org.chromium.ui.modaldialog.ModalDialogManager;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
+import androidx.annotation.NonNull;
|
||||
+
|
||||
/**
|
||||
* {@link TabDelegateFactory} class to be used in all {@link Tab} instances owned by a {@link
|
||||
* ChromeTabbedActivity}.
|
||||
@@ -89,6 +92,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
private final ObservableSupplier<TopInsetCoordinator> mTopInsetCoordinatorSupplier;
|
||||
private final StartupMetricsTracker mStartupMetricsTracker;
|
||||
private final @Nullable ExclusiveAccessManager mExclusiveAccessManager;
|
||||
@@ -603,7 +612,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe
|
||||
private @Nullable NativePageFactory mNativePageFactory;
|
||||
|
||||
public TabbedModeTabDelegateFactory(
|
||||
@@ -119,7 +122,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
@@ -119,7 +124,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
ObservableSupplier<EdgeToEdgeController> edgeToEdgeControllerSupplier,
|
||||
ObservableSupplier<TopInsetCoordinator> topInsetCoordinatorSupplier,
|
||||
StartupMetricsTracker startupMetricsTracker,
|
||||
@@ -613,7 +622,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe
|
||||
mActivity = activity;
|
||||
mAppBrowserControlsVisibilityDelegate = appBrowserControlsVisibilityDelegate;
|
||||
mShareDelegateSupplier = shareDelegateSupplier;
|
||||
@@ -148,6 +152,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
@@ -148,6 +154,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
mTopInsetCoordinatorSupplier = topInsetCoordinatorSupplier;
|
||||
mStartupMetricsTracker = startupMetricsTracker;
|
||||
mExclusiveAccessManager = exclusiveAccessManager;
|
||||
@@ -621,7 +630,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -218,7 +223,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
@@ -218,7 +225,8 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory {
|
||||
mModuleRegistrySupplier,
|
||||
mEdgeToEdgeControllerSupplier,
|
||||
mTopInsetCoordinatorSupplier,
|
||||
@@ -703,7 +712,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/I
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
|
||||
@@ -24,6 +24,7 @@ import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
@@ -12,6 +12,7 @@ import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
+import androidx.annotation.NonNull;
|
||||
|
||||
import org.chromium.base.jank_tracker.JankTracker;
|
||||
import org.chromium.base.supplier.DestroyableObservableSupplier;
|
||||
@@ -24,6 +25,7 @@ import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
import org.chromium.chrome.browser.app.ChromeActivity;
|
||||
import org.chromium.chrome.browser.app.download.home.DownloadPage;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkPage;
|
||||
@@ -711,7 +728,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsMarginSupplier;
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
|
||||
import org.chromium.chrome.browser.fullscreen.BrowserControlsManager;
|
||||
@@ -87,6 +88,7 @@ public class NativePageFactory {
|
||||
@@ -87,6 +89,7 @@ public class NativePageFactory {
|
||||
private final ObservableSupplier<EdgeToEdgeController> mEdgeToEdgeControllerSupplier;
|
||||
private final ObservableSupplier<TopInsetCoordinator> mTopInsetCoordinatorSupplier;
|
||||
private final StartupMetricsTracker mStartupMetricsTracker;
|
||||
@@ -719,7 +736,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
private @Nullable NewTabPageCreationTracker mNewTabPageCreationTracker;
|
||||
|
||||
private @Nullable NativePageBuilder mNativePageBuilder;
|
||||
@@ -110,7 +112,8 @@ public class NativePageFactory {
|
||||
@@ -110,7 +113,8 @@ public class NativePageFactory {
|
||||
OneshotSupplier<ModuleRegistry> moduleRegistrySupplier,
|
||||
ObservableSupplier<EdgeToEdgeController> edgeToEdgeControllerSupplier,
|
||||
ObservableSupplier<TopInsetCoordinator> topInsetCoordinatorSupplier,
|
||||
@@ -729,7 +746,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
mActivity = activity;
|
||||
mBottomSheetController = sheetController;
|
||||
mBrowserControlsManager = browserControlsManager;
|
||||
@@ -129,6 +132,7 @@ public class NativePageFactory {
|
||||
@@ -129,6 +133,7 @@ public class NativePageFactory {
|
||||
mEdgeToEdgeControllerSupplier = edgeToEdgeControllerSupplier;
|
||||
mTopInsetCoordinatorSupplier = topInsetCoordinatorSupplier;
|
||||
mStartupMetricsTracker = startupMetricsTracker;
|
||||
@@ -737,7 +754,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
}
|
||||
|
||||
private NativePageBuilder getBuilder() {
|
||||
@@ -153,7 +157,8 @@ public class NativePageFactory {
|
||||
@@ -153,7 +158,8 @@ public class NativePageFactory {
|
||||
mModuleRegistrySupplier,
|
||||
mEdgeToEdgeControllerSupplier,
|
||||
mTopInsetCoordinatorSupplier,
|
||||
@@ -747,7 +764,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
}
|
||||
return mNativePageBuilder;
|
||||
}
|
||||
@@ -187,9 +192,10 @@ public class NativePageFactory {
|
||||
@@ -187,9 +193,10 @@ public class NativePageFactory {
|
||||
private final ObservableSupplier<EdgeToEdgeController> mEdgeToEdgeControllerSupplier;
|
||||
private final ObservableSupplier<TopInsetCoordinator> mTopInsetCoordinatorSupplier;
|
||||
private final StartupMetricsTracker mStartupMetricsTracker;
|
||||
@@ -759,7 +776,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
Supplier<NewTabPageCreationTracker> newTabPageCreationTracker,
|
||||
BottomSheetController sheetController,
|
||||
BrowserControlsManager browserControlsManager,
|
||||
@@ -207,7 +213,8 @@ public class NativePageFactory {
|
||||
@@ -207,7 +214,8 @@ public class NativePageFactory {
|
||||
OneshotSupplier<ModuleRegistry> moduleRegistrySupplier,
|
||||
ObservableSupplier<EdgeToEdgeController> edgeToEdgeControllerSupplier,
|
||||
ObservableSupplier<TopInsetCoordinator> topInsetCoordinatorSupplier,
|
||||
@@ -769,7 +786,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
mActivity = activity;
|
||||
mNewTabPageCreationTracker = newTabPageCreationTracker;
|
||||
mBottomSheetController = sheetController;
|
||||
@@ -227,6 +234,7 @@ public class NativePageFactory {
|
||||
@@ -227,6 +235,7 @@ public class NativePageFactory {
|
||||
mEdgeToEdgeControllerSupplier = edgeToEdgeControllerSupplier;
|
||||
mTopInsetCoordinatorSupplier = topInsetCoordinatorSupplier;
|
||||
mStartupMetricsTracker = startupMetricsTracker;
|
||||
@@ -777,7 +794,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
}
|
||||
|
||||
protected NativePage buildNewTabPage(Tab tab, String url) {
|
||||
@@ -265,7 +273,8 @@ public class NativePageFactory {
|
||||
@@ -265,7 +274,8 @@ public class NativePageFactory {
|
||||
mModuleRegistrySupplier,
|
||||
mEdgeToEdgeControllerSupplier,
|
||||
mTopInsetCoordinatorSupplier,
|
||||
@@ -1523,20 +1540,18 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
<message name="IDS_MOST_VISITED_ITEM_REMOVED" desc="Text shown when the user removes one of the most visited websites on the new tab page.">
|
||||
Item removed
|
||||
</message>
|
||||
diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h
|
||||
--- a/components/history/core/browser/top_sites_impl.h
|
||||
+++ b/components/history/core/browser/top_sites_impl.h
|
||||
@@ -37,8 +37,8 @@ class FilePath;
|
||||
diff --git a/components/history/core/browser/top_sites_constants.h b/components/history/core/browser/top_sites_constants.h
|
||||
--- a/components/history/core/browser/top_sites_constants.h
|
||||
+++ b/components/history/core/browser/top_sites_constants.h
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace history {
|
||||
|
||||
-class TopSitesImplTest;
|
||||
-struct SitesAndQueriesRequest;
|
||||
+// How many top sites to store in the cache.
|
||||
// How many top sites to store in the cache.
|
||||
-static constexpr size_t kTopSitesNumber = 10;
|
||||
+static constexpr size_t kTopSitesNumber = 4 * 4 + 2;
|
||||
} // namespace history
|
||||
|
||||
// This class allows requests for most visited urls on any thread. All other
|
||||
// methods must be invoked on the UI thread. All mutations to internal state
|
||||
#endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CONSTANTS_H_
|
||||
diff --git a/components/ntp_tiles/custom_links_store.cc b/components/ntp_tiles/custom_links_store.cc
|
||||
--- a/components/ntp_tiles/custom_links_store.cc
|
||||
+++ b/components/ntp_tiles/custom_links_store.cc
|
||||
@@ -1570,12 +1585,17 @@ diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/R
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc
|
||||
@@ -0,0 +1,5 @@
|
||||
@@ -0,0 +1,10 @@
|
||||
+CROMITE_FEATURE(kSimplifiedNTP,
|
||||
+ "SimplifiedNTP",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+
|
||||
+SET_CROMITE_FEATURE_DISABLED(kMagicStackAndroid);
|
||||
+
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageCustomization);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageCustomizationV2);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageCustomizationToolbarButton);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageCustomizationForMvt);
|
||||
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
||||
@@ -16,7 +16,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
...e_password_preferences_action_bar_menu.xml | 36 +
|
||||
chrome/android/java/res/values/dimens.xml | 6 +
|
||||
.../android/java/res/xml/main_preferences.xml | 3 +-
|
||||
.../settings/PasswordSettings.java | 724 ++++++++++++++++++
|
||||
.../settings/PasswordSettings.java | 697 ++++++++++++++++++
|
||||
.../settings/FragmentDependencyProvider.java | 5 +
|
||||
.../chrome/browser/settings/MainSettings.java | 12 -
|
||||
.../settings/SettingsNavigationImpl.java | 4 +
|
||||
@@ -40,10 +40,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../CredentialEditFragmentView.java | 226 ++++++
|
||||
.../CredentialEntryFragmentViewBase.java | 135 ++++
|
||||
.../browser/password_manager/android/BUILD.gn | 23 +
|
||||
.../PasswordManagerHelper.java | 19 +-
|
||||
.../PasswordManagerUtilBridge.java | 3 +-
|
||||
.../settings/CallbackDelayer.java | 18 +
|
||||
.../settings/DialogManager.java | 168 ++++
|
||||
.../settings/DialogManager.java | 168 +++++
|
||||
.../settings/ExportErrorDialogFragment.java | 110 +++
|
||||
.../password_manager/settings/ExportFlow.java | 583 ++++++++++++++
|
||||
.../password_manager/settings/ExportFlow.java | 583 +++++++++++++++
|
||||
.../settings/ExportFlowInterface.java | 90 +++
|
||||
.../settings/NonCancelableProgressBar.java | 55 ++
|
||||
.../PasswordAccessReauthenticationHelper.java | 143 ++++
|
||||
@@ -55,15 +57,16 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../settings/PasswordsPreference.java | 1 +
|
||||
.../settings/ProgressBarDialogFragment.java | 70 ++
|
||||
.../settings/ReauthenticationManager.java | 198 +++++
|
||||
.../settings/SavedPasswordEntry.java | 41 +
|
||||
.../settings/SavedPasswordEntry.java | 41 ++
|
||||
.../settings/SingleThreadBarrierClosure.java | 49 ++
|
||||
.../settings/TimedCallbackDelayer.java | 33 +
|
||||
.../login_db_deprecation_runner_factory.cc | 2 +-
|
||||
.../android/password_manager_android_util.cc | 1 +
|
||||
.../android/password_ui_view_android.cc | 449 +++++++++++
|
||||
.../android/password_ui_view_android.h | 196 +++++
|
||||
.../android/pwm_disabled/BUILD.gn | 2 -
|
||||
...ssword_manager_settings_service_factory.cc | 4 +-
|
||||
.../strings/android_chrome_strings.grd | 123 ++-
|
||||
.../strings/android_chrome_strings.grd | 123 +++-
|
||||
.../Import-Password-Android.grdp | 9 +
|
||||
.../autofill/core/common/autofill_features.cc | 1 +
|
||||
.../settings/SettingsNavigation.java | 3 +
|
||||
@@ -72,7 +75,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../core/browser/import/password_importer.cc | 11 +
|
||||
components/sync/service/sync_prefs.cc | 2 +-
|
||||
.../Restore-chrome-password-store.inc | 1 +
|
||||
64 files changed, 5529 insertions(+), 23 deletions(-)
|
||||
67 files changed, 5511 insertions(+), 38 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/password_no_result.xml
|
||||
create mode 100644 chrome/android/java/res/menu/save_password_preferences_action_bar_menu.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
@@ -293,7 +296,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
@@ -0,0 +1,724 @@
|
||||
@@ -0,0 +1,697 @@
|
||||
+// Copyright 2014 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -322,7 +325,6 @@ new file mode 100644
|
||||
+import androidx.preference.PreferenceCategory;
|
||||
+import androidx.preference.PreferenceGroup;
|
||||
+
|
||||
+import org.chromium.base.BuildInfo;
|
||||
+import org.chromium.base.supplier.ObservableSupplier;
|
||||
+import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
+import org.chromium.build.annotations.Nullable;
|
||||
@@ -423,7 +425,6 @@ new file mode 100644
|
||||
+ private Preference mLinkPref;
|
||||
+ private Menu mMenu;
|
||||
+
|
||||
+ private @ManagePasswordsReferrer int mManagePasswordsReferrer;
|
||||
+ private final ObservableSupplierImpl<String> mPageTitle = new ObservableSupplierImpl<>();
|
||||
+
|
||||
+ /** For controlling the UX flow of exporting passwords. */
|
||||
@@ -472,8 +473,6 @@ new file mode 100644
|
||||
+
|
||||
+ setHasOptionsMenu(true); // Password Export might be optional but Search is always present.
|
||||
+
|
||||
+ mManagePasswordsReferrer = getReferrerFromInstanceStateOrLaunchBundle(savedInstanceState);
|
||||
+
|
||||
+ mIntentRequestTracker = IntentRequestTracker.createFromDelegate(
|
||||
+ new ActivityIntentRequestTrackerDelegate(getActivity()) {
|
||||
+ @Override
|
||||
@@ -499,19 +498,6 @@ new file mode 100644
|
||||
+ return mPageTitle;
|
||||
+ }
|
||||
+
|
||||
+ private @ManagePasswordsReferrer int getReferrerFromInstanceStateOrLaunchBundle(
|
||||
+ Bundle savedInstanceState) {
|
||||
+ if (savedInstanceState != null
|
||||
+ && savedInstanceState.containsKey(
|
||||
+ PasswordManagerHelper.MANAGE_PASSWORDS_REFERRER)) {
|
||||
+ return savedInstanceState.getInt(PasswordManagerHelper.MANAGE_PASSWORDS_REFERRER);
|
||||
+ }
|
||||
+ Bundle extras = getArguments();
|
||||
+ if (!extras.containsKey(PasswordManagerHelper.MANAGE_PASSWORDS_REFERRER))
|
||||
+ return ManagePasswordsReferrer.CHROME_SETTINGS;
|
||||
+ return extras.getInt(PasswordManagerHelper.MANAGE_PASSWORDS_REFERRER);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
@@ -617,19 +603,13 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ createSavePasswordsSwitch();
|
||||
+ if (shouldShowAutoSigninOption()) {
|
||||
+ createAutoSignInCheckbox();
|
||||
+ }
|
||||
+ createAutoSignInCheckbox();
|
||||
+
|
||||
+ PasswordManagerHandlerProvider.getForProfile(getProfile())
|
||||
+ .getPasswordManagerHandler()
|
||||
+ .updatePasswordLists();
|
||||
+ }
|
||||
+
|
||||
+ private boolean shouldShowAutoSigninOption() {
|
||||
+ return !BuildInfo.getInstance().isAutomotive;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Removes the UI displaying the list of saved passwords or exceptions.
|
||||
+ * @param preferenceCategoryKey The key string identifying the PreferenceCategory to be removed.
|
||||
@@ -799,7 +779,6 @@ new file mode 100644
|
||||
+ if (mSearchQuery != null) {
|
||||
+ outState.putString(SAVED_STATE_SEARCH_QUERY, mSearchQuery);
|
||||
+ }
|
||||
+ outState.putInt(PasswordManagerHelper.MANAGE_PASSWORDS_REFERRER, mManagePasswordsReferrer);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -916,9 +895,6 @@ new file mode 100644
|
||||
+ if (syncService == null || !syncService.isEngineInitialized()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (!PasswordManagerHelper.isSyncingPasswordsWithNoCustomPassphrase(syncService)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (mSearchQuery != null && !mNoPasswords) {
|
||||
+ return; // Don't add the Manage Account link if there is a search going on.
|
||||
+ }
|
||||
@@ -2966,6 +2942,70 @@ diff --git a/chrome/browser/password_manager/android/BUILD.gn b/chrome/browser/p
|
||||
}
|
||||
|
||||
android_library("utils_java") {
|
||||
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
||||
--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
||||
+++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java
|
||||
@@ -38,8 +38,9 @@ import org.chromium.chrome.browser.preferences.Pref;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.chrome.browser.profiles.ProfileKeyedMap;
|
||||
import org.chromium.chrome.browser.pwm_disabled.PasswordCsvDownloadFlowControllerFactory;
|
||||
-import org.chromium.chrome.browser.pwm_disabled.PasswordManagerUnavailableDialogCoordinator;
|
||||
import org.chromium.chrome.browser.sync.SyncServiceFactory;
|
||||
+import org.chromium.chrome.browser.settings.SettingsNavigationFactory;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsNavigation;
|
||||
import org.chromium.components.browser_ui.settings.SettingsCustomTabLauncher;
|
||||
import org.chromium.components.prefs.PrefService;
|
||||
import org.chromium.components.sync.SyncService;
|
||||
@@ -187,6 +188,7 @@ public class PasswordManagerHelper {
|
||||
Context context,
|
||||
Supplier<@Nullable ModalDialogManager> modalDialogManagerSupplier,
|
||||
SettingsCustomTabLauncher settingsCustomTabLauncher) {
|
||||
+ if ((true)) return false;
|
||||
// Automotive doesn't support the export flow.
|
||||
if (!DeviceInfo.isAutomotive()
|
||||
&& LoginDbDeprecationUtilBridge.hasPasswordsInCsv(mProfile)) {
|
||||
@@ -194,16 +196,6 @@ public class PasswordManagerHelper {
|
||||
return true;
|
||||
}
|
||||
|
||||
- if (!PasswordManagerUtilBridge.isPasswordManagerAvailable(UserPrefs.get(mProfile))) {
|
||||
- new PasswordManagerUnavailableDialogCoordinator()
|
||||
- .showDialog(
|
||||
- context,
|
||||
- assertNonNull(modalDialogManagerSupplier.get()),
|
||||
- PasswordManagerUtilBridge.isGooglePlayServicesUpdatable()
|
||||
- ? GmsUpdateLauncher::launch
|
||||
- : null);
|
||||
- return true;
|
||||
- }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -432,6 +424,11 @@ public class PasswordManagerHelper {
|
||||
Supplier<@Nullable ModalDialogManager> modalDialogManagerSupplier,
|
||||
Context context,
|
||||
@Nullable String account) {
|
||||
+ SettingsNavigation settingsNavigation =
|
||||
+ SettingsNavigationFactory.createSettingsNavigation();
|
||||
+ settingsNavigation.startSettings(
|
||||
+ context, SettingsNavigation.SettingsFragment.PASSWORDS);
|
||||
+ if ((true)) return;
|
||||
assert syncService != null;
|
||||
assert PasswordManagerUtilBridge.isPasswordManagerAvailable(prefService);
|
||||
CredentialManagerLauncher credentialManagerLauncher =
|
||||
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerUtilBridge.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerUtilBridge.java
|
||||
--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerUtilBridge.java
|
||||
+++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerUtilBridge.java
|
||||
@@ -41,8 +41,7 @@ public class PasswordManagerUtilBridge {
|
||||
*/
|
||||
@CalledByNative
|
||||
public static boolean isGooglePlayServicesUpdatable() {
|
||||
- return PackageUtils.isPackageInstalled("com.google.android.gms")
|
||||
- && PackageUtils.getPackageInfo("com.android.vending", 0) != null;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
@NativeMethods
|
||||
diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/settings/CallbackDelayer.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/settings/CallbackDelayer.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -5890,6 +5930,18 @@ new file mode 100644
|
||||
+};
|
||||
+
|
||||
+#endif // CHROME_BROWSER_PASSWORD_MANAGER_ANDROID_PASSWORD_UI_VIEW_ANDROID_H_
|
||||
diff --git a/chrome/browser/password_manager/android/pwm_disabled/BUILD.gn b/chrome/browser/password_manager/android/pwm_disabled/BUILD.gn
|
||||
--- a/chrome/browser/password_manager/android/pwm_disabled/BUILD.gn
|
||||
+++ b/chrome/browser/password_manager/android/pwm_disabled/BUILD.gn
|
||||
@@ -19,8 +19,6 @@ android_library("java") {
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/PasswordCsvDownloadDialogViewBinder.java",
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/PasswordCsvDownloadFlowController.java",
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/PasswordCsvDownloadFlowControllerFactory.java",
|
||||
- "java/src/org/chromium/chrome/browser/pwm_disabled/PasswordManagerUnavailableDialogCoordinator.java",
|
||||
- "java/src/org/chromium/chrome/browser/pwm_disabled/PasswordManagerUnavailableDialogMediator.java",
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/PwmDeprecationDialogsMetricsRecorder.java",
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/SingleThreadBarrierClosure.java",
|
||||
"java/src/org/chromium/chrome/browser/pwm_disabled/TimedCallbackDelayer.java",
|
||||
diff --git a/chrome/browser/password_manager/password_manager_settings_service_factory.cc b/chrome/browser/password_manager/password_manager_settings_service_factory.cc
|
||||
--- a/chrome/browser/password_manager/password_manager_settings_service_factory.cc
|
||||
+++ b/chrome/browser/password_manager/password_manager_settings_service_factory.cc
|
||||
|
||||
@@ -57,7 +57,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
+ currentValue =
|
||||
+ WebsitePreferenceBridge.isCategoryEnabled(
|
||||
+ browserContextHandle, ContentSettingsType.JAVASCRIPT)
|
||||
+ ? ContentSettingValues.ALLOW
|
||||
+ ? ContentSetting.ALLOW
|
||||
+ : ContentSetting.BLOCK;
|
||||
}
|
||||
// Not possible to embargo JAVASCRIPT.
|
||||
@@ -69,17 +69,17 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
+ private void setUpCookiesPreference(Preference preference) {
|
||||
+ BrowserContextHandle browserContextHandle =
|
||||
+ getSiteSettingsDelegate().getBrowserContextHandle();
|
||||
+ @ContentSettingValues
|
||||
+ @ContentSetting
|
||||
+ @Nullable
|
||||
+ Integer currentValue =
|
||||
+ mSite.getContentSetting(browserContextHandle, ContentSettingsType.COOKIES);
|
||||
+ // Always show the cookies permission
|
||||
+ if (currentValue == null || currentValue == ContentSettingValues.DEFAULT) {
|
||||
+ if (currentValue == null || currentValue == ContentSetting.DEFAULT) {
|
||||
+ currentValue =
|
||||
+ WebsitePreferenceBridge.isCategoryEnabled(
|
||||
+ browserContextHandle, ContentSettingsType.COOKIES)
|
||||
+ ? ContentSettingValues.ALLOW
|
||||
+ : ContentSettingValues.BLOCK;
|
||||
+ ? ContentSetting.ALLOW
|
||||
+ : ContentSetting.BLOCK;
|
||||
+ }
|
||||
+ // Not possible to embargo COOKIES.
|
||||
+ setupContentSettingsPreference(
|
||||
|
||||
@@ -148,7 +148,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -161,8 +161,8 @@ new file mode 100644
|
||||
+public class BromiteImagesContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteImagesContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.IMAGES,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "images",
|
||||
+ /*profilePrefKey*/ "images");
|
||||
@@ -181,11 +181,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_images_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_images_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -213,8 +213,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/images.grdp b/components/browser_ui/strings/bromite_content_settings/images.grdp
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Temp disable experimental-web-platform-features
|
||||
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
|
||||
@@ -5173,10 +5173,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -5176,10 +5176,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-gpu-rasterization", flag_descriptions::kGpuRasterizationName,
|
||||
flag_descriptions::kGpuRasterizationDescription, kOsAll,
|
||||
MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)},
|
||||
|
||||
@@ -34,9 +34,9 @@ Require: Content-settings-infrastructure.patch
|
||||
.../renderer/content_settings_agent_impl.h | 11 +
|
||||
.../blink/renderer/core/timezone/build.gni | 2 +
|
||||
.../timezone/external_timezone_controller.cc | 37 ++++
|
||||
.../timezone/external_timezone_controller.h | 33 +++
|
||||
.../timezone/external_timezone_controller.h | 34 +++
|
||||
.../core/timezone/timezone_controller.h | 6 +-
|
||||
26 files changed, 755 insertions(+), 2 deletions(-)
|
||||
26 files changed, 756 insertions(+), 2 deletions(-)
|
||||
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
|
||||
@@ -226,7 +226,7 @@ new file mode 100755
|
||||
+import androidx.appcompat.app.AlertDialog;
|
||||
+
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge;
|
||||
+import org.chromium.components.browser_ui.widget.RadioButtonWithDescription;
|
||||
+import org.chromium.components.browser_ui.widget.RadioButtonWithEditText;
|
||||
@@ -243,7 +243,7 @@ new file mode 100755
|
||||
+ extends Preference implements BromiteCustomTriStateSiteSettingsPreferenceImpl,
|
||||
+ RadioGroup.OnCheckedChangeListener,
|
||||
+ RadioButtonWithEditText.OnTextChangeListener {
|
||||
+ private @ContentSettingValues int mSetting = ContentSettingValues.DEFAULT;
|
||||
+ private @ContentSetting int mSetting = ContentSetting.DEFAULT;
|
||||
+ private RadioButtonWithDescription mAllowed;
|
||||
+ private RadioButtonWithEditText mAsk;
|
||||
+ private RadioButtonWithDescription mBlocked;
|
||||
@@ -261,24 +261,24 @@ new file mode 100755
|
||||
+ setSelectable(false);
|
||||
+ }
|
||||
+
|
||||
+ public void initialize(@ContentSettingValues int setting, BrowserContextHandle browserContextHandle) {
|
||||
+ public void initialize(@ContentSetting int setting, BrowserContextHandle browserContextHandle) {
|
||||
+ mSetting = setting;
|
||||
+ mBrowserContextHandle = browserContextHandle;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @ContentSettingValues int getCheckedSetting() {
|
||||
+ public @ContentSetting int getCheckedSetting() {
|
||||
+ return mSetting;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
+ if (mAllowed.isChecked()) {
|
||||
+ mSetting = ContentSettingValues.ALLOW;
|
||||
+ mSetting = ContentSetting.ALLOW;
|
||||
+ } else if (mAsk.isChecked()) {
|
||||
+ mSetting = ContentSettingValues.ASK;
|
||||
+ mSetting = ContentSetting.ASK;
|
||||
+ } else if (mBlocked.isChecked()) {
|
||||
+ mSetting = ContentSettingValues.BLOCK;
|
||||
+ mSetting = ContentSetting.BLOCK;
|
||||
+ }
|
||||
+
|
||||
+ callChangeListener(mSetting);
|
||||
@@ -309,12 +309,12 @@ new file mode 100755
|
||||
+ if (radioButton != null) radioButton.setChecked(true);
|
||||
+ }
|
||||
+
|
||||
+ private RadioButtonWithDescription findRadioButton(@ContentSettingValues int setting) {
|
||||
+ if (setting == ContentSettingValues.ALLOW) {
|
||||
+ private RadioButtonWithDescription findRadioButton(@ContentSetting int setting) {
|
||||
+ if (setting == ContentSetting.ALLOW) {
|
||||
+ return mAllowed;
|
||||
+ } else if (setting == ContentSettingValues.ASK) {
|
||||
+ } else if (setting == ContentSetting.ASK) {
|
||||
+ return mAsk;
|
||||
+ } else if (setting == ContentSettingValues.BLOCK) {
|
||||
+ } else if (setting == ContentSetting.BLOCK) {
|
||||
+ return mBlocked;
|
||||
+ } else {
|
||||
+ return null;
|
||||
@@ -441,7 +441,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.browser_ui.site_settings.TimezoneOverrideSiteSettingsPreference;
|
||||
+import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -457,8 +457,8 @@ new file mode 100644
|
||||
+
|
||||
+ public BromiteTimezoneOverrideContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.TIMEZONE_OVERRIDE,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "timezone_override",
|
||||
+ /*profilePrefKey*/ "timezone_override_permission_list");
|
||||
@@ -477,13 +477,13 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_timezone_override_allowed;
|
||||
+ case ContentSettingValues.ASK:
|
||||
+ case ContentSetting.ASK:
|
||||
+ return R.string.website_settings_category_timezone_override_custom;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_timezone_override_random;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -520,13 +520,13 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.ALLOW;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.ALLOW;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isOnBlockList(@ContentSettingValues Integer contentSetting) {
|
||||
+ return ContentSettingValues.ALLOW != contentSetting;
|
||||
+ public boolean isOnBlockList(@ContentSetting Integer contentSetting) {
|
||||
+ return ContentSetting.ALLOW != contentSetting;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -556,7 +556,7 @@ new file mode 100644
|
||||
+ timeOverrideStatePreference.setOrder(order);
|
||||
+
|
||||
+ timeOverrideStatePreference.setOnPreferenceChangeListener(setting);
|
||||
+ @ContentSettingValues
|
||||
+ @ContentSetting
|
||||
+ int value = WebsitePreferenceBridge.getDefaultContentSetting(
|
||||
+ browserContext, ContentSettingsType.TIMEZONE_OVERRIDE);
|
||||
+ timeOverrideStatePreference.initialize(value, browserContext);
|
||||
@@ -1016,11 +1016,12 @@ diff --git a/third_party/blink/renderer/core/timezone/external_timezone_controll
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/third_party/blink/renderer/core/timezone/external_timezone_controller.h
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,34 @@
|
||||
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TIMEZONE_EXTERNAL_TIMEZONE_CONTROLLER_H_
|
||||
+#define THIRD_PARTY_BLINK_RENDERER_CORE_TIMEZONE_EXTERNAL_TIMEZONE_CONTROLLER_H_
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
+
|
||||
+#include "third_party/blink/renderer/core/core_export.h"
|
||||
+
|
||||
|
||||
@@ -18,12 +18,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../tab_management/TabGridDialogView.java | 13 +
|
||||
.../TabGridDialogViewBinder.java | 8 +
|
||||
.../TabListContainerViewBinder.java | 29 +-
|
||||
.../tab_management/TabListCoordinator.java | 33 +-
|
||||
.../tab_management/TabListCoordinator.java | 37 +-
|
||||
.../TabListEditorCoordinator.java | 2 +-
|
||||
.../tab_management/TabListItemAnimator.java | 2 +-
|
||||
.../tasks/tab_management/TabListMediator.java | 22 +-
|
||||
.../tasks/tab_management/TabListView.java | 123 ++++++
|
||||
.../tab_management/TabListViewBinder.java | 354 ++++++++++++++++++
|
||||
.../tab_management/TabListViewBinder.java | 353 ++++++++++++++++++
|
||||
.../tab_management/TabSwitcherPaneBase.java | 4 +-
|
||||
.../TabSwitcherPaneCoordinatorFactory.java | 5 +-
|
||||
.../tab_management/TabUiFeatureUtilities.java | 7 +
|
||||
@@ -39,7 +39,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../browser/toolbar/top/ToolbarPhone.java | 6 +-
|
||||
.../layout/title_and_description_layout.xml | 31 +-
|
||||
.../tab-switcher-list-mode.inc | 3 +
|
||||
32 files changed, 1151 insertions(+), 35 deletions(-)
|
||||
32 files changed, 1152 insertions(+), 37 deletions(-)
|
||||
create mode 100644 chrome/android/features/tab_ui/java/res/drawable/selected_tab_background.xml
|
||||
create mode 100644 chrome/android/features/tab_ui/java/res/drawable/selected_tab_background_incognito.xml
|
||||
create mode 100644 chrome/android/features/tab_ui/java/res/layout/tab_list_card_item.xml
|
||||
@@ -409,7 +409,25 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
@Override
|
||||
public void onLayoutCompleted(RecyclerView.State state) {
|
||||
super.onLayoutCompleted(state);
|
||||
@@ -741,7 +762,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
@@ -644,7 +665,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
public void addTabListItemSizeChangedObserver(TabListItemSizeChangedObserver observer) {
|
||||
mTabListItemSizeChangedObserverList.addObserver(observer);
|
||||
Size size = mMediator.getDefaultGridCardSize();
|
||||
- assert size != null;
|
||||
+ if (size == null) return;
|
||||
observer.onSizeChanged(mMediator.getCurrentSpanCount(), size);
|
||||
}
|
||||
|
||||
@@ -679,7 +700,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
|
||||
Size getThumbnailSize() {
|
||||
Size size = mMediator.getDefaultGridCardSize();
|
||||
- assert size != null;
|
||||
+ if (size == null) return new Size(0, 0);
|
||||
return TabUtils.deriveThumbnailSize(size, mActivity);
|
||||
}
|
||||
|
||||
@@ -733,7 +754,7 @@ public class TabListCoordinator implements PriceWelcomeMessageProvider, DestroyO
|
||||
}
|
||||
|
||||
private void configureRecyclerViewTouchHelpers() {
|
||||
@@ -606,7 +624,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewBinder.java
|
||||
@@ -0,0 +1,354 @@
|
||||
@@ -0,0 +1,353 @@
|
||||
+// 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.
|
||||
@@ -639,9 +657,8 @@ new file mode 100644
|
||||
+
|
||||
+import org.chromium.chrome.browser.tab_ui.TabListFaviconProvider;
|
||||
+import org.chromium.chrome.browser.tab_ui.TabCardThemeUtil;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabListMediator.TabActionButtonData;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabListMediator.TabActionButtonData.TabActionButtonType;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabListMediator.TabActionListener;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabActionListener;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabActionButtonData.TabActionButtonType;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabProperties.TabActionState;
|
||||
+import org.chromium.chrome.tab_ui.R;
|
||||
+import org.chromium.components.browser_ui.styles.SemanticColorUtils;
|
||||
|
||||
@@ -574,7 +574,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
|
||||
import org.chromium.components.autofill.AutofillProviderUMA;
|
||||
import org.chromium.components.autofill.AutofillSelectionActionMenuDelegate;
|
||||
import org.chromium.components.autofill.AutofillSelectionMenuItemHelper;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge;
|
||||
import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils;
|
||||
@@ -604,9 +604,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
|
||||
url = webContents.getVisibleUrl();
|
||||
}
|
||||
|
||||
+ if (tabUserAgent == TabUserAgent.MOBILE)
|
||||
+ if (mUserAgent == TabUserAgent.MOBILE)
|
||||
+ return UserAgentOverrideOption.FALSE;
|
||||
+ else if (tabUserAgent == TabUserAgent.DESKTOP)
|
||||
+ else if (mUserAgent == TabUserAgent.DESKTOP)
|
||||
+ return UserAgentOverrideOption.TRUE;
|
||||
+
|
||||
CommandLine commandLine = CommandLine.getInstance();
|
||||
@@ -642,14 +642,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
|
||||
+ if (forcedByUser) {
|
||||
+ @TabUserAgent
|
||||
+ int tabUserAgent = TabUserAgent.DEFAULT;
|
||||
+ @ContentSettingValues
|
||||
+ @ContentSetting
|
||||
+ int contentSetting = WebsitePreferenceBridge.getContentSetting(
|
||||
+ mProfile, ContentSettingsType.REQUEST_DESKTOP_SITE, url, url);
|
||||
+ if (!usingDesktopUserAgent
|
||||
+ && contentSetting != ContentSettingValues.BLOCK) {
|
||||
+ && contentSetting != ContentSetting.BLOCK) {
|
||||
+ tabUserAgent = TabUserAgent.MOBILE;
|
||||
+ } else if (usingDesktopUserAgent
|
||||
+ && contentSetting != ContentSettingValues.ALLOW) {
|
||||
+ && contentSetting != ContentSetting.ALLOW) {
|
||||
+ tabUserAgent = TabUserAgent.DESKTOP;
|
||||
+ }
|
||||
+
|
||||
@@ -1138,7 +1138,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -1151,8 +1151,8 @@ new file mode 100644
|
||||
+public class BromiteRequestDesktopSiteContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteRequestDesktopSiteContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.REQUEST_DESKTOP_SITE,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "request_desktop_site",
|
||||
+ /*profilePrefKey*/ "request_desktop_site_permission_list");
|
||||
@@ -1164,11 +1164,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_request_desktop_site_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_request_desktop_site_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
@@ -1186,8 +1186,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.ALLOW;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.ALLOW;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/request_desktop_site.grdp b/components/browser_ui/strings/bromite_content_settings/request_desktop_site.grdp
|
||||
|
||||
@@ -73,7 +73,7 @@ new file mode 100644
|
||||
+import org.chromium.components.browser_ui.site_settings.BromiteCustomContentSetting;
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSetting;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
@@ -86,8 +86,8 @@ new file mode 100644
|
||||
+public class BromiteViewportContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteViewportContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.VIEWPORT,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*defaultEnabledValue*/ ContentSetting.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSetting.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "viewport",
|
||||
+ /*profilePrefKey*/ "viewport");
|
||||
@@ -106,11 +106,11 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ public int getCategorySummary(@Nullable @ContentSetting int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ case ContentSetting.ALLOW:
|
||||
+ return R.string.website_settings_category_viewport_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ case ContentSetting.BLOCK:
|
||||
+ return R.string.website_settings_category_viewport_disabled;
|
||||
+ default:
|
||||
+ // this will cause a runtime exception
|
||||
@@ -139,8 +139,8 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSetting int value) {
|
||||
+ return value != ContentSetting.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/strings/bromite_content_settings/viewport.grdp b/components/browser_ui/strings/bromite_content_settings/viewport.grdp
|
||||
|
||||
@@ -19,7 +19,7 @@ diff --git a/components/signin/public/android/java/src/org/chromium/components/s
|
||||
- if (delegate == null) {
|
||||
- delegate = new NullAccountManagerDelegate();
|
||||
- }
|
||||
+ delegate = new NullAccountManagerDelegate();
|
||||
+ var delegate = new NullAccountManagerDelegate();
|
||||
INSTANCE = new AccountManagerFacadeImpl(delegate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../omnibox/LocationBarCoordinator.java | 2 -
|
||||
.../browser/omnibox/LocationBarMediator.java | 24 --
|
||||
.../ui/webui/new_tab_page/new_tab_page_ui.cc | 6 -
|
||||
chrome/browser/upgrade_detector/BUILD.gn | 2 -
|
||||
.../upgrade_detector/upgrade_detector_impl.cc | 6 -
|
||||
chrome/common/BUILD.gn | 2 -
|
||||
.../google_accounts_private_api_util.cc | 3 +
|
||||
@@ -68,7 +69,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
...gled-chromium-no-special-hosts-domains.inc | 1 +
|
||||
net/base/url_util.cc | 25 +-
|
||||
services/network/network_context.cc | 2 +-
|
||||
61 files changed, 55 insertions(+), 885 deletions(-)
|
||||
62 files changed, 55 insertions(+), 887 deletions(-)
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
|
||||
@@ -899,6 +900,25 @@ diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/br
|
||||
|
||||
return source;
|
||||
}
|
||||
diff --git a/chrome/browser/upgrade_detector/BUILD.gn b/chrome/browser/upgrade_detector/BUILD.gn
|
||||
--- a/chrome/browser/upgrade_detector/BUILD.gn
|
||||
+++ b/chrome/browser/upgrade_detector/BUILD.gn
|
||||
@@ -98,7 +98,6 @@ source_set("impl") {
|
||||
]
|
||||
deps += [
|
||||
"//chrome/browser:buildflags",
|
||||
- "//chrome/browser/google",
|
||||
"//content/public/browser",
|
||||
]
|
||||
} else {
|
||||
@@ -200,7 +199,6 @@ source_set("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//base:i18n",
|
||||
- "//chrome/browser/google",
|
||||
"//components/enterprise:test_support",
|
||||
"//components/network_time",
|
||||
"//content/test:test_support",
|
||||
diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
|
||||
--- a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
|
||||
+++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
|
||||
|
||||
Reference in New Issue
Block a user