From 130780c1bf67aaf9bf9e4e9124d501a0a1ae44f0 Mon Sep 17 00:00:00 2001 From: Max Karolinskiy <41635752+mkarolin@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:21:54 -0400 Subject: [PATCH] Merge pull request #19398 from brave/cr117 Upgrade from Chromium 116 to Chromium 117 --- .gitignore | 1 + DEPS | 2 +- android/brave_java_resources.gni | 13 + android/features/tab_ui/BUILD.gn | 1 + ..._tab_switcher_empty_state_illustration.xml | 47 + ..._tab_switcher_empty_state_illustration.xml | 56 + ..._tab_switcher_empty_state_illustration.xml | 46 + ..._tab_switcher_empty_state_illustration.xml | 55 + .../BraveTabGroupUiCoordinator.java | 12 +- .../BraveTabUiFeatureUtilities.java | 18 - .../BraveTabUiThemeProvider.java | 15 +- .../strings/android_chrome_tab_ui_strings.grd | 14 +- ...android_chrome_tab_ui_strings_override.grd | 7 +- .../feed/BraveFeedSurfaceCoordinator.java | 2 +- android/java/apk_for_test.flags | 10 +- .../chrome/browser/app/BraveActivity.java | 16 +- .../BraveAppMenuPropertiesDelegateImpl.java | 10 +- .../BraveTabbedAppMenuPropertiesDelegate.java | 17 +- .../SetupWalletFragment.java | 1 + .../crypto_wallet/modal/BraveWalletPanel.java | 5 +- .../browser/crypto_wallet/util/Utils.java | 52 +- .../firstrun/BraveFirstRunFlowSequencer.java | 6 +- .../firstrun/WelcomeOnboardingActivity.java | 2 +- .../chrome/browser/ntp/BraveNewTabPage.java | 9 +- .../browser/ntp/BraveNewTabPageLayout.java | 53 +- .../omnibox/BraveLocationBarCoordinator.java | 2 +- .../onboarding/OnboardingPrefManager.java | 7 +- .../chrome/browser/search_engines/BUILD.gn | 2 +- .../settings/AppearancePreferences.java | 1 - .../settings/BravePreferenceFragment.java | 1 + .../settings/BraveSettingsActivity.java | 1 + .../browser/settings/BraveVpnPreferences.java | 1 + .../settings/BraveWalletResetPreference.java | 3 +- .../settings/BraveManageSyncSettings.java | 9 +- .../browser/toolbar/BraveToolbarManager.java | 13 +- .../toolbar/top/BraveToolbarLayoutImpl.java | 31 +- .../top/BraveTopToolbarCoordinator.java | 5 +- .../chrome/browser/util/TabUtils.java | 1 + .../activities/BraveVpnParentActivity.java | 17 +- .../vpn/activities/BraveVpnPlansActivity.java | 2 +- .../activities/BraveVpnProfileActivity.java | 2 +- .../activities/BraveVpnSupportActivity.java | 10 +- .../browser/vpn/utils/BraveVpnUtils.java | 12 +- android/java/proguard.flags | 4 + .../bookmark_empty_state_illustration.xml | 42 + .../history_empty_state_illustration.xml | 47 + ...ne_recent_tab_empty_state_illustration.xml | 85 ++ .../reading_list_empty_state_illustration.xml | 79 + ...et_recent_tab_empty_state_illustration.xml | 74 + .../bookmark_empty_state_illustration.xml | 41 + .../history_empty_state_illustration.xml | 46 + ...ne_recent_tab_empty_state_illustration.xml | 84 + .../reading_list_empty_state_illustration.xml | 78 + ...et_recent_tab_empty_state_illustration.xml | 74 + ...web_notification_small_icon_background.xml | 2 +- ...gment_brave_vpn_always_on_error_dialog.xml | 2 +- .../chromium/chrome/browser/BytecodeTest.java | 46 +- .../BraveContextMenuPopulatorTest.java | 35 - app/BUILD.gn | 1 + app/app_management_strings.grdp | 18 +- app/brave_command_line_helper.cc | 16 +- app/brave_command_line_helper.h | 3 +- app/brave_main_delegate_browsertest.cc | 36 +- app/brave_settings_strings.grdp | 3 + app/brave_strings.grd | 89 +- app/brave_strings_override.grd | 16 +- app/command_utils_unittest.cc | 2 +- app/extensions_strings.grdp | 38 +- app/extensions_strings_override.grdp | 10 +- app/generated_resources.grd | 610 +++++++- app/generated_resources_override.grd | 19 +- app/nearby_share_strings.grdp | 25 +- app/os_settings_search_tag_strings.grdp | 21 + app/os_settings_strings.grdp | 530 +++++-- app/password_manager_ui_strings.grdp | 39 + app/printing_strings.grdp | 24 +- app/profiles_strings.grdp | 42 +- app/profiles_strings_override.grdp | 2 +- app/settings_brave_strings.grdp | 15 +- app/settings_brave_strings_override.grdp | 3 +- app/settings_strings.grdp | 213 ++- app/settings_strings_override.grdp | 5 +- app/shared_settings_strings.grdp | 3 + app/support_tool_strings.grdp | 222 +++ base/feature_override_unittest.cc | 23 +- base/mac/BUILD.gn | 2 - browser/android/brave_sync_worker.cc | 2 +- .../background_helper_mac.mm | 8 +- .../notification_helper_impl_mac.mm | 5 - browser/brave_content_browser_client.cc | 3 +- browser/brave_profile_prefs.cc | 3 +- .../https_upgrade_browsertest.cc | 3 +- .../status_icon/native_popup_menu.cc | 6 +- .../brave_browsing_data_remover_delegate.cc | 4 +- ...browsing_data_remover_delegate_unittest.cc | 4 +- browser/content_settings/BUILD.gn | 13 - browser/debounce/debounce_browsertest.cc | 1 + browser/default_protocol_handler_utils_win.cc | 2 +- browser/download/android/BUILD.gn | 2 - .../download_display_controller_unittest.cc | 14 +- .../downloads_empty_state_illustration.xml | 44 + .../downloads_empty_state_illustration.xml | 43 + .../ephemeral_storage/blob_url_browsertest.cc | 17 +- .../ephemeral_storage_browsertest.cc | 23 +- .../ephemeral_storage_qa_browsertest.cc | 8 +- .../api/identity/brave_web_auth_flow.cc | 2 +- .../brave_crx_generation_browsertest.cc | 1 + ...mode_fingerprint_protection_browsertest.cc | 11 +- ...rave_navigator_usb_farbling_browsertest.cc | 6 +- .../favicon/favicon_database_browsertest.cc | 1 + ...cks_network_delegate_helper_browsertest.cc | 1 + .../mock_permission_lifetime_prompt.cc | 5 + .../mock_permission_lifetime_prompt.h | 1 + .../extensions/brave_overrides/index.ts | 1 + .../extensions/brave_overrides/side_bar.ts | 41 + browser/resources/extensions/sources.gni | 1 + browser/resources/password_manager/BUILD.gn | 18 + .../password_manager/brave_overrides/index.ts | 6 + .../brave_overrides/side_bar.ts | 53 + .../resources/password_manager/sources.gni | 15 + .../settings/brave_overrides/security_page.ts | 19 +- browser/sources.gni | 1 - browser/tab_group/BUILD.gn | 22 + .../tab_groups/BraveTabGroupModelFilter.java | 51 + .../brave_private_window_theme_supplier.cc | 4 +- .../brave_private_window_theme_supplier.h | 2 +- .../themes/brave_theme_service_browsertest.cc | 85 +- browser/ui/BUILD.gn | 2 + .../brave_res/layout/location_status_icon.xml | 55 + .../omnibox/java/res/values/dimens.xml | 1 + .../BraveAutocompleteMediator.java | 2 +- .../BraveDropdownItemViewInfoListBuilder.java | 2 +- .../BraveEditUrlSuggestionProcessor.java | 6 +- .../android/strings/android_brave_strings.grd | 2 +- .../strings/android_chrome_strings.grd | 222 ++- browser/ui/brave_layout_constants.cc | 5 +- browser/ui/color/brave_color_mixer.cc | 50 +- browser/ui/color/brave_color_mixer.h | 28 +- .../ui/color/playlist/playlist_color_mixer.cc | 2 +- .../ui/color/playlist/playlist_color_mixer.h | 4 +- .../commander_service_browsertest.cc | 26 +- .../ui/tabs/brave_vertical_tab_color_mixer.cc | 13 +- .../ui/tabs/brave_vertical_tab_color_mixer.h | 12 +- .../brave_rewards_action_view.cc | 1 + .../brave_shields_action_view.cc | 1 + browser/ui/views/frame/brave_browser_frame.cc | 3 +- browser/ui/views/frame/brave_browser_frame.h | 3 +- browser/ui/views/frame/brave_browser_view.cc | 5 +- .../brave_tabs_search_button_browsertest.cc | 2 +- .../frame/vertical_tab_strip_region_view.cc | 36 +- .../omnibox/brave_omnibox_result_view.cc | 11 +- .../omnibox_autocomplete_browsertest.cc | 11 +- .../brave_wallet_permission_prompt_impl.cc | 5 + .../brave_wallet_permission_prompt_impl.h | 1 + .../views/playlist/playlist_action_dialogs.cc | 4 +- browser/ui/views/tabs/brave_tab.cc | 15 +- browser/ui/views/tabs/brave_tab_strip.cc | 80 +- browser/ui/views/tabs/brave_tab_strip.h | 5 +- .../views/tabs/brave_tab_style_views.inc.cc | 30 +- browser/ui/views/tabs/vertical_tab_utils.cc | 10 +- browser/ui/views/toolbar/wallet_button.cc | 1 + ...ave_settings_localized_strings_provider.cc | 3 +- build/android/bytecode/BUILD.gn | 1 + build/android/bytecode/bytecode_rewriter.gni | 2 + .../org/brave/bytecode/BraveClassAdapter.java | 1 + .../BraveManageSyncSettingsClassAdapter.java | 3 - .../BraveTabGroupModelFilterClassAdapter.java | 26 + build/android/config.gni | 43 + build/commands/lib/config.js | 9 +- build/commands/lib/util.js | 14 +- build/ios/mojom/mojom_wrappers.gni | 1 - build/ios/mojom/public/base/BUILD.gn | 1 - build/mac/BUILD.gn | 14 +- build/mac/sign_app.sh | 8 +- .../android_webview/common/aw_features.cc | 2 +- chromium_src/base/feature_list.cc | 2 +- .../bitcoin-core/src/src/serialize.h | 2 + .../intent_helper/intent_picker_features.cc | 16 + .../chrome/browser/browser_features.cc | 3 + .../content_settings_supervised_provider.h | 15 - .../net/system_network_context_manager.cc | 5 - .../chrome/browser/signin/signin_features.cc | 8 +- .../https_only_mode_upgrade_interceptor.cc | 14 - .../ssl/https_upgrades_navigation_throttle.cc | 7 +- .../ui/cocoa/first_run_dialog_controller.mm | 11 +- .../browser/ui/color/chrome_color_mixer.cc | 4 +- .../browser/ui/color/omnibox_color_mixer.cc | 6 +- .../chrome/browser/ui/layout_constants.cc | 35 +- .../chrome/browser/ui/test/test_browser_ui.cc | 31 + .../ui/toolbar/recent_tabs_sub_menu_model.cc | 2 +- .../ui/toolbar/recent_tabs_sub_menu_model.h | 12 +- chromium_src/chrome/browser/ui/ui_features.cc | 4 + .../browser_caption_button_container_win.cc | 2 +- .../views/location_bar/location_bar_view.cc | 13 +- .../views/omnibox/omnibox_popup_view_views.h | 5 + .../ui/views/omnibox/omnibox_row_view.cc | 19 + .../page_info_cookies_content_view.cc | 25 + .../page_info_cookies_content_view.h | 18 + .../side_panel/side_panel_coordinator.cc | 4 + .../browser/ui/views/tabs/tab_group_style.cc | 5 + .../browser/ui/views/tabs/tab_group_style.h | 4 + .../browser/ui/views/tabs/tab_search_button.h | 10 +- .../ui/webui/help/version_updater_mac.mm | 3 +- .../password_manager/password_manager_ui.cc | 27 + .../settings/safety_hub_handler_unittest.cc | 16 + .../ui/webui/signin/profile_picker_ui.cc | 4 - chromium_src/chrome/common/chrome_features.cc | 7 +- chromium_src/chrome/common/pref_names.cc | 12 - chromium_src/chrome/common/pref_names.h | 2 +- chromium_src/chrome/common/url_constants.cc | 8 + .../brave_install_modes_unittest.cc | 17 +- .../install_static/chromium_install_modes.cc | 66 +- .../core/browser/autofill_experiments.cc | 4 +- .../browser/autofill_experiments_unittest.cc | 9 +- .../core/browser/content_settings_uma_util.cc | 2 +- .../core/browser/content_settings_utils.cc | 18 +- .../core/browser/cookie_settings.cc | 22 - .../core/common/cookie_settings_base.cc | 23 + .../browser/network_session_configurator.cc | 27 - .../browser/autocomplete_controller.cc | 1 + .../omnibox/browser/autocomplete_controller.h | 8 +- .../omnibox/browser/omnibox_controller.cc | 23 + .../omnibox/browser/omnibox_controller.h | 15 +- .../omnibox/browser/omnibox_edit_model.cc | 2 +- .../omnibox/browser/omnibox_view.cc | 34 - .../omnibox/browser/shortcuts_provider.h | 8 +- .../omnibox/common/omnibox_features.cc | 3 + .../components/page_info/core/features.cc | 6 - .../permissions/permission_request.cc | 2 - chromium_src/components/privacy_sandbox/DEPS | 1 + .../privacy_sandbox_settings_unittest.cc | 37 +- .../native_widget_ns_window_bridge.mm | 16 +- .../common/shared_highlighting_features.cc | 1 - .../supervised_user/core/browser/DEPS | 5 + ...upervised_user_content_settings_provider.h | 22 + .../sync/base/model_type_unittest.cc | 2 +- ...sync_session_durations_metrics_recorder.cc | 4 +- .../dom_storage_context_wrapper.cc | 10 +- .../content/public/common/content_features.cc | 3 - .../extension_web_request_event_router.cc | 13 + .../application_context_impl.mm | 2 - .../ios/web/web_state/ui/crw_web_controller.h | 18 + .../web/web_state/ui/crw_web_controller.mm | 92 ++ chromium_src/net/base/features.cc | 2 +- .../net/url_request/url_request_http_job.cc | 15 +- .../net/url_request/url_request_http_job.h | 16 +- .../services/network/cookie_settings.cc | 33 +- .../services/network/cookie_settings.h | 3 +- .../network/restricted_cookie_manager.cc | 18 +- .../network/restricted_cookie_manager.h | 32 +- .../third_party/blink/common/features.cc | 6 + .../core/dom/events/event_listener_map.cc | 7 +- .../core/dom/events/event_listener_map.h | 2 +- .../renderer/core/dom/events/event_target.cc | 16 +- .../blink/renderer/core/frame/local_frame.cc | 18 +- .../modules/battery/battery_manager.cc | 2 +- .../tools/clang/pylib/clang/compile_db.py | 7 +- chromium_src/ui/base/webui/web_ui_util.cc | 23 - .../ui/color/core_default_color_mixer.cc | 7 +- .../ui/color/mac/native_color_mixers_mac.mm | 4 +- chromium_src/ui/color/ui_color_mixer.cc | 8 +- chromium_src/v8/src/builtins/builtins-utils.h | 41 +- chromium_src/v8/src/builtins/builtins.cc | 2 +- chromium_src/v8/src/codegen/compiler.cc | 2 +- chromium_src/v8/src/execution/isolate.cc | 2 +- components/autofill_payments_strings.grdp | 55 +- components/autofill_strings.grdp | 67 +- .../brave_federated_service.cc | 8 +- .../brave_federated/brave_federated_service.h | 4 +- .../core/database/database_activity_info.cc | 7 +- .../core/database/database_balance_report.cc | 3 +- .../database/database_contribution_info.cc | 7 +- .../ad_block_regional_service_manager.cc | 12 +- .../browser/adblock_stub_response_unittest.cc | 16 +- .../browser/brave_shields_util.cc | 15 +- .../browser/connection/ikev2/mac/BUILD.gn | 1 - .../browser/eth_data_builder_unittest.cc | 4 +- components/brave_wallet/browser/test_utils.cc | 5 +- components/commerce_strings.grdp | 50 +- components/components_strings.grd | 15 +- .../core/browser}/brave_global_value_map.cc | 7 +- .../core/browser}/brave_global_value_map.h | 8 +- .../content_settings/core/browser/sources.gni | 2 + ...content_settings_agent_impl_browsertest.cc | 24 +- .../de_amp/browser/test/de_amp_browsertest.cc | 1 + .../user_agent_utils_unittest.cc | 2 + .../ephemeral_storage_service.cc | 6 +- components/management_strings.grdp | 26 +- components/media_message_center_strings.grdp | 6 + components/new_or_sad_tab_strings.grdp | 4 +- .../new_or_sad_tab_strings_override.grdp | 4 +- .../drawable/omnibox_https_valid_refresh.xml | 17 + components/page_info_strings.grdp | 70 +- components/password_manager_strings.grdp | 4 + components/payments_strings.grdp | 12 - components/pdf_strings.grdp | 9 + .../brave_wallet_permission_context.cc | 4 +- .../permissions/permission_expirations.cc | 9 +- components/permissions_strings.grdp | 21 +- components/policy_strings.grdp | 155 +- components/printing_component_strings.grdp | 378 +++++ .../security_interstitials_strings.grdp | 6 +- components/site_settings_strings.grdp | 5 +- components/skus/browser/rs/cxx/src/errors.rs | 8 +- .../skus/browser/rs/cxx/src/httpclient.rs | 26 +- components/skus/browser/rs/cxx/src/lib.rs | 7 +- components/skus/browser/rs/cxx/src/storage.rs | 4 +- .../rs/lib/src/sdk/credentials/fetch.rs | 44 +- .../speedreader/rust/ffi/speedreader.rs | 32 +- .../rust/lib/src/readability/BUILD.gn | 2 + components/supervised_user_strings.grdp | 18 - .../sync/service/brave_sync_service_impl.cc | 6 +- .../sync/service/brave_sync_service_impl.h | 3 +- components/sync_ui_strings.grdp | 3 + components/text_recognition/browser/BUILD.gn | 2 - components/translate_strings.grdp | 3 + extensions/BUILD.gn | 6 + ios/BUILD.gn | 5 +- ios/app/BUILD.gn | 1 - ios/browser/BUILD.gn | 2 - ios/browser/api/ads/BUILD.gn | 5 +- ios/browser/api/bookmarks/BUILD.gn | 2 - .../api/bookmarks/brave_bookmarks_api.mm | 13 +- ios/browser/api/bookmarks/exporter/BUILD.gn | 2 - .../exporter/brave_bookmarks_exporter.mm | 16 +- ios/browser/api/bookmarks/importer/BUILD.gn | 2 - ios/browser/api/brave_rewards/BUILD.gn | 5 +- .../api/brave_rewards/brave_rewards_api.mm | 4 +- ios/browser/api/brave_shields/BUILD.gn | 1 - ios/browser/api/brave_stats/BUILD.gn | 1 - ios/browser/api/brave_wallet/BUILD.gn | 5 +- ios/browser/api/certificate/BUILD.gn | 2 - ios/browser/api/certificate/models/BUILD.gn | 2 - ios/browser/api/certificate/utils/BUILD.gn | 2 - ios/browser/api/common/BUILD.gn | 2 - ios/browser/api/favicon/BUILD.gn | 2 - ios/browser/api/history/BUILD.gn | 2 - ios/browser/api/history/brave_history_api.mm | 3 +- ios/browser/api/ipfs/BUILD.gn | 1 - ios/browser/api/net/BUILD.gn | 2 - .../api/ntp_background_images/BUILD.gn | 1 - ios/browser/api/opentabs/BUILD.gn | 2 - ios/browser/api/p3a/BUILD.gn | 1 - ios/browser/api/password/BUILD.gn | 2 - ios/browser/api/qr_code/BUILD.gn | 2 - ios/browser/api/query_filter/BUILD.gn | 2 - ios/browser/api/session_restore/BUILD.gn | 2 - ios/browser/api/sync/BUILD.gn | 2 - ios/browser/api/sync/driver/BUILD.gn | 2 - ios/browser/api/url/BUILD.gn | 3 - ios/browser/api/url/url_spoof_checker.h | 4 +- ios/browser/api/url/url_spoof_checker.mm | 2 +- ios/browser/api/version_info/BUILD.gn | 1 - ios/browser/api/web/BUILD.gn | 2 - ios/browser/api/web/web_state/BUILD.gn | 2 - .../api/web/web_state/web_state_native.h | 2 - .../api/web/web_state/web_state_native.mm | 168 +- ios/browser/api/web_image/BUILD.gn | 2 - ios/browser/brave_wallet/BUILD.gn | 1 - ios/browser/favicon/BUILD.gn | 2 - ios/browser/keyed_service/BUILD.gn | 1 - ios/browser/providers/BUILD.gn | 3 +- ios/browser/providers/lottie/BUILD.gn | 1 - .../qrcode_generator_service.cc | 13 +- ios/browser/skus/BUILD.gn | 1 - ios/browser/svg/BUILD.gn | 2 - ios/testing/BUILD.gn | 1 - package.json | 2 +- patches/base-BUILD.gn.patch | 4 +- ...base-threading-thread_restrictions.h.patch | 2 +- ...ase-trace_event-builtin_categories.h.patch | 4 +- ...ld-android-gradle-generate_gradle.py.patch | 4 +- patches/build-android-gyp-dex.py.patch | 2 +- patches/build-android-gyp-proguard.py.patch | 4 +- patches/build-config-BUILDCONFIG.gn.patch | 2 +- patches/build-config-android-BUILD.gn.patch | 2 +- patches/build-config-android-config.gni.patch | 4 +- ...ld-config-android-internal_rules.gni.patch | 4 +- patches/build-config-android-rules.gni.patch | 6 +- patches/build-config-compiler-BUILD.gn.patch | 13 - patches/build-rust-BUILD.gn.patch | 23 - patches/build-rust-cargo_crate.gni.patch | 2 +- patches/build-rust-run_build_script.py.patch | 20 - patches/build-rust-rust_target.gni.patch | 13 + patches/build-rust-std-BUILD.gn.patch | 14 - ...build-util-android_chrome_version.py.patch | 22 +- patches/chrome-BUILD.gn.patch | 28 +- patches/chrome-VERSION.patch | 8 +- patches/chrome-android-BUILD.gn.patch | 22 +- ...rome-android-chrome_java_sources.gni.patch | 4 +- ...e-android-chrome_public_apk_tmpl.gni.patch | 10 +- ...ome-android-features-tab_ui-BUILD.gn.patch | 12 + ...ome-android-java-AndroidManifest.xml.patch | 14 +- ...ntextmenu-ChromeContextMenuItem.java.patch | 10 +- ...menu-ChromeContextMenuPopulator.java.patch | 8 +- ...ions-NotificationPlatformBridge.java.patch | 6 +- ...rivacy-settings-PrivacySettings.java.patch | 6 +- ...ync-settings-ManageSyncSettings.java.patch | 6 +- ...ed_mode-TabbedRootUiCoordinator.java.patch | 4 +- patches/chrome-app-BUILD.gn.patch | 2 +- patches/chrome-browser-BUILD.gn.patch | 6 +- patches/chrome-browser-about_flags.cc.patch | 4 +- ...chrome-browser-app_controller_mac.mm.patch | 6 +- ...hrome-browser-browser_process_impl.h.patch | 4 +- ...ome_browsing_data_remover_delegate.h.patch | 12 +- ...pecific_content_settings_delegate.cc.patch | 4 +- ...wnload-download_target_determiner.cc.patch | 2 +- ...r-download-internal-android-BUILD.gn.patch | 12 + .../chrome-browser-extensions-BUILD.gn.patch | 4 +- ..._private-extension_info_generator.cc.patch | 8 +- ...-identity_get_auth_token_function.cc.patch | 6 +- ...ser-extensions-extension_tab_util.cc.patch | 12 +- ...rotocol-external_protocol_handler.cc.patch | 14 +- patches/chrome-browser-flags-BUILD.gn.patch | 4 +- ...ser-global_keyboard_shortcuts_mac.mm.patch | 4 +- .../chrome-browser-incognito-BUILD.gn.patch | 4 +- ...t-profile_network_context_service.cc.patch | 4 +- ...-browser-net-proxy_config_monitor.cc.patch | 4 +- ...et-system_network_context_manager.cc.patch | 4 +- ...hrome-browser-notifications-BUILD.gn.patch | 2 +- .../chrome-browser-preferences-BUILD.gn.patch | 2 +- ...hrome-browser-prefs-browser_prefs.cc.patch | 12 +- ...ext_menu-render_view_context_menu.cc.patch | 4 +- ...text_menu-render_view_context_menu.h.patch | 4 +- ...ser-resources-downloads-downloads.ts.patch | 5 +- ...-resources-extensions-item_list.html.patch | 4 +- ...er-resources-extensions-item_list.ts.patch | 2 +- ...er-resources-extensions-sidebar.html.patch | 12 +- ...browser-resources-history-history.ts.patch | 5 +- ...-resources-password_manager-BUILD.gn.patch | 10 + ...password_manager-password_manager.ts.patch | 12 + ...es-password_manager-shared_style.css.patch | 12 + ...-browser-resources-settings-BUILD.gn.patch | 4 +- ...ettings-people_page-sync_controls.ts.patch | 2 +- ...vacy_page-personalization_options.ts.patch | 2 +- ...tings-privacy_page-privacy_page.html.patch | 6 +- ...ettings-privacy_page-privacy_page.ts.patch | 2 +- ...-browser-resources-settings-route.ts.patch | 4 +- ...browser-resources-settings-router.ts.patch | 4 +- ...owser-resources-settings-settings.ts.patch | 2 +- ...-settings-site_settings-constants.ts.patch | 4 +- ..._settings_page-site_settings_page.ts.patch | 2 +- ...ization-profile_customization_app.ts.patch | 4 +- ...low-local_profile_customization.html.patch | 12 - ...e_picker-profile_picker_main_view.ts.patch | 6 +- ...heck_client_download_request_base.cc.patch | 4 +- ...-account_consistency_mode_manager.cc.patch | 2 +- ...browser-sync-sync_service_factory.cc.patch | 4 +- ...wser-themes-theme_service_factory.cc.patch | 4 +- patches/chrome-browser-ui-BUILD.gn.patch | 6 +- ...ui-android-appmenu-internal-BUILD.gn.patch | 2 +- ...rome-browser-ui-appmenu-AppMenu.java.patch | 2 +- ...-browser-ui-android-toolbar-BUILD.gn.patch | 2 +- ...rowser-toolbar-top-ToolbarPhone.java.patch | 12 +- ...owser-toolbar-top-ToolbarTablet.java.patch | 2 +- patches/chrome-browser-ui-browser.cc.patch | 6 +- ...rome-browser-ui-browser_navigator.cc.patch | 4 +- ...hrome-browser-ui-browser_ui_prefs.cc.patch | 2 +- .../chrome-browser-ui-chrome_pages.cc.patch | 4 +- ...rowser-ui-cocoa-main_menu_builder.mm.patch | 6 +- .../chrome-browser-ui-color-BUILD.gn.patch | 4 +- ...ions-icon_with_badge_image_source.cc.patch | 6 +- ...rtup-startup_browser_creator_impl.cc.patch | 4 +- .../chrome-browser-ui-tab_helpers.cc.patch | 4 +- ...me-browser-ui-tabs-tab_strip_model.h.patch | 4 +- ...oolbar-recent_tabs_sub_menu_model.cc.patch | 15 +- ...toolbar-recent_tabs_sub_menu_model.h.patch | 12 - ...cent_tabs_sub_menu_model_unittest.cc.patch | 4 +- ...views-bookmarks-bookmark_bar_view.cc.patch | 4 +- ...ws-bookmarks-bookmark_bubble_view.cc.patch | 4 +- ...ws-location_bar-location_bar_view.cc.patch | 8 +- ...ews-location_bar-location_bar_view.h.patch | 2 +- ...s-location_bar-location_icon_view.cc.patch | 4 +- ...-omnibox-omnibox_popup_view_views.cc.patch | 13 - ...verlay-video_overlay_window_views.cc.patch | 4 +- ...ews-page_info-page_info_main_view.cc.patch | 4 +- ...-page_info-page_info_view_factory.cc.patch | 4 +- ...side_panel-side_panel_coordinator.cc.patch | 6 +- ...owser-ui-views-tabs-new_tab_button.h.patch | 4 +- .../chrome-browser-ui-views-tabs-tab.cc.patch | 6 +- ...ser-ui-views-tabs-tab_group_views.cc.patch | 4 +- ...ws-tabs-tab_hover_card_bubble_view.h.patch | 4 +- ...e-browser-ui-views-tabs-tab_strip.cc.patch | 8 +- ...ser-ui-views-tabs-tab_style_views.cc.patch | 40 +- ...ser-ui-views-toolbar-toolbar_view.cc.patch | 4 +- ...-chrome_web_ui_controller_factory.cc.patch | 4 +- ...r-ui-webui-downloads-downloads_ui.cc.patch | 4 +- ...ui-webui-extensions-extensions_ui.cc.patch | 4 +- ...-ui-webui-settings-people_handler.cc.patch | 8 +- ...ttings_localized_strings_provider.cc.patch | 4 +- ...bui-settings-site_settings_helper.cc.patch | 10 +- ..._integration-web_app_shortcut_mac.mm.patch | 4 +- patches/chrome-common-BUILD.gn.patch | 8 +- ...extensions-api-developer_private.idl.patch | 2 +- patches/chrome-installer-mac-BUILD.gn.patch | 2 +- ...rome-installer-mac-signing-config.py.patch | 4 +- ...hrome-installer-mac-signing-model.py.patch | 4 +- ...me-installer-mac-signing-pipeline.py.patch | 2 +- .../chrome-installer-util-shell_util.cc.patch | 10 +- patches/chrome-renderer-BUILD.gn.patch | 2 +- ...er-chrome_content_renderer_client.cc.patch | 6 +- patches/chrome-test-BUILD.gn.patch | 4 +- ...me-test-data-webui-settings-BUILD.gn.patch | 4 +- .../chrome-test-include_js_tests.gni.patch | 16 +- ...-build-mac-infoplist_strings_util.cc.patch | 2 +- patches/chrome-utility-BUILD.gn.patch | 2 +- ...s-bookmarks-browser-bookmark_model.h.patch | 2 +- ...browser_ui-settings-android-BUILD.gn.patch | 2 +- ...settings-SingleCategorySettings.java.patch | 4 +- ...e_settings-SiteSettingsCategory.java.patch | 16 +- ...t-android-java-res-values-dimens.xml.patch | 2 +- ...er-page_specific_content_settings.cc.patch | 6 +- ...ntent_settings-core-browser-BUILD.gn.patch | 4 +- ...content_settings_default_provider.cc.patch | 10 +- ...-content_settings_policy_provider.cc.patch | 4 +- ...ore-browser-content_settings_pref.cc.patch | 4 +- ...ser-content_settings_pref_provider.h.patch | 4 +- ...browser-content_settings_registry.cc.patch | 4 +- ...browser-content_settings_uma_util.cc.patch | 4 +- ...re-browser-content_settings_utils.cc.patch | 12 + ...ings-core-browser-cookie_settings.cc.patch | 12 - ...core-common-content_settings_types.h.patch | 8 +- ...-core-common-cookie_settings_base.cc.patch | 12 + ...s-core-common-cookie_settings_base.h.patch | 8 +- ...nts-crash-core-app-breakpad_linux.cc.patch | 4 +- ...sh-core-app-crash_reporter_client.cc.patch | 10 +- ...embedder_support-user_agent_utils.cc.patch | 2 +- ...nts-favicon-core-favicon_database.cc.patch | 2 +- ...onents-history-core-browser-BUILD.gn.patch | 8 +- ...history-core-browser-history_types.h.patch | 2 +- ...nc-typed_url_sync_bridge_unittest.cc.patch | 6 +- ...nts-infobars-core-infobar_delegate.h.patch | 10 +- patches/components-metrics-BUILD.gn.patch | 4 +- .../components-omnibox-browser-BUILD.gn.patch | 4 +- ...x-browser-autocomplete_controller.cc.patch | 6 +- ...mnibox-browser-omnibox_edit_model.cc.patch | 6 +- .../components-os_crypt-sync-BUILD.gn.patch | 4 +- ..._crypt-sync-keychain_password_mac.mm.patch | 4 +- patches/components-page_info-BUILD.gn.patch | 2 +- .../components-page_info-page_info.cc.patch | 4 +- ...nager-core-browser-login_database.cc.patch | 4 +- ...ore-browser-password_form_filling.cc.patch | 4 +- patches/components-permissions-BUILD.gn.patch | 4 +- ...ponents-permissions-android-BUILD.gn.patch | 2 +- ...ts-permissions-permission_manager.cc.patch | 6 +- ...s-permissions-permission_uma_util.cc.patch | 4 +- ...mponents-permissions-request_type.cc.patch | 4 +- ...licy-tools-generate_policy_source.py.patch | 6 +- ...ser-safe_browsing_network_context.cc.patch | 4 +- ...wser-db-v4_local_database_manager.cc.patch | 13 - ...g-core-common-safe_browsing_prefs.cc.patch | 4 +- .../components-search_engines-BUILD.gn.patch | 4 +- ...n-internal-identity_manager-BUILD.gn.patch | 4 +- patches/components-sync-BUILD.gn.patch | 4 +- ...ents-sync-engine-model_type_worker.h.patch | 2 +- ...nts-sync-engine-syncer_proto_util.cc.patch | 2 +- ...protocol-device_info_specifics.proto.patch | 2 +- ...nents-sync-protocol-proto_visitors.h.patch | 6 +- ...s-sync-protocol-protocol_sources.gni.patch | 4 +- .../components-sync-service-BUILD.gn.patch | 4 +- ...nts-sync-service-sync_service_impl.h.patch | 4 +- ...components-sync_device_info-BUILD.gn.patch | 4 +- ...nents-sync_device_info-device_info.h.patch | 4 +- ...vice_info-device_info_sync_bridge.cc.patch | 12 +- ...enderer-per_frame_translate_agent.cc.patch | 13 - ...-content-renderer-translate_agent.cc.patch | 2 +- ...-variations-variations_seed_store.cc.patch | 2 +- .../content-browser-browser_main_loop.h.patch | 4 +- ...orage-dom_storage_context_wrapper.cc.patch | 2 +- ...tent-browser-gpu-gpu_internals_ui.cc.patch | 4 +- ...r_host-navigation_controller_impl.cc.patch | 4 +- ...-renderer_host-navigation_request.cc.patch | 6 +- ...derer_host-render_frame_host_impl.cc.patch | 4 +- ...t-browser-resources-gpu-info_view.ts.patch | 2 +- ...er-web_contents-web_contents_impl.cc.patch | 4 +- ...ygote_host-zygote_host_impl_linux.cc.patch | 2 +- patches/content-common-BUILD.gn.patch | 2 +- patches/content-common-frame.mojom.patch | 4 +- ...lic-browser-content_browser_client.h.patch | 4 +- ...ontent-renderer-render_frame_impl.cc.patch | 4 +- ...ntent-renderer-render_thread_impl.cc.patch | 4 +- .../crypto-unexportable_key_metrics.cc.patch | 2 +- ...xtension_web_request_event_router.cc.patch | 12 + ...r-api-web_request-web_request_api.cc.patch | 14 - ...ensions-browser-extension_creator.cc.patch | 4 +- ...nsions-common-api-_api_features.json.patch | 4 +- patches/ios-chrome-app-BUILD.gn.patch | 4 +- patches/ios-chrome-browser-net-BUILD.gn.patch | 4 +- ...er-net-ios_chrome_network_delegate.h.patch | 4 +- ...-shared-model-prefs-browser_prefs.mm.patch | 26 +- ...browser-sync-sync_service_factory.mm.patch | 4 +- patches/net-BUILD.gn.patch | 4 +- patches/net-cookies-canonical_cookie.cc.patch | 4 +- ...nfigured_proxy_resolution_service.cc.patch | 4 +- .../sandbox-policy-win-sandbox_win.cc.patch | 4 +- patches/sandbox-win-BUILD.gn.patch | 4 +- .../services-network-cookie_manager.cc.patch | 4 +- .../services-network-cookie_settings.cc.patch | 12 - ...ices-network-cors-cors_url_loader.cc.patch | 4 +- ...services-network-public-cpp-BUILD.gn.patch | 4 +- ...ices-network-public-cpp-cors-cors.cc.patch | 4 +- ...-common-client_hints-client_hints.cc.patch | 4 +- ...rty-blink-renderer-bindings-BUILD.gn.patch | 2 +- ...bindings-core-v8-v8_script_runner.cc.patch | 6 +- ...er-bindings-generated_in_modules.gni.patch | 4 +- ...renderer-bindings-idl_in_modules.gni.patch | 12 +- ...ndings-scripts-bind_gen-interface.py.patch | 4 +- ...dings-scripts-bind_gen-task_queue.py.patch | 6 +- ...scripts-web_idl-composition_parts.py.patch | 2 +- ...d_party-blink-renderer-core-BUILD.gn.patch | 4 +- ...erer-core-dom-events-event_target.cc.patch | 14 +- ...ink-renderer-core-frame-dom_window.h.patch | 4 +- ...-canvas-canvas_async_blob_creator.cc.patch | 4 +- ...e-html-canvas-html_canvas_element.cc.patch | 4 +- ...core-loader-mixed_content_checker.cc.patch | 2 +- ...modulescript-module_script_loader.cc.patch | 2 +- ...r-modulescript-module_tree_linker.cc.patch | 4 +- ...cy-permissions_policy_features.json5.patch | 4 +- ...re-script-dynamic_module_resolver.cc.patch | 2 +- ...enderer-core-script-script_loader.cc.patch | 2 +- ...arty-blink-renderer-modules-BUILD.gn.patch | 2 +- ...anvas2d-base_rendering_context_2d.cc.patch | 6 +- ...vas2d-canvas_rendering_context_2d.cc.patch | 4 +- ...as2d-canvas_rendering_context_2d.idl.patch | 6 +- ...reen_canvas_rendering_context_2d.idl.patch | 2 +- ...paint-paint_rendering_context_2d.idl.patch | 2 +- ...r_request_media_key_system_access.cc.patch | 6 +- ...modules-mediastream-media_devices.cc.patch | 8 +- ...bgl-webgl2_rendering_context_base.cc.patch | 8 +- ...ebgl-webgl_rendering_context_base.cc.patch | 44 +- ...rty-blink-renderer-platform-BUILD.gn.patch | 4 +- ...platform-fonts-font_fallback_list.cc.patch | 2 +- .../third_party-rust-itoa-v0_4-BUILD.gn.patch | 4 +- .../third_party-rust-rand-v0_8-BUILD.gn.patch | 4 +- .../third_party-rust-serde-v1-BUILD.gn.patch | 4 +- .../third_party-rust-syn-v1-BUILD.gn.patch | 4 +- ...hird_party-rust-winapi-v0_3-BUILD.gn.patch | 4 +- ...n-py_utils-py_utils-cloud_storage.py.patch | 2 +- ...plication-ApplicationPanelSidebar.ts.patch | 4 +- ...ools-clang-pylib-clang-compile_db.py.patch | 4 +- ...tools-gritsettings-resource_ids.spec.patch | 16 +- patches/tools-licenses-licenses.py.patch | 18 +- ...metadata-histogram_suffixes_list.xml.patch | 4 +- patches/tools-symsrc-source_index.py.patch | 4 +- ...y-platform-ax_platform_node_cocoa.mm.patch | 4 +- .../ui-native_theme-native_theme_win.cc.patch | 4 +- .../ui-native_theme-native_theme_win.h.patch | 2 +- ...iews-controls-menu-menu_separator.cc.patch | 14 +- patches/ui-webui-resources-BUILD.gn.patch | 4 +- ...dio_button-cr_radio_button_style.css.patch | 2 +- ...urces-cr_elements-cr_shared_vars.css.patch | 2 +- patches/v8/BUILD.gn.patch | 6 +- patches/v8/src-codegen-compiler.cc.patch | 4 +- resources/resource_ids.spec | 194 +-- .../win/src/module_file_name_interception.cc | 2 +- script/brave_license_helper.py | 22 +- test/BUILD.gn | 5 - test/filters/browser_tests-linux.filter | 7 + test/filters/browser_tests-windows.filter | 4 +- test/filters/browser_tests.filter | 136 +- test/filters/unit_tests-linux.filter | 4 + test/filters/unit_tests.filter | 72 +- third_party/android_deps/BUILD.gn | 2 +- .../com_google_android_play_core.info | 4 +- .../core/brave_page_graph/page_graph.cc | 3 +- .../core/brave_page_graph/page_graph.h | 3 +- third_party/rust/adblock/v0_7/BUILD.gn | 35 +- third_party/rust/addchain/v0_2/BUILD.gn | 11 +- third_party/rust/adler/v1/BUILD.gn | 11 +- third_party/rust/adss_rs/v0_2/BUILD.gn | 6 +- third_party/rust/ahash/v0_7/BUILD.gn | 21 +- .../android_system_properties/v0_1/BUILD.gn | 9 +- third_party/rust/ansi_term/v0_12/BUILD.gn | 16 +- third_party/rust/arrayref/v0_3/BUILD.gn | 8 +- third_party/rust/arrayvec/v0_7/BUILD.gn | 18 +- third_party/rust/async_trait/v0_1/BUILD.gn | 29 +- third_party/rust/base_x/v0_2/BUILD.gn | 13 +- third_party/rust/bigdecimal/v0_1/BUILD.gn | 8 +- third_party/rust/bincode/v1/BUILD.gn | 21 +- third_party/rust/bitvec/v1/BUILD.gn | 242 ++- third_party/rust/blake2b_simd/v1/BUILD.gn | 12 +- third_party/rust/block_buffer/v0_10/BUILD.gn | 10 +- third_party/rust/block_buffer/v0_9/BUILD.gn | 3 +- third_party/rust/bls12_381/v0_7/BUILD.gn | 28 +- .../rust/bls_signatures/v0_12/BUILD.gn | 12 +- third_party/rust/byteorder/v1/BUILD.gn | 14 +- third_party/rust/bytes/v0_4/BUILD.gn | 34 +- third_party/rust/cbor4ii/v0_2/BUILD.gn | 20 +- .../challenge_bypass_ristretto/v1/BUILD.gn | 16 +- third_party/rust/chrono/v0_4/BUILD.gn | 52 +- third_party/rust/cid/v0_8/BUILD.gn | 12 +- .../rust/constant_time_eq/v0_2/BUILD.gn | 6 +- third_party/rust/convert_case/v0_4/BUILD.gn | 7 +- third_party/rust/core2/v0_4/BUILD.gn | 14 +- .../rust/core_foundation_sys/v0_8/BUILD.gn | 26 +- third_party/rust/cpufeatures/v0_2/BUILD.gn | 13 +- third_party/rust/crc32fast/v1/BUILD.gn | 13 +- third_party/rust/crunchy/v0_2/BUILD.gn | 6 +- third_party/rust/crypto_common/v0_1/BUILD.gn | 6 +- third_party/rust/crypto_mac/v0_10/BUILD.gn | 10 +- third_party/rust/crypto_mac/v0_11/BUILD.gn | 10 +- third_party/rust/crypto_mac/v0_8/BUILD.gn | 10 +- third_party/rust/cssparser/v0_27/BUILD.gn | 24 +- third_party/rust/cssparser/v0_28/BUILD.gn | 24 +- .../rust/cssparser_macros/v0_6/BUILD.gn | 3 +- third_party/rust/curve25519_dalek/v3/BUILD.gn | 60 +- third_party/rust/data_encoding/v2/BUILD.gn | 3 +- .../rust/data_encoding_macro/v0_1/BUILD.gn | 5 +- .../v0_1/BUILD.gn | 3 +- .../rust/derivation_path/v0_2/BUILD.gn | 3 +- third_party/rust/derive_more/v0_99/BUILD.gn | 70 +- third_party/rust/digest/v0_10/BUILD.gn | 21 +- third_party/rust/digest/v0_9/BUILD.gn | 15 +- third_party/rust/dtoa/v0_4/BUILD.gn | 9 +- third_party/rust/dtoa_short/v0_3/BUILD.gn | 3 +- third_party/rust/ed25519/v1/BUILD.gn | 13 +- third_party/rust/ed25519_dalek/v1/BUILD.gn | 14 +- .../rust/ed25519_dalek_bip32/v0_2/BUILD.gn | 5 +- third_party/rust/either/v1/BUILD.gn | 7 +- third_party/rust/encoding_rs/v0_8/BUILD.gn | 29 +- third_party/rust/feed_rs/v1/BUILD.gn | 25 +- third_party/rust/ff/v0_12/BUILD.gn | 10 +- third_party/rust/ff/v0_13/BUILD.gn | 11 +- third_party/rust/ff_derive/v0_13/BUILD.gn | 8 +- third_party/rust/fnv/v1/BUILD.gn | 3 +- third_party/rust/forest_bigint/v0_1/BUILD.gn | 7 +- third_party/rust/form_urlencoded/v1/BUILD.gn | 3 +- third_party/rust/funty/v2/BUILD.gn | 3 +- third_party/rust/futf/v0_1/BUILD.gn | 6 +- third_party/rust/futures/v0_3/BUILD.gn | 64 +- .../rust/futures_channel/v0_3/BUILD.gn | 20 +- third_party/rust/futures_core/v0_3/BUILD.gn | 15 +- .../rust/futures_executor/v0_3/BUILD.gn | 11 +- third_party/rust/futures_io/v0_3/BUILD.gn | 3 +- third_party/rust/futures_macro/v0_3/BUILD.gn | 9 +- third_party/rust/futures_retry/v0_5/BUILD.gn | 12 +- third_party/rust/futures_sink/v0_3/BUILD.gn | 3 +- third_party/rust/futures_task/v0_3/BUILD.gn | 15 +- third_party/rust/futures_timer/v3/BUILD.gn | 16 +- third_party/rust/futures_util/v0_3/BUILD.gn | 189 ++- .../rust/fvm_ipld_blockstore/v0_1/BUILD.gn | 9 +- .../rust/fvm_ipld_encoding/v0_3/BUILD.gn | 13 +- third_party/rust/fvm_shared/v3/BUILD.gn | 45 +- third_party/rust/fxhash/v0_2/BUILD.gn | 6 +- third_party/rust/generic_array/v0_14/BUILD.gn | 17 +- third_party/rust/getrandom/v0_1/BUILD.gn | 32 +- third_party/rust/group/v0_12/BUILD.gn | 12 +- third_party/rust/hashbrown/v0_12/BUILD.gn | 32 +- third_party/rust/hkdf/v0_11/BUILD.gn | 13 +- third_party/rust/hmac/v0_10/BUILD.gn | 9 +- third_party/rust/hmac/v0_11/BUILD.gn | 9 +- third_party/rust/hmac/v0_12/BUILD.gn | 11 +- third_party/rust/hmac/v0_8/BUILD.gn | 9 +- third_party/rust/hmac_drbg/v0_3/BUILD.gn | 6 +- third_party/rust/html5ever/v0_25/BUILD.gn | 31 +- third_party/rust/http/v0_1/BUILD.gn | 37 +- third_party/rust/iana_time_zone/v0_1/BUILD.gn | 21 +- third_party/rust/idna/v0_2/BUILD.gn | 13 +- third_party/rust/idna/v0_3/BUILD.gn | 13 +- third_party/rust/iovec/v0_1/BUILD.gn | 14 +- third_party/rust/itertools/v0_10/BUILD.gn | 76 +- third_party/rust/keccak/v0_1/BUILD.gn | 11 +- third_party/rust/kuchiki/v0_8/BUILD.gn | 16 +- third_party/rust/lazycell/v1/BUILD.gn | 9 +- third_party/rust/libsecp256k1/v0_7/BUILD.gn | 15 +- .../rust/libsecp256k1_core/v0_3/BUILD.gn | 13 +- .../libsecp256k1_gen_ecmult/v0_3/BUILD.gn | 5 +- .../libsecp256k1_gen_genmult/v0_3/BUILD.gn | 5 +- third_party/rust/lifeguard/v0_6/BUILD.gn | 7 +- .../v0_4/0001-remove-autocfg-probe.diff | 22 + third_party/rust/lock_api/v0_4/BUILD.gn | 13 +- third_party/rust/lock_api/v0_4/crate/build.rs | 1 + third_party/rust/lol_html/v0_3/BUILD.gn | 100 +- third_party/rust/mac/v0_1/BUILD.gn | 12 +- third_party/rust/markup5ever/v0_10/BUILD.gn | 18 +- third_party/rust/matches/v0_1/BUILD.gn | 7 +- third_party/rust/mime/v0_3/BUILD.gn | 12 +- third_party/rust/miniz_oxide/v0_6/BUILD.gn | 19 +- third_party/rust/multibase/v0_9/BUILD.gn | 11 +- third_party/rust/multihash/v0_16/BUILD.gn | 15 +- .../rust/multihash_derive/v0_8/BUILD.gn | 7 +- .../rust/new_debug_unreachable/v1/BUILD.gn | 8 +- third_party/rust/nodrop/v0_1/BUILD.gn | 3 +- third_party/rust/num_bigint/v0_2/BUILD.gn | 37 +- .../rust/num_bigint/v0_2/crate/build.rs | 1 + .../patches/0001-remove-autocfg-probe.diff | 24 + third_party/rust/num_bigint/v0_3/BUILD.gn | 61 +- .../rust/num_bigint/v0_3/crate/build.rs | 2 + .../patches/0001-remove-autocfg-probe.diff | 32 + third_party/rust/num_bigint/v0_4/BUILD.gn | 61 +- .../rust/num_bigint/v0_4/crate/build.rs | 2 + .../patches/0001-remove-autocfg-probe.diff | 32 + third_party/rust/num_derive/v0_3/BUILD.gn | 18 +- third_party/rust/num_integer/v0_1/BUILD.gn | 16 +- third_party/rust/num_traits/v0_2/BUILD.gn | 43 +- .../rust/num_traits/v0_2/crate/build.rs | 1 + .../patches/0001-remove-autocfg-probe.diff | 24 + third_party/rust/opaque_debug/v0_3/BUILD.gn | 6 +- third_party/rust/pairing/v0_22/BUILD.gn | 6 +- third_party/rust/parking_lot/v0_12/BUILD.gn | 21 +- .../rust/parking_lot_core/v0_9/BUILD.gn | 23 +- third_party/rust/paste/v1/BUILD.gn | 28 +- third_party/rust/percent_encoding/v2/BUILD.gn | 3 +- third_party/rust/phf/v0_8/BUILD.gn | 7 +- third_party/rust/phf_codegen/v0_8/BUILD.gn | 3 +- third_party/rust/phf_generator/v0_10/BUILD.gn | 14 +- third_party/rust/phf_generator/v0_8/BUILD.gn | 14 +- third_party/rust/phf_macros/v0_8/BUILD.gn | 10 +- third_party/rust/phf_shared/v0_10/BUILD.gn | 3 +- third_party/rust/phf_shared/v0_8/BUILD.gn | 3 +- third_party/rust/pin_project/v0_4/BUILD.gn | 94 +- .../rust/pin_project_internal/v0_4/BUILD.gn | 12 +- .../rust/pin_project_lite/v0_2/BUILD.gn | 60 +- third_party/rust/pin_utils/v0_1/BUILD.gn | 9 +- third_party/rust/ppoprf/v0_2/BUILD.gn | 13 +- .../rust/precomputed_hash/v0_1/BUILD.gn | 4 +- third_party/rust/proc_macro_crate/v1/BUILD.gn | 3 +- third_party/rust/proc_macro_error/v1/BUILD.gn | 33 +- .../rust/proc_macro_error_attr/v1/BUILD.gn | 8 +- .../rust/proc_macro_hack/v0_5/BUILD.gn | 15 +- third_party/rust/quick_xml/v0_27/BUILD.gn | 34 +- third_party/rust/radium/v0_7/BUILD.gn | 8 +- third_party/rust/rand/v0_7/BUILD.gn | 56 +- third_party/rust/rand_chacha/v0_2/BUILD.gn | 10 +- third_party/rust/rand_core/v0_5/BUILD.gn | 13 +- third_party/rust/rand_pcg/v0_2/BUILD.gn | 13 +- third_party/rust/ripemd/v0_1/BUILD.gn | 14 +- third_party/rust/rmp/v0_8/BUILD.gn | 52 +- third_party/rust/rmp_serde/v0_15/BUILD.gn | 14 +- third_party/rust/safemem/v0_3/BUILD.gn | 3 +- third_party/rust/scopeguard/v1/BUILD.gn | 6 +- third_party/rust/seahash/v3/BUILD.gn | 10 +- third_party/rust/selectors/v0_22/BUILD.gn | 16 +- third_party/rust/selectors/v0_23/BUILD.gn | 16 +- .../rust/serde_big_array/v0_3/BUILD.gn | 12 +- third_party/rust/serde_bytes/v0_11/BUILD.gn | 12 +- .../rust/serde_ipld_dagcbor/v0_2/BUILD.gn | 17 +- third_party/rust/serde_repr/v0_1/BUILD.gn | 13 +- third_party/rust/serde_tuple/v0_5/BUILD.gn | 6 +- .../rust/serde_tuple_macros/v0_5/BUILD.gn | 4 +- third_party/rust/servo_arc/v0_1/BUILD.gn | 3 +- third_party/rust/sha2/v0_10/BUILD.gn | 19 +- third_party/rust/sha2/v0_9/BUILD.gn | 21 +- third_party/rust/sha3/v0_10/BUILD.gn | 13 +- third_party/rust/sharded_slab/v0_1/BUILD.gn | 25 +- third_party/rust/sharks/v0_5/BUILD.gn | 14 +- third_party/rust/signature/v1/BUILD.gn | 15 +- third_party/rust/siphasher/v0_3/BUILD.gn | 9 +- third_party/rust/slab/v0_4/BUILD.gn | 13 +- third_party/rust/slab/v0_4/crate/build.rs | 1 + .../patches/0001-remove-autocfg-probe.diff | 22 + third_party/rust/smallvec/v1/BUILD.gn | 14 +- third_party/rust/sta_rs/v0_2/BUILD.gn | 11 +- .../rust/stable_deref_trait/v1/BUILD.gn | 4 +- .../rust/star_constellation/v0_2/BUILD.gn | 12 +- third_party/rust/string_cache/v0_8/BUILD.gn | 13 +- .../rust/string_cache_codegen/v0_5/BUILD.gn | 4 +- third_party/rust/strobe_rng/v0_2/BUILD.gn | 6 +- third_party/rust/strobe_rs/v0_8/BUILD.gn | 14 +- third_party/rust/subtle/v2/BUILD.gn | 10 +- third_party/rust/synstructure/v0_12/BUILD.gn | 6 +- third_party/rust/tap/v1/BUILD.gn | 8 +- third_party/rust/tendril/v0_4/BUILD.gn | 13 +- third_party/rust/thin_slice/v0_1/BUILD.gn | 3 +- third_party/rust/third_party.toml | 19 + third_party/rust/thiserror/v1/BUILD.gn | 43 +- third_party/rust/thiserror_impl/v1/BUILD.gn | 12 +- third_party/rust/thread_local/v1/BUILD.gn | 9 +- third_party/rust/time/v0_3/BUILD.gn | 72 +- third_party/rust/time_core/v0_1/BUILD.gn | 6 +- third_party/rust/time_macros/v0_2/BUILD.gn | 23 +- third_party/rust/tinyvec/v1/BUILD.gn | 23 +- third_party/rust/tinyvec_macros/v0_1/BUILD.gn | 7 +- third_party/rust/tracing/v0_1/BUILD.gn | 44 +- .../rust/tracing_attributes/v0_1/BUILD.gn | 23 +- third_party/rust/tracing_core/v0_1/BUILD.gn | 25 +- .../rust/tracing_subscriber/v0_2/BUILD.gn | 69 +- third_party/rust/typenum/v1/BUILD.gn | 27 +- third_party/rust/unicode_bidi/v0_3/BUILD.gn | 14 +- .../rust/unicode_normalization/v0_1/BUILD.gn | 19 +- third_party/rust/unicode_xid/v0_2/BUILD.gn | 9 +- .../rust/unsigned_varint/v0_7/BUILD.gn | 18 +- third_party/rust/url/v2/BUILD.gn | 14 +- third_party/rust/urlencoding/v1/BUILD.gn | 8 +- third_party/rust/utf_8/v0_7/BUILD.gn | 9 +- third_party/rust/uuid/v0_8/BUILD.gn | 32 +- third_party/rust/uuid/v1/BUILD.gn | 40 +- third_party/rust/version_check/v0_9/BUILD.gn | 8 +- third_party/rust/windows/v0_46/BUILD.gn | 1359 ++++++++++++++++- .../rust/windows_i686_msvc/v0_42/BUILD.gn | 6 +- third_party/rust/windows_sys/v0_45/BUILD.gn | 276 +++- .../rust/windows_targets/v0_42/BUILD.gn | 4 +- .../rust/windows_x86_64_msvc/v0_42/BUILD.gn | 6 +- third_party/rust/wyz/v0_5/BUILD.gn | 11 +- third_party/rust/zeroize/v1/BUILD.gn | 11 +- third_party/rust/zeroize_derive/v1/BUILD.gn | 6 +- tools/android/checkstyle/brave-style-5.0.xml | 4 +- 897 files changed, 12205 insertions(+), 3183 deletions(-) create mode 100644 android/features/tab_ui/java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml create mode 100644 android/features/tab_ui/java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml create mode 100644 android/features/tab_ui/java/res/drawable/phone_tab_switcher_empty_state_illustration.xml create mode 100644 android/features/tab_ui/java/res/drawable/tablet_tab_switcher_empty_state_illustration.xml create mode 100644 android/java/res/drawable-night/bookmark_empty_state_illustration.xml create mode 100644 android/java/res/drawable-night/history_empty_state_illustration.xml create mode 100644 android/java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml create mode 100644 android/java/res/drawable-night/reading_list_empty_state_illustration.xml create mode 100644 android/java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml create mode 100644 android/java/res/drawable/bookmark_empty_state_illustration.xml create mode 100644 android/java/res/drawable/history_empty_state_illustration.xml create mode 100644 android/java/res/drawable/phone_recent_tab_empty_state_illustration.xml create mode 100644 android/java/res/drawable/reading_list_empty_state_illustration.xml create mode 100644 android/java/res/drawable/tablet_recent_tab_empty_state_illustration.xml delete mode 100644 android/javatests/org/chromium/chrome/browser/contextmenu/BraveContextMenuPopulatorTest.java create mode 100644 app/support_tool_strings.grdp create mode 100644 browser/download/internal/android/java/res/drawable-night/downloads_empty_state_illustration.xml create mode 100644 browser/download/internal/android/java/res/drawable/downloads_empty_state_illustration.xml create mode 100644 browser/resources/extensions/brave_overrides/side_bar.ts create mode 100644 browser/resources/password_manager/BUILD.gn create mode 100644 browser/resources/password_manager/brave_overrides/index.ts create mode 100644 browser/resources/password_manager/brave_overrides/side_bar.ts create mode 100644 browser/resources/password_manager/sources.gni create mode 100644 browser/tab_group/BUILD.gn create mode 100644 browser/tab_group/java/src/org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter.java create mode 100644 browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml create mode 100644 build/android/bytecode/java/org/brave/bytecode/BraveTabGroupModelFilterClassAdapter.java create mode 100644 chromium_src/chrome/browser/apps/intent_helper/intent_picker_features.cc delete mode 100644 chromium_src/chrome/browser/content_settings/content_settings_supervised_provider.h delete mode 100644 chromium_src/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc create mode 100644 chromium_src/chrome/browser/ui/test/test_browser_ui.cc create mode 100644 chromium_src/chrome/browser/ui/views/omnibox/omnibox_row_view.cc create mode 100644 chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.cc create mode 100644 chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h create mode 100644 chromium_src/chrome/browser/ui/webui/password_manager/password_manager_ui.cc create mode 100644 chromium_src/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc delete mode 100644 chromium_src/chrome/common/pref_names.cc delete mode 100644 chromium_src/components/network_session_configurator/browser/network_session_configurator.cc create mode 100644 chromium_src/components/omnibox/browser/omnibox_controller.cc delete mode 100644 chromium_src/components/omnibox/browser/omnibox_view.cc create mode 100644 chromium_src/components/supervised_user/core/browser/DEPS create mode 100644 chromium_src/components/supervised_user/core/browser/supervised_user_content_settings_provider.h create mode 100644 chromium_src/extensions/browser/api/web_request/extension_web_request_event_router.cc create mode 100644 chromium_src/ios/web/web_state/ui/crw_web_controller.h create mode 100644 chromium_src/ios/web/web_state/ui/crw_web_controller.mm delete mode 100644 chromium_src/ui/base/webui/web_ui_util.cc rename {browser/content_settings => components/content_settings/core/browser}/brave_global_value_map.cc (89%) rename {browser/content_settings => components/content_settings/core/browser}/brave_global_value_map.h (79%) create mode 100644 components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml delete mode 100644 patches/build-config-compiler-BUILD.gn.patch delete mode 100644 patches/build-rust-BUILD.gn.patch delete mode 100644 patches/build-rust-run_build_script.py.patch create mode 100644 patches/build-rust-rust_target.gni.patch delete mode 100644 patches/build-rust-std-BUILD.gn.patch create mode 100644 patches/chrome-android-features-tab_ui-BUILD.gn.patch create mode 100644 patches/chrome-browser-download-internal-android-BUILD.gn.patch create mode 100644 patches/chrome-browser-resources-password_manager-BUILD.gn.patch create mode 100644 patches/chrome-browser-resources-password_manager-password_manager.ts.patch create mode 100644 patches/chrome-browser-resources-password_manager-shared_style.css.patch delete mode 100644 patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch delete mode 100644 patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.h.patch delete mode 100644 patches/chrome-browser-ui-views-omnibox-omnibox_popup_view_views.cc.patch create mode 100644 patches/components-content_settings-core-browser-content_settings_utils.cc.patch delete mode 100644 patches/components-content_settings-core-browser-cookie_settings.cc.patch create mode 100644 patches/components-content_settings-core-common-cookie_settings_base.cc.patch delete mode 100644 patches/components-safe_browsing-core-browser-db-v4_local_database_manager.cc.patch delete mode 100644 patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch create mode 100644 patches/extensions-browser-api-web_request-extension_web_request_event_router.cc.patch delete mode 100644 patches/extensions-browser-api-web_request-web_request_api.cc.patch delete mode 100644 patches/services-network-cookie_settings.cc.patch create mode 100644 third_party/rust/lock_api/v0_4/0001-remove-autocfg-probe.diff create mode 100644 third_party/rust/num_bigint/v0_2/patches/0001-remove-autocfg-probe.diff create mode 100644 third_party/rust/num_bigint/v0_3/patches/0001-remove-autocfg-probe.diff create mode 100644 third_party/rust/num_bigint/v0_4/patches/0001-remove-autocfg-probe.diff create mode 100644 third_party/rust/num_traits/v0_2/patches/0001-remove-autocfg-probe.diff create mode 100644 third_party/rust/slab/v0_4/patches/0001-remove-autocfg-probe.diff diff --git a/.gitignore b/.gitignore index 767337da797c..b177f3776195 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ node_modules/ patches/**/*.patchinfo /third_party/android_deps/libs/com_google_android_play_core/core-1.10.0.aar +/third_party/android_deps/libs/com_google_android_play_core/core-1.10.3.aar /third_party/argon2/src /third_party/brave-vpn-wireguard-nt-dlls/ /third_party/brave-vpn-wireguard-tunnel-dlls/ diff --git a/DEPS b/DEPS index 72e745a06f60..2f354986e80e 100644 --- a/DEPS +++ b/DEPS @@ -28,7 +28,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core', - 'version': 'version:2@1.10.0.cr1', + 'version': 'version:2@1.10.3.cr1', }, ], 'condition': 'checkout_android', diff --git a/android/brave_java_resources.gni b/android/brave_java_resources.gni index 523acc82c619..b4ff9dba1f7c 100644 --- a/android/brave_java_resources.gni +++ b/android/brave_java_resources.gni @@ -151,7 +151,12 @@ brave_java_resources = [ "java/res/drawable-night-xhdpi/ic_cookie_background.png", "java/res/drawable-night-xxhdpi/ic_cookie_background.png", "java/res/drawable-night-xxxhdpi/ic_cookie_background.png", + "java/res/drawable-night/bookmark_empty_state_illustration.xml", + "java/res/drawable-night/history_empty_state_illustration.xml", + "java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml", + "java/res/drawable-night/reading_list_empty_state_illustration.xml", "java/res/drawable-night/sardine_logo.xml", + "java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml", "java/res/drawable-night/tipping_background_success.xml", "java/res/drawable-nodpi/dylan_malval_sea_min.webp", "java/res/drawable-nodpi/eth.png", @@ -1014,6 +1019,14 @@ brave_java_resources = [ brave_base_module_resources = [ "java/res_chromium_base/drawable-night/themed_app_icon.xml" ] +brave_download_internal_java_resources = + [ "java/res/drawable-night/downloads_empty_state_illustration.xml" ] + +brave_android_features_java_resources = [ + "java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml", + "java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml", +] + # XML preprocessing brave_java_preprocess_xml_sources = [ "//chrome/android/java/res/menu/main_menu.xml" ] diff --git a/android/features/tab_ui/BUILD.gn b/android/features/tab_ui/BUILD.gn index f72a728c277a..e968e7be00f6 100644 --- a/android/features/tab_ui/BUILD.gn +++ b/android/features/tab_ui/BUILD.gn @@ -16,6 +16,7 @@ android_library("java") { "//chrome/android:chrome_java", "//chrome/android/features/tab_ui:tab_suggestions_java", "//chrome/browser/android/lifecycle:java", + "//chrome/browser/browser_controls/android:java", "//chrome/browser/flags:java", "//chrome/browser/preferences:java", "//chrome/browser/tabmodel:java", diff --git a/android/features/tab_ui/java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml b/android/features/tab_ui/java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml new file mode 100644 index 000000000000..c7260b2eff79 --- /dev/null +++ b/android/features/tab_ui/java/res/drawable-night/phone_tab_switcher_empty_state_illustration.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + diff --git a/android/features/tab_ui/java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml b/android/features/tab_ui/java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml new file mode 100644 index 000000000000..192ab0bbe97d --- /dev/null +++ b/android/features/tab_ui/java/res/drawable-night/tablet_tab_switcher_empty_state_illustration.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/android/features/tab_ui/java/res/drawable/phone_tab_switcher_empty_state_illustration.xml b/android/features/tab_ui/java/res/drawable/phone_tab_switcher_empty_state_illustration.xml new file mode 100644 index 000000000000..5213e9e0a6d9 --- /dev/null +++ b/android/features/tab_ui/java/res/drawable/phone_tab_switcher_empty_state_illustration.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + diff --git a/android/features/tab_ui/java/res/drawable/tablet_tab_switcher_empty_state_illustration.xml b/android/features/tab_ui/java/res/drawable/tablet_tab_switcher_empty_state_illustration.xml new file mode 100644 index 000000000000..ab426316db55 --- /dev/null +++ b/android/features/tab_ui/java/res/drawable/tablet_tab_switcher_empty_state_illustration.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + diff --git a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java index 1d519b6aedd8..d5aa093c39a8 100644 --- a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java +++ b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java @@ -16,6 +16,7 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; +import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; @@ -40,6 +41,7 @@ public class BraveTabGroupUiCoordinator extends TabGroupUiCoordinator { private IncognitoStateObserver mIncognitoStateObserver; public BraveTabGroupUiCoordinator(@NonNull Activity activity, @NonNull ViewGroup parentView, + @NonNull BrowserControlsStateProvider browserControlsStateProvider, @NonNull IncognitoStateProvider incognitoStateProvider, @NonNull ScrimCoordinator scrimCoordinator, @NonNull ObservableSupplier omniboxFocusStateSupplier, @@ -52,11 +54,11 @@ public BraveTabGroupUiCoordinator(@NonNull Activity activity, @NonNull ViewGroup @NonNull TabCreatorManager tabCreatorManager, @NonNull OneshotSupplier layoutStateProviderSupplier, @NonNull SnackbarManager snackbarManager) { - super(activity, parentView, incognitoStateProvider, scrimCoordinator, - omniboxFocusStateSupplier, bottomSheetController, activityLifecycleDispatcher, - isWarmOnResumeSupplier, tabModelSelector, tabContentManager, rootView, - dynamicResourceLoaderSupplier, tabCreatorManager, layoutStateProviderSupplier, - snackbarManager); + super(activity, parentView, browserControlsStateProvider, incognitoStateProvider, + scrimCoordinator, omniboxFocusStateSupplier, bottomSheetController, + activityLifecycleDispatcher, isWarmOnResumeSupplier, tabModelSelector, + tabContentManager, rootView, dynamicResourceLoaderSupplier, tabCreatorManager, + layoutStateProviderSupplier, snackbarManager); mIncognitoStateProvider = incognitoStateProvider; diff --git a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiFeatureUtilities.java b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiFeatureUtilities.java index 4d423026e4d7..07ee29ad6b5d 100644 --- a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiFeatureUtilities.java +++ b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiFeatureUtilities.java @@ -5,28 +5,10 @@ package org.chromium.chrome.browser.tasks.tab_management; -import android.annotation.SuppressLint; -import android.content.Context; - import org.chromium.base.BravePreferenceKeys; -import org.chromium.chrome.browser.flags.CachedFeatureFlags; import org.chromium.chrome.browser.preferences.SharedPreferencesManager; public class BraveTabUiFeatureUtilities { - private static final String TAB_GROUP_AUTO_CREATION_PREFERENCE = - "Chrome.Flags.FieldTrialParamCached.TabGridLayoutAndroid:enable_tab_group_auto_creation"; - - @SuppressLint("VisibleForTests") - public static void maybeOverrideEnableTabGroupAutoCreationPreference(Context context) { - if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(context)) { - // Override it to make "Open in new tab" menu option in the context menu available if - // applicable. - SharedPreferencesManager.getInstance().writeBoolean( - TAB_GROUP_AUTO_CREATION_PREFERENCE, isBraveTabGroupsEnabled()); - CachedFeatureFlags.resetFlagsForTesting(); - } - } - public static boolean isBraveTabGroupsEnabled() { return SharedPreferencesManager.getInstance().readBoolean( BravePreferenceKeys.BRAVE_TAB_GROUPS_ENABLED, true); diff --git a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiThemeProvider.java b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiThemeProvider.java index 6194401d723b..8c1b9dd6c2a7 100644 --- a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiThemeProvider.java +++ b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabUiThemeProvider.java @@ -17,9 +17,20 @@ public class BraveTabUiThemeProvider { @ColorInt public static int getTitleTextColor(Context context, boolean isIncognito, boolean isSelected) { + // These checks are just making sure that these values are still used in Chromium to avoid + // lint issues. + assert R.color.empty_state_icon_bg_background_color > 0 + : "Something has changed in the upstream!"; + assert R.color.empty_state_icon_bg_foreground_color > 0 + : "Something has changed in the upstream!"; + assert R.color.empty_state_icon_color > 0 : "Something has changed in the upstream!"; + assert R.color.empty_state_icon_bg_color > 0 : "Something has changed in the upstream!"; + assert R.color.empty_state_icon_tabswitcher_bg_color > 0 + : "Something has changed in the upstream!"; + if (isSelected) { return ApiCompatibilityUtils.getColor( - context.getResources(), R.color.baseline_neutral_900); + context.getResources(), R.color.baseline_neutral_10); } return TabUiThemeProvider.getTitleTextColor(context, isIncognito, isSelected); @@ -28,7 +39,7 @@ public static int getTitleTextColor(Context context, boolean isIncognito, boolea public static ColorStateList getActionButtonTintList( Context context, boolean isIncognito, boolean isSelected) { if (isSelected) { - return AppCompatResources.getColorStateList(context, R.color.baseline_neutral_900); + return AppCompatResources.getColorStateList(context, R.color.baseline_neutral_10); } return TabUiThemeProvider.getActionButtonTintList(context, isIncognito, isSelected); diff --git a/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd b/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd index c5882e4473b3..69582fd7f808 100644 --- a/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd +++ b/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd @@ -375,6 +375,11 @@ View all + + + Your last tab + + Review @@ -537,13 +542,18 @@ Close all tabs? - You can find your closed tabs in Recent tabs under the Brave main menu + You can find your closed tabs in Recent tabs under the Brave main menu. + + + {INCOGNITO_TABS_COUNT, plural, + =1 {You can find your closed tabs in Recent tabs under the Brave main menu. Your Private tab won't be available.} + other {You can find your closed tabs in Recent tabs under the Brave main menu. Your # Private tabs won't be available.}} Close all Private tabs? - Your activity in these Private tabs will be cleared from this device + Your activity in these Private tabs will be removed from this device diff --git a/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_override.grd b/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_override.grd index 1a087b93e712..694034444aed 100644 --- a/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_override.grd +++ b/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_override.grd @@ -86,11 +86,16 @@ + + {INCOGNITO_TABS_COUNT, plural, + =1 {You can find your closed tabs in Recent tabs under the Brave main menu. Your Private tab won't be available.} + other {You can find your closed tabs in Recent tabs under the Brave main menu. Your # Private tabs won't be available.}} + Close all Private tabs? - Your activity in these Private tabs will be cleared from this device + Your activity in these Private tabs will be removed from this device diff --git a/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java b/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java index 0b1c994a4de5..97e9d8f7aed3 100644 --- a/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java +++ b/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java @@ -25,7 +25,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.toolbar.top.Toolbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -import org.chromium.chrome.browser.xsurface.FeedLaunchReliabilityLogger.SurfaceType; +import org.chromium.chrome.browser.xsurface.feed.FeedLaunchReliabilityLogger.SurfaceType; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.ui.UiUtils; import org.chromium.ui.base.WindowAndroid; diff --git a/android/java/apk_for_test.flags b/android/java/apk_for_test.flags index 8ee63927551a..4bf9e9001982 100644 --- a/android/java/apk_for_test.flags +++ b/android/java/apk_for_test.flags @@ -82,7 +82,6 @@ -keep class org.chromium.chrome.browser.sync.settings.ManageSyncSettings { *** mGoogleActivityControls; *** mSyncEncryption; - *** mSyncPaymentsIntegration; } -keep class org.chromium.chrome.browser.search_engines.settings.SearchEngineAdapter { @@ -804,3 +803,12 @@ -keep class org.chromium.chrome.browser.externalnav.BraveExternalNavigationHandler { public (...); } + +-keep class org.chromium.chrome.browser.tasks.tab_groups.TabGroupModelFilter { + *** mIsResetting; + public (...); +} + +-keep class org.chromium.chrome.browser.tasks.tab_groups.BraveTabGroupModelFilter { + public (...); +} diff --git a/android/java/org/chromium/chrome/browser/app/BraveActivity.java b/android/java/org/chromium/chrome/browser/app/BraveActivity.java index 390ae427780e..e4ffd3da93cc 100644 --- a/android/java/org/chromium/chrome/browser/app/BraveActivity.java +++ b/android/java/org/chromium/chrome/browser/app/BraveActivity.java @@ -159,7 +159,6 @@ import org.chromium.chrome.browser.tab.TabSelectionType; import org.chromium.chrome.browser.tabmodel.TabModel; import org.chromium.chrome.browser.tabmodel.TabModelUtils; -import org.chromium.chrome.browser.tasks.tab_management.BraveTabUiFeatureUtilities; import org.chromium.chrome.browser.toolbar.bottom.BottomToolbarConfiguration; import org.chromium.chrome.browser.toolbar.top.BraveToolbarLayoutImpl; import org.chromium.chrome.browser.util.BraveConstants; @@ -189,7 +188,6 @@ import org.chromium.mojo.system.MojoException; import org.chromium.ui.widget.Toast; -import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; @@ -727,6 +725,7 @@ public void onVerifyCredentials(String jsonVerifyCredentials, boolean isSuccess) new Intent(BraveActivity.this, BraveVpnProfileActivity.class); braveVpnProfileIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); braveVpnProfileIntent.putExtra(BraveVpnUtils.VERIFY_CREDENTIALS_FAILED, true); + braveVpnProfileIntent.setAction(Intent.ACTION_VIEW); startActivity(braveVpnProfileIntent); } } @@ -742,7 +741,7 @@ public void initializeState() { List dataTypes = Arrays.asList( BrowsingDataType.HISTORY, BrowsingDataType.COOKIES, BrowsingDataType.CACHE); - int[] dataTypesArray = CollectionUtil.integerListToIntArray(new ArrayList<>(dataTypes)); + int[] dataTypesArray = CollectionUtil.integerCollectionToIntArray(dataTypes); // has onBrowsingDataCleared() as an @Override callback from implementing // BrowsingDataBridge.OnClearBrowsingDataListener @@ -1245,6 +1244,7 @@ public void openPlaylistActivity(Context context, String playlistId) { Intent playlistActivityIntent = new Intent(context, PlaylistHostActivity.class); playlistActivityIntent.putExtra(ConstantUtils.PLAYLIST_ID, playlistId); playlistActivityIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + playlistActivityIntent.setAction(Intent.ACTION_VIEW); context.startActivity(playlistActivityIntent); } @@ -1343,6 +1343,7 @@ public void openBraveWallet(boolean fromDapp, boolean setupAction, boolean resto braveWalletIntent.putExtra(Utils.RESTART_WALLET_ACTIVITY_SETUP, setupAction); braveWalletIntent.putExtra(Utils.RESTART_WALLET_ACTIVITY_RESTORE, restoreAction); braveWalletIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); + braveWalletIntent.setAction(Intent.ACTION_VIEW); startActivity(braveWalletIntent); } @@ -1355,6 +1356,7 @@ public void openBraveWalletDAppsActivity(BraveWalletDAppsActivity.ActivityType a Intent braveWalletIntent = new Intent(this, BraveWalletDAppsActivity.class); braveWalletIntent.putExtra("activityType", activityType.getValue()); braveWalletIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); + braveWalletIntent.setAction(Intent.ACTION_VIEW); startActivity(braveWalletIntent); } @@ -1923,14 +1925,6 @@ interface Natives { String getSafeBrowsingApiKey(); } - @Override - public void initializeCompositor() { - super.initializeCompositor(); - - BraveTabUiFeatureUtilities.maybeOverrideEnableTabGroupAutoCreationPreference( - ContextUtils.getApplicationContext()); - } - private void initBraveWalletService() { if (mBraveWalletService != null) { return; diff --git a/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java b/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java index 5449b40ec0a9..0ce7cddedc0a 100644 --- a/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java +++ b/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java @@ -15,12 +15,14 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.bookmarks.BookmarkModel; import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthController; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher; +import org.chromium.chrome.browser.readaloud.ReadAloudController; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.toolbar.ToolbarManager; import org.chromium.chrome.browser.ui.appmenu.AppMenuHandler; @@ -37,12 +39,14 @@ public BraveAppMenuPropertiesDelegateImpl(Context context, TabModelSelector tabModelSelector, ToolbarManager toolbarManager, View decorView, @Nullable OneshotSupplier layoutStateProvidersSupplier, @Nullable OneshotSupplier startSurfaceSupplier, - ObservableSupplier bookmarkBridgeSupplier, + ObservableSupplier bookmarkModelSupplier, @Nullable OneshotSupplier - incognitoReauthControllerOneshotSupplier) { + incognitoReauthControllerOneshotSupplier, + @Nullable Supplier readAloudControllerSupplier) { super(context, activityTabProvider, multiWindowModeStateDispatcher, tabModelSelector, toolbarManager, decorView, layoutStateProvidersSupplier, startSurfaceSupplier, - bookmarkBridgeSupplier, incognitoReauthControllerOneshotSupplier); + bookmarkModelSupplier, incognitoReauthControllerOneshotSupplier, + readAloudControllerSupplier); } @Override diff --git a/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java b/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java index f6a8737c9926..a774969e4a67 100644 --- a/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java +++ b/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java @@ -18,6 +18,7 @@ import org.chromium.base.BraveFeatureList; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.BraveRewardsNativeWorker; @@ -32,6 +33,7 @@ import org.chromium.chrome.browser.preferences.BravePref; import org.chromium.chrome.browser.preferences.BravePrefServiceBridge; import org.chromium.chrome.browser.preferences.SharedPreferencesManager; +import org.chromium.chrome.browser.readaloud.ReadAloudController; import org.chromium.chrome.browser.set_default_browser.BraveSetDefaultBrowserUtils; import org.chromium.chrome.browser.speedreader.BraveSpeedReaderUtils; import org.chromium.chrome.browser.tab.Tab; @@ -62,18 +64,20 @@ public BraveTabbedAppMenuPropertiesDelegate(Context context, AppMenuDelegate appMenuDelegate, OneshotSupplier layoutStateProvider, OneshotSupplier startSurfaceSupplier, - ObservableSupplier bookmarkBridgeSupplier, + ObservableSupplier bookmarkModelSupplier, WebFeedSnackbarController.FeedLauncher feedLauncher, ModalDialogManager modalDialogManager, SnackbarManager snackbarManager, @NonNull OneshotSupplier - incognitoReauthControllerOneshotSupplier) { + incognitoReauthControllerOneshotSupplier, + Supplier readAloudControllerSupplier) { super(context, activityTabProvider, multiWindowModeStateDispatcher, tabModelSelector, toolbarManager, decorView, appMenuDelegate, layoutStateProvider, - startSurfaceSupplier, bookmarkBridgeSupplier, feedLauncher, modalDialogManager, - snackbarManager, incognitoReauthControllerOneshotSupplier); + startSurfaceSupplier, bookmarkModelSupplier, feedLauncher, modalDialogManager, + snackbarManager, incognitoReauthControllerOneshotSupplier, + readAloudControllerSupplier); mAppMenuDelegate = appMenuDelegate; - mBookmarkModelSupplier = bookmarkBridgeSupplier; + mBookmarkModelSupplier = bookmarkModelSupplier; } @Override @@ -236,8 +240,9 @@ public void onMenuDismissed() { mMenu.removeItem(R.id.brave_playlist_id); mMenu.removeItem(R.id.brave_speedreader_id); mMenu.removeItem(R.id.exit_id); - if (BraveVpnUtils.isBraveVpnFeatureEnable()) + if (BraveVpnUtils.isBraveVpnFeatureEnable()) { mMenu.removeItem(R.id.request_brave_vpn_row_menu_id); + } } @Override diff --git a/android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/SetupWalletFragment.java b/android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/SetupWalletFragment.java index befa295b51b8..164b1422e039 100644 --- a/android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/SetupWalletFragment.java +++ b/android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/SetupWalletFragment.java @@ -96,6 +96,7 @@ private void checkOnBraveActivity(boolean setupAction, boolean restoreAction) { intent.putExtra(Utils.RESTART_WALLET_ACTIVITY_SETUP, setupAction); intent.putExtra(Utils.RESTART_WALLET_ACTIVITY_RESTORE, restoreAction); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + intent.setAction(Intent.ACTION_VIEW); startActivity(intent); getActivity().finish(); } diff --git a/android/java/org/chromium/chrome/browser/crypto_wallet/modal/BraveWalletPanel.java b/android/java/org/chromium/chrome/browser/crypto_wallet/modal/BraveWalletPanel.java index 0ec4aabf12ed..60ac9dd966cf 100644 --- a/android/java/org/chromium/chrome/browser/crypto_wallet/modal/BraveWalletPanel.java +++ b/android/java/org/chromium/chrome/browser/crypto_wallet/modal/BraveWalletPanel.java @@ -433,6 +433,7 @@ private void setUpViews() { mBtnSelectedNetwork = mPopupView.findViewById(R.id.btn_dapps_panel_networks); mBtnSelectedNetwork.setOnClickListener(v -> { Intent intent = new Intent(mActivity, NetworkSelectorActivity.class); + intent.setAction(Intent.ACTION_VIEW); mActivity.startActivity(intent); }); mCvSolConnectionStatus = mPopupView.findViewById(R.id.v_dapps_panel_sol_connection_status); @@ -450,7 +451,9 @@ private void setUpViews() { mAccountChangeAnchor.setOnClickListener(v -> { try { BraveActivity activity = BraveActivity.getBraveActivity(); - activity.startActivity(new Intent(activity, AccountSelectorActivity.class)); + Intent intent = new Intent(activity, AccountSelectorActivity.class); + intent.setAction(Intent.ACTION_VIEW); + activity.startActivity(intent); } catch (BraveActivity.BraveActivityNotFoundException e) { Log.e(TAG, "setUpViews AccountChangeAnchor click " + e); } diff --git a/android/java/org/chromium/chrome/browser/crypto_wallet/util/Utils.java b/android/java/org/chromium/chrome/browser/crypto_wallet/util/Utils.java index e72c1bb1740e..c154d1797f44 100644 --- a/android/java/org/chromium/chrome/browser/crypto_wallet/util/Utils.java +++ b/android/java/org/chromium/chrome/browser/crypto_wallet/util/Utils.java @@ -272,6 +272,7 @@ public static void openAssetDetailsActivity( assetDetailIntent.putExtra(ASSET_CONTRACT_ADDRESS, asset.contractAddress); assetDetailIntent.putExtra(ASSET_DECIMALS, asset.decimals); assetDetailIntent.putExtra(COIN_TYPE, asset.coin); + assetDetailIntent.setAction(Intent.ACTION_VIEW); context.startActivity(assetDetailIntent); } @@ -287,6 +288,7 @@ public static void openAssetDetailsActivity( assetDetailIntent.putExtra(ASSET_SYMBOL, asset.symbol); assetDetailIntent.putExtra(ASSET_NAME, asset.name); assetDetailIntent.putExtra(ASSET_LOGO, asset.image); + assetDetailIntent.setAction(Intent.ACTION_VIEW); context.startActivity(assetDetailIntent); } @@ -316,10 +318,11 @@ public static void isCustomNetwork(JsonRpcService jsonRpcService, int coinType, return; } jsonRpcService.getCustomNetworks(coinType, chainIds -> { - if (Arrays.asList(chainIds).contains(chainId)) + if (Arrays.asList(chainIds).contains(chainId)) { callback.call(true); - else + } else { callback.call(false); + } }); } @@ -332,8 +335,9 @@ public static String[] makeNetworksAbbrevList(Activity activity, NetworkInfo[] a && 0 != (activity.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)) - || !network.chainId.equals(BraveWalletConstants.LOCALHOST_CHAIN_ID)) + || !network.chainId.equals(BraveWalletConstants.LOCALHOST_CHAIN_ID)) { categories.add(getNetworkShortText(network)); + } } return categories.toArray(new String[0]); @@ -341,8 +345,11 @@ public static String[] makeNetworksAbbrevList(Activity activity, NetworkInfo[] a public static NetworkInfo getNetworkInfoByChainId( String chainId, List allNetworks) { - for (NetworkInfo network : allNetworks) - if (network.chainId.equals(chainId)) return network; + for (NetworkInfo network : allNetworks) { + if (network.chainId.equals(chainId)) { + return network; + } + } // Fall back to mainnet return allNetworks.get(0); } @@ -350,15 +357,21 @@ public static NetworkInfo getNetworkInfoByChainId( public static NetworkInfo[] getNetworkInfosByChainIds( String[] chainId, NetworkInfo[] allNetworks) { List list = new ArrayList(); - for (NetworkInfo network : allNetworks) - if (Arrays.asList(chainId).contains(network.chainId)) list.add(network); + for (NetworkInfo network : allNetworks) { + if (Arrays.asList(chainId).contains(network.chainId)) { + list.add(network); + } + } return list.toArray(new NetworkInfo[0]); } public static NetworkInfo getNetworkInfoByName(String chainName, NetworkInfo[] allNetworks) { - for (NetworkInfo network : allNetworks) - if (network.chainName.equals(chainName)) return network; + for (NetworkInfo network : allNetworks) { + if (network.chainName.equals(chainName)) { + return network; + } + } return allNetworks[0]; } @@ -445,9 +458,10 @@ public static BigInteger multiplyByDecimals(@NonNull final String number, final parsed = (BigDecimal) df.parse(number, parsePosition); } - if (parsed == null || parsePosition.getIndex() != number.length()) + if (parsed == null || parsePosition.getIndex() != number.length()) { throw new ParseException( "Invalid input string to BigDecimal at ", parsePosition.getIndex()); + } BigDecimal multiplier = BigDecimal.TEN.pow(decimals); return parsed.multiply(multiplier).toBigInteger(); @@ -604,10 +618,11 @@ public static String maybeHexStrToUpperCase(String value) { value = value.toUpperCase(Locale.getDefault()); - if (hasPrefix) + if (hasPrefix) { return prefix + value; - else + } else { return value; + } } public static long toDecimalLamport(String amount, int decimals) { @@ -1568,7 +1583,9 @@ public static void getTxExtraInfo(WeakReference activit Callbacks.Callback4, BlockchainToken[], HashMap, HashMap>> callback) { BraveWalletBaseActivity activity = activityRef.get(); - if (activity == null || activity.isFinishing()) return; + if (activity == null || activity.isFinishing()) { + return; + } BraveWalletService braveWalletService = activity.getBraveWalletService(); BlockchainRegistry blockchainRegistry = activity.getBlockchainRegistry(); AssetRatioService assetRatioService = activity.getAssetRatioService(); @@ -1577,8 +1594,9 @@ public static void getTxExtraInfo(WeakReference activit && jsonRpcService != null : "Invalid service initialization"; if (JavaUtils.anyNull( - braveWalletService, blockchainRegistry, assetRatioService, jsonRpcService)) + braveWalletService, blockchainRegistry, assetRatioService, jsonRpcService)) { return; + } AsyncUtils.MultiResponseHandler multiResponse = new AsyncUtils.MultiResponseHandler(3); @@ -1586,9 +1604,10 @@ public static void getTxExtraInfo(WeakReference activit selectedNetwork, selectedNetwork.coin, tokenType, userAssetsOnly, tokens -> { final BlockchainToken[] fullTokenList = tokens; if (filterByTokens != null) { - if (userAssetsOnly) + if (userAssetsOnly) { Log.w("Utils", "userAssetsOnly usually shouldn't be used with filterByTokens"); + } tokens = filterByTokens; } @@ -1726,8 +1745,9 @@ private static void logP3ARecords( NetworkInfo selectedNetwork) { BraveWalletBaseActivity activity = activityRef.get(); if (activity == null || activity.isFinishing() - || JavaUtils.anyNull(activity.getBraveWalletP3A())) + || JavaUtils.anyNull(activity.getBraveWalletP3A())) { return; + } BraveWalletP3a braveWalletP3A = activity.getBraveWalletP3A(); AsyncUtils.MultiResponseHandler multiResponse = new AsyncUtils.MultiResponseHandler(1); diff --git a/android/java/org/chromium/chrome/browser/firstrun/BraveFirstRunFlowSequencer.java b/android/java/org/chromium/chrome/browser/firstrun/BraveFirstRunFlowSequencer.java index bebb43d23ad1..4dc0ff164a25 100644 --- a/android/java/org/chromium/chrome/browser/firstrun/BraveFirstRunFlowSequencer.java +++ b/android/java/org/chromium/chrome/browser/firstrun/BraveFirstRunFlowSequencer.java @@ -6,11 +6,13 @@ package org.chromium.chrome.browser.firstrun; import android.app.Activity; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.signin.AccountManagerFacadeProvider; public abstract class BraveFirstRunFlowSequencer extends FirstRunFlowSequencer { - public BraveFirstRunFlowSequencer(Activity activity) { - super(activity, + public BraveFirstRunFlowSequencer(Activity activity, OneshotSupplier profileSupplier) { + super(activity, profileSupplier, new ChildAccountStatusSupplier(AccountManagerFacadeProvider.getInstance(), FirstRunAppRestrictionInfo.takeMaybeInitialized())); } diff --git a/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java b/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java index 29cc79b4b3da..f80ab78b4683 100644 --- a/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java +++ b/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java @@ -457,7 +457,7 @@ public void finishNativeInitialization() { public void triggerLayoutInflation() { super.triggerLayoutInflation(); - mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this) { + mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this, getProfileSupplier()) { @Override public void onFlowIsKnown(Bundle freProperties) { initializeViews(); diff --git a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java index 5bee778b3419..3928623d6ec6 100644 --- a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java +++ b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java @@ -8,9 +8,11 @@ import android.app.Activity; import android.view.LayoutInflater; +import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; +import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.feed.BraveFeedSurfaceCoordinator; import org.chromium.chrome.browser.feed.FeedFeatures; import org.chromium.chrome.browser.feed.FeedSurfaceCoordinator; @@ -29,7 +31,7 @@ import org.chromium.chrome.browser.toolbar.top.Toolbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.native_page.NativePageHost; -import org.chromium.chrome.browser.xsurface.FeedLaunchReliabilityLogger.SurfaceType; +import org.chromium.chrome.browser.xsurface.feed.FeedLaunchReliabilityLogger.SurfaceType; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.search_engines.TemplateUrlService; @@ -53,11 +55,12 @@ public BraveNewTabPage(Activity activity, BottomSheetController bottomSheetController, Supplier shareDelegateSupplier, WindowAndroid windowAndroid, Supplier toolbarSupplier, SettingsLauncher settingsLauncher, - HomeSurfaceTracker homeSurfaceTracker) { + HomeSurfaceTracker homeSurfaceTracker, + ObservableSupplier tabContentManagerSupplier) { super(activity, browserControlsStateProvider, activityTabProvider, snackbarManager, lifecycleDispatcher, tabModelSelector, isTablet, uma, isInNightMode, nativePageHost, tab, url, bottomSheetController, shareDelegateSupplier, windowAndroid, - toolbarSupplier, settingsLauncher, homeSurfaceTracker); + toolbarSupplier, settingsLauncher, homeSurfaceTracker, tabContentManagerSupplier); assert mNewTabPageLayout instanceof BraveNewTabPageLayout; if (mNewTabPageLayout instanceof BraveNewTabPageLayout) { diff --git a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java index 875e6ea61b49..db399fee81b8 100644 --- a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java +++ b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java @@ -199,7 +199,7 @@ public BraveNewTabPageLayout(Context context, AttributeSet attrs) { mContext = context; mProfile = Profile.getLastUsedRegularProfile(); mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile); - mNTPBackgroundImagesBridge.setNewTabPageListener(newTabPageListener); + mNTPBackgroundImagesBridge.setNewTabPageListener(mNewTabPageListener); mDatabaseHelper = DatabaseHelper.getInstance(); } @@ -337,7 +337,7 @@ private void setNtpViews() { // Double tap on the settings bar to scroll back up mNewsSettingsBar.setOnTouchListener(new OnTouchListener() { - private GestureDetector gestureDetector = + private GestureDetector mGestureDetector = new GestureDetector(mActivity, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onDoubleTap(MotionEvent e) { @@ -348,7 +348,7 @@ public boolean onDoubleTap(MotionEvent e) { @Override public boolean onTouch(View v, MotionEvent event) { - gestureDetector.onTouchEvent(event); + mGestureDetector.onTouchEvent(event); return true; } }); @@ -1092,11 +1092,11 @@ public void initialize(NewTabPageManager manager, Activity activity, Delegate ti FeedSurfaceScrollDelegate scrollDelegate, TouchEnabledDelegate touchEnabledDelegate, UiConfig uiConfig, ActivityLifecycleDispatcher lifecycleDispatcher, NewTabPageUma uma, boolean isIncognito, WindowAndroid windowAndroid, boolean isNtpAsHomeSurfaceEnabled, - boolean isMultiColumnFeedEnabled) { + boolean isSurfacePolishEnabled, boolean isSurfacePolishOmniboxSizeEnabled) { super.initialize(manager, activity, tileGroupDelegate, searchProviderHasLogo, searchProviderIsGoogle, scrollDelegate, touchEnabledDelegate, uiConfig, lifecycleDispatcher, uma, isIncognito, windowAndroid, isNtpAsHomeSurfaceEnabled, - isMultiColumnFeedEnabled); + isSurfacePolishEnabled, isSurfacePolishOmniboxSizeEnabled); assert mMvTilesContainerLayout != null : "Something has changed in the upstream!"; @@ -1155,7 +1155,7 @@ private void setBackgroundImage(NTPImage ntpImage) { public void onGlobalLayout() { mWorkerTask = new FetchWallpaperWorkerTask(ntpImage, mBgImageView.getMeasuredWidth(), - mBgImageView.getMeasuredHeight(), wallpaperRetrievedCallback); + mBgImageView.getMeasuredHeight(), mWallpaperRetrievedCallback); mWorkerTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); mBgImageView.getViewTreeObserver().removeOnGlobalLayoutListener(this); @@ -1172,7 +1172,7 @@ private void checkForNonDisruptiveBanner(NTPImage ntpImage) { BraveNewsPreferencesV2.PREF_SHOW_OPTIN, true) && !BravePrefServiceBridge.getInstance().getShowNews())) { NTPUtil.showNonDisruptiveBanner( - (BraveActivity) mActivity, this, brOption, mSponsoredTab, newTabPageListener); + (BraveActivity) mActivity, this, brOption, mSponsoredTab, mNewTabPageListener); } } @@ -1199,7 +1199,7 @@ private void initilizeSponsoredTab() { if (shouldShowSuperReferral()) mNTPBackgroundImagesBridge.getTopSites(); } - private NewTabPageListener newTabPageListener = new NewTabPageListener() { + private NewTabPageListener mNewTabPageListener = new NewTabPageListener() { @Override public void updateInteractableFlag(boolean isBottomSheet) { mIsFromBottomSheet = isBottomSheet; @@ -1232,7 +1232,6 @@ protected void onPostExecute(List topSites) { } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } - }; private NTPBackgroundImagesBridge.NTPBackgroundImageServiceObserver mNTPBackgroundImageServiceObserver = new NTPBackgroundImagesBridge.NTPBackgroundImageServiceObserver() { @@ -1247,26 +1246,26 @@ public void onUpdated() { } }; - private FetchWallpaperWorkerTask.WallpaperRetrievedCallback - wallpaperRetrievedCallback = new FetchWallpaperWorkerTask.WallpaperRetrievedCallback() { - @Override - public void bgWallpaperRetrieved(Bitmap bgWallpaper) { - if (mBgImageView != null) { - mBgImageView.setImageBitmap(bgWallpaper); - } - } + private FetchWallpaperWorkerTask.WallpaperRetrievedCallback mWallpaperRetrievedCallback = + new FetchWallpaperWorkerTask.WallpaperRetrievedCallback() { + @Override + public void bgWallpaperRetrieved(Bitmap bgWallpaper) { + if (mBgImageView != null) { + mBgImageView.setImageBitmap(bgWallpaper); + } + } - @Override - public void logoRetrieved(Wallpaper wallpaper, Bitmap logoWallpaper) { - if (!NTPUtil.isReferralEnabled()) { - mWallpaper = wallpaper; - mSponsoredLogo = logoWallpaper; - if (mNtpAdapter != null) { - mNtpAdapter.setSponsoredLogo(mWallpaper, logoWallpaper); + @Override + public void logoRetrieved(Wallpaper wallpaper, Bitmap logoWallpaper) { + if (!NTPUtil.isReferralEnabled()) { + mWallpaper = wallpaper; + mSponsoredLogo = logoWallpaper; + if (mNtpAdapter != null) { + mNtpAdapter.setSponsoredLogo(mWallpaper, logoWallpaper); + } + } } - } - } - }; + }; private void loadTopSites(List topSites) { mSuperReferralSitesLayout = new LinearLayout(mActivity); diff --git a/android/java/org/chromium/chrome/browser/omnibox/BraveLocationBarCoordinator.java b/android/java/org/chromium/chrome/browser/omnibox/BraveLocationBarCoordinator.java index a85e3c7b77f7..f998f3904cba 100644 --- a/android/java/org/chromium/chrome/browser/omnibox/BraveLocationBarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/omnibox/BraveLocationBarCoordinator.java @@ -22,8 +22,8 @@ import org.chromium.chrome.browser.omnibox.LocationBarMediator.SaveOfflineButtonState; import org.chromium.chrome.browser.omnibox.status.StatusCoordinator.PageInfoAction; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; -import org.chromium.chrome.browser.omnibox.suggestions.base.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; +import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManager; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareDelegate; diff --git a/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java b/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java index 2d4c8d4baf54..5248a8aed3c9 100644 --- a/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java +++ b/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java @@ -68,7 +68,7 @@ public class OnboardingPrefManager { public static final int EXISTING_USER_REWARDS_OFF_ONBOARDING = 1; public static final int EXISTING_USER_REWARDS_ON_ONBOARDING = 2; - private static boolean isOnboardingNotificationShown; + private static boolean sIsOnboardingNotificationShown; public static boolean isNotification; @@ -217,15 +217,16 @@ public boolean isAdsAvailable() { public void showOnboarding(Context context) { Intent intent = new Intent(context, OnboardingActivity.class); + intent.setAction(Intent.ACTION_VIEW); context.startActivity(intent); } public boolean isOnboardingNotificationShown() { - return isOnboardingNotificationShown; + return sIsOnboardingNotificationShown; } public void setOnboardingNotificationShown(boolean isShown) { - isOnboardingNotificationShown = isShown; + sIsOnboardingNotificationShown = isShown; } public void onboardingNotification() { diff --git a/android/java/org/chromium/chrome/browser/search_engines/BUILD.gn b/android/java/org/chromium/chrome/browser/search_engines/BUILD.gn index 2337008b71bf..e03313f21701 100644 --- a/android/java/org/chromium/chrome/browser/search_engines/BUILD.gn +++ b/android/java/org/chromium/chrome/browser/search_engines/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/android/rules.gni") android_library("java") { + srcjar_deps = [ ":jni_headers" ] sources = [ "settings/BraveBaseSearchEngineAdapter.java", "settings/BravePrivateSearchEnginePreference.java", @@ -25,7 +26,6 @@ android_library("java") { "//third_party/androidx:androidx_annotation_annotation_java", ] - annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] resources_package = "org.chromium.chrome.browser.search_engines" } diff --git a/android/java/org/chromium/chrome/browser/settings/AppearancePreferences.java b/android/java/org/chromium/chrome/browser/settings/AppearancePreferences.java index 970788f24b65..1c2c3f464d76 100644 --- a/android/java/org/chromium/chrome/browser/settings/AppearancePreferences.java +++ b/android/java/org/chromium/chrome/browser/settings/AppearancePreferences.java @@ -197,7 +197,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { } else if (PREF_BRAVE_ENABLE_TAB_GROUPS.equals(key)) { SharedPreferencesManager.getInstance().writeBoolean( BravePreferenceKeys.BRAVE_TAB_GROUPS_ENABLED, (boolean) newValue); - shouldRelaunch = true; } else if (PREF_BRAVE_ENABLE_SPEEDREADER.equals(key)) { UserPrefs.get(Profile.getLastUsedRegularProfile()) .setBoolean(BravePref.SPEEDREADER_PREF_ENABLED, (boolean) newValue); diff --git a/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java b/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java index 307fa5bd3702..54205ece1834 100644 --- a/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java +++ b/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java @@ -39,6 +39,7 @@ public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.close_menu_id) { Intent intent = new Intent(getActivity(), ChromeTabbedActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + intent.setAction(Intent.ACTION_VIEW); startActivity(intent); } return false; diff --git a/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java b/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java index 36d898adc5ee..b4afb4c363ca 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java @@ -31,6 +31,7 @@ public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.close_menu_id) { Intent intent = new Intent(this, ChromeTabbedActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + intent.setAction(Intent.ACTION_VIEW); startActivity(intent); return true; } diff --git a/android/java/org/chromium/chrome/browser/settings/BraveVpnPreferences.java b/android/java/org/chromium/chrome/browser/settings/BraveVpnPreferences.java index 8b0918f23bb3..d009b1c12860 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveVpnPreferences.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveVpnPreferences.java @@ -199,6 +199,7 @@ public boolean onPreferenceClick(Preference preference) { Intent intent = new Intent(getActivity(), ChromeTabbedActivity.class); intent.putExtra(BraveActivity.OPEN_URL, BraveVpnUtils.getBraveAccountUrl()); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + intent.setAction(Intent.ACTION_VIEW); getActivity().finish(); startActivity(intent); return true; diff --git a/android/java/org/chromium/chrome/browser/settings/BraveWalletResetPreference.java b/android/java/org/chromium/chrome/browser/settings/BraveWalletResetPreference.java index f89b99dd57a9..a50049e1c485 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveWalletResetPreference.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveWalletResetPreference.java @@ -40,7 +40,7 @@ */ public class BraveWalletResetPreference extends Preference implements Preference.OnPreferenceClickListener { - private String TAG = "BraveWalletResetPreference"; + private static final String TAG = "BraveWalletResetPref"; private int mPrefAccentColor; private final String mConfirmationPhrase; @@ -148,6 +148,7 @@ private void launchBraveTabbedActivity() { Intent intent = new Intent(BraveActivity.getChromeTabbedActivity(), ChromeTabbedActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + intent.setAction(Intent.ACTION_VIEW); BraveActivity.getChromeTabbedActivity().startActivity(intent); } } diff --git a/android/java/org/chromium/chrome/browser/sync/settings/BraveManageSyncSettings.java b/android/java/org/chromium/chrome/browser/sync/settings/BraveManageSyncSettings.java index d13aa8e6b353..34c154990016 100644 --- a/android/java/org/chromium/chrome/browser/sync/settings/BraveManageSyncSettings.java +++ b/android/java/org/chromium/chrome/browser/sync/settings/BraveManageSyncSettings.java @@ -12,7 +12,6 @@ import androidx.preference.Preference; import org.chromium.chrome.R; -import org.chromium.components.browser_ui.settings.brave_tricks.checkbox_to_switch.ChromeBaseCheckBoxPreference; /** * See org.brave.bytecode.BraveManageSyncSettingsClassAdapter @@ -23,8 +22,6 @@ public class BraveManageSyncSettings extends ManageSyncSettings { private Preference mGoogleActivityControls; private Preference mSyncEncryption; - private ChromeBaseCheckBoxPreference mSyncPaymentsIntegration; - @VisibleForTesting @Override public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) { @@ -59,6 +56,10 @@ public void onCreatePreferences(@Nullable Bundle savedInstanceState, String root findPreference(PREF_ADVANCED_CATEGORY).setVisible(false); - mSyncPaymentsIntegration.setVisible(false); + Preference syncPaymentsIntegration = findPreference(PREF_SYNC_PAYMENTS_INTEGRATION); + assert syncPaymentsIntegration != null : "Something has changed in the upstream!"; + if (syncPaymentsIntegration != null) { + syncPaymentsIntegration.setVisible(false); + } } } diff --git a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java index d38c9d2578e3..3f3d68e1686c 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java +++ b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java @@ -42,7 +42,7 @@ import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; import org.chromium.chrome.browser.merchant_viewer.MerchantTrustSignalsCoordinator; import org.chromium.chrome.browser.omnibox.LocationBar; -import org.chromium.chrome.browser.omnibox.suggestions.base.HistoryClustersProcessor.OpenHistoryClustersDelegate; +import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.tab.Tab; @@ -236,11 +236,12 @@ public void enableBottomControls() { if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mActivity)) { mTabGroupUi = TabManagementDelegateProvider.getDelegate().createTabGroupUi( mActivity, mBottomControls.findViewById(R.id.bottom_container_slot), - mIncognitoStateProvider, mScrimCoordinator, mOmniboxFocusStateSupplier, - mBottomSheetController, mActivityLifecycleDispatcher, - mIsWarmOnResumeSupplier, mTabModelSelector, mTabContentManager, - mCompositorViewHolder, mCompositorViewHolder::getDynamicResourceLoader, - mTabCreatorManager, mLayoutStateProviderSupplier, mSnackbarManager); + mBrowserControlsSizer, mIncognitoStateProvider, mScrimCoordinator, + mOmniboxFocusStateSupplier, mBottomSheetController, + mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector, + mTabContentManager, mCompositorViewHolder, + mCompositorViewHolder::getDynamicResourceLoader, mTabCreatorManager, + mLayoutStateProviderSupplier, mSnackbarManager); } mBottomControlsCoordinatorSupplier.set(new BraveBottomControlsCoordinator( mLayoutStateProviderSupplier, diff --git a/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayoutImpl.java b/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayoutImpl.java index c4bd5de81a3a..bce16152ae55 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayoutImpl.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayoutImpl.java @@ -163,7 +163,7 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout private static final String TAG = "BraveToolbar"; private static final String YOUTUBE_DOMAIN = "youtube.com"; - private static final List mBraveSearchEngineDefaultRegions = + private static final List BRAVE_SEARCH_ENGINE_DEFAULT_REGIONS = Arrays.asList("CA", "DE", "FR", "GB", "US", "AT", "ES", "MX", "BR", "AR", "IN"); private static final long MB_10 = 10000000; private static final long MINUTES_10 = 10 * 60 * 1000; @@ -217,7 +217,7 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout private FilterListAndroidHandler mFilterListAndroidHandler; private PlaylistService mPlaylistService; - private enum BIGTECH_COMPANY { Google, Facebook, Amazon } + private enum BigtechCompany { Google, Facebook, Amazon } public BraveToolbarLayoutImpl(Context context, AttributeSet attrs) { super(context, attrs); @@ -330,18 +330,18 @@ public void onMenuTopShieldsChanged(boolean isOn, boolean isTopShield) { }); mBraveShieldsContentSettingsObserver = new BraveShieldsContentSettingsObserver() { @Override - public void blockEvent(int tabId, String block_type, String subresource) { - mBraveShieldsHandler.addStat(tabId, block_type, subresource); + public void blockEvent(int tabId, String blockType, String subresource) { + mBraveShieldsHandler.addStat(tabId, blockType, subresource); Tab currentTab = getToolbarDataProvider().getTab(); if (currentTab == null || currentTab.getId() != tabId) { return; } mBraveShieldsHandler.updateValues(tabId); if (!isIncognito() && OnboardingPrefManager.getInstance().isBraveStatsEnabled() - && (block_type.equals(BraveShieldsContentSettings.RESOURCE_IDENTIFIER_ADS) - || block_type.equals(BraveShieldsContentSettings - .RESOURCE_IDENTIFIER_TRACKERS))) { - addStatsToDb(block_type, subresource, currentTab.getUrl().getSpec()); + && (blockType.equals(BraveShieldsContentSettings.RESOURCE_IDENTIFIER_ADS) + || blockType.equals(BraveShieldsContentSettings + .RESOURCE_IDENTIFIER_TRACKERS))) { + addStatsToDb(blockType, subresource, currentTab.getUrl().getSpec()); } } @@ -875,12 +875,12 @@ private void showTooltip(String tooltipPref, int tabId) { + mBraveShieldsHandler.getAdsBlockedCount(tabId); String displayTrackerName = ""; - if (blockerNamesList.contains(BIGTECH_COMPANY.Google.name())) { - displayTrackerName = BIGTECH_COMPANY.Google.name(); - } else if (blockerNamesList.contains(BIGTECH_COMPANY.Facebook.name())) { - displayTrackerName = BIGTECH_COMPANY.Facebook.name(); - } else if (blockerNamesList.contains(BIGTECH_COMPANY.Amazon.name())) { - displayTrackerName = BIGTECH_COMPANY.Amazon.name(); + if (blockerNamesList.contains(BigtechCompany.Google.name())) { + displayTrackerName = BigtechCompany.Google.name(); + } else if (blockerNamesList.contains(BigtechCompany.Facebook.name())) { + displayTrackerName = BigtechCompany.Facebook.name(); + } else if (blockerNamesList.contains(BigtechCompany.Amazon.name())) { + displayTrackerName = BigtechCompany.Amazon.name(); } String trackerText = ""; @@ -1367,8 +1367,9 @@ public void onUrlFocusChange(boolean hasFocus) { BraveActivity.getBraveActivity().getActivityTab().getUrl().getSpec()) && !OnboardingPrefManager.getInstance().hasSearchEngineOnboardingShown() && OnboardingPrefManager.getInstance().getUrlFocusCount() == 1 - && !mBraveSearchEngineDefaultRegions.contains(countryCode)) { + && !BRAVE_SEARCH_ENGINE_DEFAULT_REGIONS.contains(countryCode)) { Intent searchActivityIntent = new Intent(context, SearchActivity.class); + searchActivityIntent.setAction(Intent.ACTION_VIEW); context.startActivity(searchActivityIntent); } diff --git a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java index 2a51c9a940d0..114a583a3494 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java @@ -14,6 +14,7 @@ import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.browser_controls.BrowserStateBrowserControlsVisibilityDelegate; +import org.chromium.chrome.browser.fullscreen.FullscreenManager; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.theme.ThemeColorProvider; @@ -70,7 +71,7 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, ObservableSupplier compositorInMotionSupplier, BrowserStateBrowserControlsVisibilityDelegate browserStateBrowserControlsVisibilityDelegate, - boolean shouldCreateLogoInStartToolbar) { + boolean shouldCreateLogoInStartToolbar, FullscreenManager fullscreenManager) { super(controlContainer, toolbarStub, fullscreenToolbarStub, toolbarLayout, toolbarDataProvider, tabController, userEducationHelper, buttonDataProviders, layoutStateProviderSupplier, normalThemeColorProvider, overviewThemeColorProvider, @@ -83,7 +84,7 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, partnerHomepageEnabledSupplier, offlineDownloader, initializeWithIncognitoColors, startSurfaceLogoClickedCallback, isStartSurfaceRefactorEnabled, constraintsSupplier, compositorInMotionSupplier, browserStateBrowserControlsVisibilityDelegate, - shouldCreateLogoInStartToolbar); + shouldCreateLogoInStartToolbar, fullscreenManager); mBraveToolbarLayout = toolbarLayout; mBraveMenuButtonCoordinator = browsingModeMenuButtonCoordinator; diff --git a/android/java/org/chromium/chrome/browser/util/TabUtils.java b/android/java/org/chromium/chrome/browser/util/TabUtils.java index eddfc0dc00bf..409dc2cdd62a 100644 --- a/android/java/org/chromium/chrome/browser/util/TabUtils.java +++ b/android/java/org/chromium/chrome/browser/util/TabUtils.java @@ -269,6 +269,7 @@ public static void enableRewardsButton() { public static void bringChromeTabbedActivityToTheTop(Activity activity) { Intent braveActivityIntent = new Intent(activity, ChromeTabbedActivity.class); braveActivityIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + braveActivityIntent.setAction(Intent.ACTION_VIEW); activity.startActivity(braveActivityIntent); } diff --git a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnParentActivity.java b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnParentActivity.java index 840b325da9ba..f5f5262a049d 100644 --- a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnParentActivity.java +++ b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnParentActivity.java @@ -18,8 +18,11 @@ import com.wireguard.crypto.KeyPair; import org.chromium.base.Log; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.chrome.R; import org.chromium.chrome.browser.init.AsyncInitializationActivity; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.vpn.BraveVpnNativeWorker; import org.chromium.chrome.browser.vpn.BraveVpnObserver; import org.chromium.chrome.browser.vpn.models.BraveVpnPrefModel; @@ -39,13 +42,18 @@ public abstract class BraveVpnParentActivity private static final String TAG = "BraveVPN"; public boolean mIsVerification; protected BraveVpnPrefModel mBraveVpnPrefModel; + private final OneshotSupplierImpl mProfileSupplier; abstract void showRestoreMenu(boolean shouldShowRestore); abstract void updateProfileView(); // Pass @{code ActivityResultRegistry} reference explicitly to avoid crash // https://github.com/brave/brave-browser/issues/31882 - ActivityResultLauncher intentActivityResultLauncher = registerForActivityResult( + public BraveVpnParentActivity() { + mProfileSupplier = new OneshotSupplierImpl<>(); + } + + ActivityResultLauncher mIntentActivityResultLauncher = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), getActivityResultRegistry(), result -> { BraveVpnUtils.dismissProgressDialog(); @@ -68,6 +76,7 @@ public abstract class BraveVpnParentActivity @Override public void finishNativeInitialization() { super.finishNativeInitialization(); + mProfileSupplier.set(Profile.getLastUsedRegularProfile()); if (BraveVpnUtils.isBraveVpnFeatureEnable()) { InAppPurchaseWrapper.getInstance().startBillingServiceConnection( BraveVpnParentActivity.this); @@ -194,7 +203,7 @@ public void run() { Intent intent = GoBackend.VpnService.prepare(BraveVpnParentActivity.this); if (intent != null) { - intentActivityResultLauncher.launch(intent); + mIntentActivityResultLauncher.launch(intent); return; } BraveVpnUtils.dismissProgressDialog(); @@ -207,4 +216,8 @@ public void run() { } }.start(); } + + public OneshotSupplier getProfileSupplier() { + return mProfileSupplier; + } } diff --git a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnPlansActivity.java b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnPlansActivity.java index 03cd58bd8275..e8f0477dbbf4 100644 --- a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnPlansActivity.java +++ b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnPlansActivity.java @@ -165,7 +165,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override protected void triggerLayoutInflation() { - mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this) { + mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this, getProfileSupplier()) { @Override public void onFlowIsKnown(Bundle freProperties) { initializeViews(); diff --git a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnProfileActivity.java b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnProfileActivity.java index 00f6e4bd66f4..546dd30015bb 100644 --- a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnProfileActivity.java +++ b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnProfileActivity.java @@ -101,7 +101,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override protected void triggerLayoutInflation() { - mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this) { + mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this, getProfileSupplier()) { @Override public void onFlowIsKnown(Bundle freProperties) { initializeViews(); diff --git a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnSupportActivity.java b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnSupportActivity.java index e897c82bc3ad..2481a4cbb7f0 100644 --- a/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnSupportActivity.java +++ b/android/java/org/chromium/chrome/browser/vpn/activities/BraveVpnSupportActivity.java @@ -25,17 +25,24 @@ import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.Toolbar; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.chrome.R; import org.chromium.chrome.browser.about_settings.AboutChromeSettings; import org.chromium.chrome.browser.about_settings.AboutSettingsBridge; import org.chromium.chrome.browser.firstrun.BraveFirstRunFlowSequencer; import org.chromium.chrome.browser.init.AsyncInitializationActivity; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.vpn.utils.BraveVpnPrefUtils; import java.util.TimeZone; public class BraveVpnSupportActivity extends AsyncInitializationActivity { private BraveFirstRunFlowSequencer mFirstRunFlowSequencer; + private final OneshotSupplierImpl mProfileSupplier; + + public BraveVpnSupportActivity() { + mProfileSupplier = new OneshotSupplierImpl<>(); + } private void initializeViews() { setContentView(R.layout.activity_brave_vpn_support); @@ -137,7 +144,8 @@ public void onClick(View v) { @Override protected void triggerLayoutInflation() { - mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this) { + mProfileSupplier.set(Profile.getLastUsedRegularProfile()); + mFirstRunFlowSequencer = new BraveFirstRunFlowSequencer(this, mProfileSupplier) { @Override public void onFlowIsKnown(Bundle freProperties) { initializeViews(); diff --git a/android/java/org/chromium/chrome/browser/vpn/utils/BraveVpnUtils.java b/android/java/org/chromium/chrome/browser/vpn/utils/BraveVpnUtils.java index 154924636e41..eca81cb28204 100644 --- a/android/java/org/chromium/chrome/browser/vpn/utils/BraveVpnUtils.java +++ b/android/java/org/chromium/chrome/browser/vpn/utils/BraveVpnUtils.java @@ -56,7 +56,7 @@ public class BraveVpnUtils { public static boolean mIsServerLocationChanged; public static boolean mUpdateProfileAfterSplitTunnel; public static String selectedServerRegion; - private static ProgressDialog mProgressDialog; + private static ProgressDialog sProgressDialog; public static boolean isBraveVpnFeatureEnable() { if ((ContextUtils.getApplicationContext().getPackageName().equals( @@ -76,33 +76,37 @@ public static String getBraveAccountUrl() { public static void openBraveVpnPlansActivity(Activity activity) { Intent braveVpnPlanIntent = new Intent(activity, BraveVpnPlansActivity.class); braveVpnPlanIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + braveVpnPlanIntent.setAction(Intent.ACTION_VIEW); activity.startActivity(braveVpnPlanIntent); } public static void openBraveVpnProfileActivity(Context context) { Intent braveVpnProfileIntent = new Intent(context, BraveVpnProfileActivity.class); braveVpnProfileIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + braveVpnProfileIntent.setAction(Intent.ACTION_VIEW); context.startActivity(braveVpnProfileIntent); } public static void openBraveVpnSupportActivity(Context context) { Intent braveVpnSupportIntent = new Intent(context, BraveVpnSupportActivity.class); braveVpnSupportIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + braveVpnSupportIntent.setAction(Intent.ACTION_VIEW); context.startActivity(braveVpnSupportIntent); } public static void openSplitTunnelActivity(Context context) { Intent braveVpnSupportIntent = new Intent(context, SplitTunnelActivity.class); + braveVpnSupportIntent.setAction(Intent.ACTION_VIEW); context.startActivity(braveVpnSupportIntent); } public static void showProgressDialog(Activity activity, String message) { - mProgressDialog = ProgressDialog.show(activity, "", message, true); + sProgressDialog = ProgressDialog.show(activity, "", message, true); } public static void dismissProgressDialog() { - if (mProgressDialog != null && mProgressDialog.isShowing()) { - mProgressDialog.dismiss(); + if (sProgressDialog != null && sProgressDialog.isShowing()) { + sProgressDialog.dismiss(); } } diff --git a/android/java/proguard.flags b/android/java/proguard.flags index 6ba86569405a..af0068645d90 100644 --- a/android/java/proguard.flags +++ b/android/java/proguard.flags @@ -44,3 +44,7 @@ -keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep class org.chromium.chrome.browser.tasks.tab_groups.TabGroupModelFilter { + *** getParentId(...); + *** getRootId(...); +} diff --git a/android/java/res/drawable-night/bookmark_empty_state_illustration.xml b/android/java/res/drawable-night/bookmark_empty_state_illustration.xml new file mode 100644 index 000000000000..7d8ee8cfeaf3 --- /dev/null +++ b/android/java/res/drawable-night/bookmark_empty_state_illustration.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable-night/history_empty_state_illustration.xml b/android/java/res/drawable-night/history_empty_state_illustration.xml new file mode 100644 index 000000000000..f3e85eef6fd9 --- /dev/null +++ b/android/java/res/drawable-night/history_empty_state_illustration.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml b/android/java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml new file mode 100644 index 000000000000..100317c380f8 --- /dev/null +++ b/android/java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable-night/reading_list_empty_state_illustration.xml b/android/java/res/drawable-night/reading_list_empty_state_illustration.xml new file mode 100644 index 000000000000..2a317bc160a5 --- /dev/null +++ b/android/java/res/drawable-night/reading_list_empty_state_illustration.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml b/android/java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml new file mode 100644 index 000000000000..a0bd373609a0 --- /dev/null +++ b/android/java/res/drawable-night/tablet_recent_tab_empty_state_illustration.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/bookmark_empty_state_illustration.xml b/android/java/res/drawable/bookmark_empty_state_illustration.xml new file mode 100644 index 000000000000..110ddb952032 --- /dev/null +++ b/android/java/res/drawable/bookmark_empty_state_illustration.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/history_empty_state_illustration.xml b/android/java/res/drawable/history_empty_state_illustration.xml new file mode 100644 index 000000000000..d7a57efdb880 --- /dev/null +++ b/android/java/res/drawable/history_empty_state_illustration.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/phone_recent_tab_empty_state_illustration.xml b/android/java/res/drawable/phone_recent_tab_empty_state_illustration.xml new file mode 100644 index 000000000000..1d7e415d7eeb --- /dev/null +++ b/android/java/res/drawable/phone_recent_tab_empty_state_illustration.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/reading_list_empty_state_illustration.xml b/android/java/res/drawable/reading_list_empty_state_illustration.xml new file mode 100644 index 000000000000..6fe31397d6ad --- /dev/null +++ b/android/java/res/drawable/reading_list_empty_state_illustration.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/tablet_recent_tab_empty_state_illustration.xml b/android/java/res/drawable/tablet_recent_tab_empty_state_illustration.xml new file mode 100644 index 000000000000..ee20d0be6612 --- /dev/null +++ b/android/java/res/drawable/tablet_recent_tab_empty_state_illustration.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/java/res/drawable/web_notification_small_icon_background.xml b/android/java/res/drawable/web_notification_small_icon_background.xml index ad6c468e0b6b..f3ac7a11b50c 100644 --- a/android/java/res/drawable/web_notification_small_icon_background.xml +++ b/android/java/res/drawable/web_notification_small_icon_background.xml @@ -8,5 +8,5 @@ - + diff --git a/android/java/res/layout/fragment_brave_vpn_always_on_error_dialog.xml b/android/java/res/layout/fragment_brave_vpn_always_on_error_dialog.xml index 67e389f492ad..7da1cd0abe7f 100644 --- a/android/java/res/layout/fragment_brave_vpn_always_on_error_dialog.xml +++ b/android/java/res/layout/fragment_brave_vpn_always_on_error_dialog.xml @@ -23,7 +23,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:text="@string/connection_error" + android:text="@string/vpn_connection_error" android:textSize="20sp" android:layout_marginBottom="16dp" android:textColor="@color/shield_text_color" diff --git a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java index 1771df49effb..627d22d657ee 100644 --- a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java +++ b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java @@ -69,14 +69,14 @@ import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider; import org.chromium.chrome.browser.omnibox.status.PageInfoIPHController; import org.chromium.chrome.browser.omnibox.status.StatusCoordinator.PageInfoAction; +import org.chromium.chrome.browser.omnibox.styles.OmniboxImageSupplier; import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider; import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteDelegate; -import org.chromium.chrome.browser.omnibox.suggestions.FaviconFetcher; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; import org.chromium.chrome.browser.omnibox.suggestions.SuggestionHost; import org.chromium.chrome.browser.omnibox.suggestions.UrlBarDelegate; -import org.chromium.chrome.browser.omnibox.suggestions.base.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; +import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareDelegateImpl; import org.chromium.chrome.browser.suggestions.tile.TileRenderer; @@ -354,6 +354,10 @@ public void testClassesExist() throws Exception { classExists("org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator")); Assert.assertTrue(classExists( "org/chromium/chrome/browser/contextmenu/BraveChromeContextMenuPopulator")); + Assert.assertTrue( + classExists("org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter")); + Assert.assertTrue(classExists( + "org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter")); } @Test @@ -577,6 +581,12 @@ public void testMethodsForInvocationExist() throws Exception { "isEnabled", true, boolean.class)); Assert.assertTrue(methodExists("org/chromium/chrome/browser/tab/TabHelpers", "initTabHelpers", true, void.class, Tab.class, Tab.class)); + Assert.assertTrue( + methodExists("org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter", + "getParentId", true, int.class, Tab.class)); + Assert.assertTrue( + methodExists("org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter", + "getRootId", true, int.class, Tab.class)); // NOTE: Add new checks above. For each new check in this method add proguard exception in // `brave/android/java/proguard.flags` file under `Add methods for invocation below` // section. Both test and regular apks should have the same exceptions. @@ -592,7 +602,7 @@ public void testConstructorsExistAndMatch() throws Exception { TabModelSelector.class, ToolbarManager.class, View.class, AppMenuDelegate.class, OneshotSupplier.class, OneshotSupplier.class, ObservableSupplier.class, WebFeedSnackbarController.FeedLauncher.class, ModalDialogManager.class, - SnackbarManager.class, OneshotSupplier.class)); + SnackbarManager.class, OneshotSupplier.class, Supplier.class)); Assert.assertTrue(constructorsMatch("org/chromium/chrome/browser/tabmodel/ChromeTabCreator", "org/chromium/chrome/browser/tabmodel/BraveTabCreator", Activity.class, WindowAndroid.class, Supplier.class, boolean.class, OverviewNTPCreator.class, @@ -624,18 +634,19 @@ public void testConstructorsExistAndMatch() throws Exception { "org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl", Context.class, ActivityTabProvider.class, MultiWindowModeStateDispatcher.class, TabModelSelector.class, ToolbarManager.class, View.class, OneshotSupplier.class, - OneshotSupplier.class, ObservableSupplier.class, OneshotSupplier.class)); + OneshotSupplier.class, ObservableSupplier.class, OneshotSupplier.class, + Supplier.class)); Assert.assertTrue( constructorsMatch("org/chromium/chrome/browser/settings/SettingsLauncherImpl", "org/chromium/chrome/browser/settings/BraveSettingsLauncherImpl")); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator", "org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator", - Activity.class, ViewGroup.class, IncognitoStateProvider.class, - ScrimCoordinator.class, ObservableSupplier.class, BottomSheetController.class, - ActivityLifecycleDispatcher.class, Supplier.class, TabModelSelector.class, - TabContentManager.class, ViewGroup.class, Supplier.class, TabCreatorManager.class, - OneshotSupplier.class, SnackbarManager.class)); + Activity.class, ViewGroup.class, BrowserControlsStateProvider.class, + IncognitoStateProvider.class, ScrimCoordinator.class, ObservableSupplier.class, + BottomSheetController.class, ActivityLifecycleDispatcher.class, Supplier.class, + TabModelSelector.class, TabContentManager.class, ViewGroup.class, Supplier.class, + TabCreatorManager.class, OneshotSupplier.class, SnackbarManager.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate", "org/chromium/chrome/browser/site_settings/BraveSiteSettingsDelegate", @@ -658,12 +669,12 @@ public void testConstructorsExistAndMatch() throws Exception { ActivityLifecycleDispatcher.class, TabModelSelector.class, boolean.class, NewTabPageUma.class, boolean.class, NativePageHost.class, Tab.class, String.class, BottomSheetController.class, Supplier.class, WindowAndroid.class, Supplier.class, - SettingsLauncher.class, HomeSurfaceTracker.class)); + SettingsLauncher.class, HomeSurfaceTracker.class, ObservableSupplier.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/omnibox/suggestions/editurl/EditUrlSuggestionProcessor", "org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor", - Context.class, SuggestionHost.class, UrlBarDelegate.class, FaviconFetcher.class, - Supplier.class, Supplier.class)); + Context.class, SuggestionHost.class, UrlBarDelegate.class, + OmniboxImageSupplier.class, Supplier.class, Supplier.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator", "org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator", @@ -677,7 +688,7 @@ public void testConstructorsExistAndMatch() throws Exception { HistoryDelegate.class, BooleanSupplier.class, OfflineDownloader.class, boolean.class, Callback.class, boolean.class, ObservableSupplier.class, ObservableSupplier.class, BrowserStateBrowserControlsVisibilityDelegate.class, - boolean.class)); + boolean.class, FullscreenManager.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/toolbar/menu_button/MenuButtonCoordinator", "org/chromium/chrome/browser/toolbar/menu_button/BraveMenuButtonCoordinator", @@ -884,9 +895,6 @@ public void testFieldsExist() throws Exception { "mGoogleActivityControls")); Assert.assertTrue(fieldExists( "org/chromium/chrome/browser/sync/settings/ManageSyncSettings", "mSyncEncryption")); - Assert.assertTrue( - fieldExists("org/chromium/chrome/browser/sync/settings/ManageSyncSettings", - "mSyncPaymentsIntegration")); Assert.assertTrue( fieldExists("org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator", "mMediator")); @@ -1054,6 +1062,9 @@ public void testFieldsExist() throws Exception { "mBookmarkManagerCoordinator")); Assert.assertTrue( fieldExists("org/chromium/chrome/browser/flags/CachedFlag", "mDefaultValue")); + Assert.assertFalse( + fieldExists("org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter", + "mIsResetting")); } @Test @@ -1139,6 +1150,9 @@ public void testSuperNames() throws Exception { "org/chromium/chrome/browser/incognito/reauth/BravePrivateTabReauthCoordinatorBase")); Assert.assertTrue(checkSuperName("org/chromium/chrome/browser/bookmarks/BookmarkModel", "org/chromium/chrome/browser/bookmarks/BraveBookmarkBridge")); + Assert.assertTrue( + checkSuperName("org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter", + "org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter")); } private boolean classExists(String className) { diff --git a/android/javatests/org/chromium/chrome/browser/contextmenu/BraveContextMenuPopulatorTest.java b/android/javatests/org/chromium/chrome/browser/contextmenu/BraveContextMenuPopulatorTest.java deleted file mode 100644 index 0642b70e24c9..000000000000 --- a/android/javatests/org/chromium/chrome/browser/contextmenu/BraveContextMenuPopulatorTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2022 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -package org.chromium.chrome.browser.contextmenu; - -import static org.junit.Assert.assertTrue; - -import androidx.test.filters.SmallTest; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.chromium.base.ContextUtils; -import org.chromium.base.test.BaseJUnit4ClassRunner; -import org.chromium.base.test.util.CommandLineFlags; -import org.chromium.chrome.browser.flags.ChromeSwitches; -import org.chromium.chrome.browser.tasks.tab_management.BraveTabUiFeatureUtilities; -import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities; -import org.chromium.content_public.browser.test.util.TestThreadUtils; - -@RunWith(BaseJUnit4ClassRunner.class) -@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class BraveContextMenuPopulatorTest { - @Test - @SmallTest - public void testTabGroupAutoCreationPreference() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - BraveTabUiFeatureUtilities.maybeOverrideEnableTabGroupAutoCreationPreference( - ContextUtils.getApplicationContext()); - assertTrue(TabUiFeatureUtilities.ENABLE_TAB_GROUP_AUTO_CREATION.getValue()); - }); - } -} diff --git a/app/BUILD.gn b/app/BUILD.gn index 68978f6b7887..e8454d6b8cce 100644 --- a/app/BUILD.gn +++ b/app/BUILD.gn @@ -126,6 +126,7 @@ source_set("browser_tests") { "//components/search", "//components/segmentation_platform/public", "//components/send_tab_to_self", + "//components/signin/public/base:signin_buildflags", "//components/subresource_filter/core/common", "//components/translate/core/common", "//extensions/common", diff --git a/app/app_management_strings.grdp b/app/app_management_strings.grdp index 2fc26e08b24e..3d313dc47333 100644 --- a/app/app_management_strings.grdp +++ b/app/app_management_strings.grdp @@ -109,8 +109,8 @@ App details - - This system app is preinstalled on your device + + This app is preinstalled on your device Android App @@ -121,9 +121,6 @@ Web App - - System App - ChromeOS System App @@ -206,7 +203,18 @@ other {Supported file types: {FILE_TYPE1}TXT, {FILE_TYPE2}CSV, {FILE_TYPE3}DOC, {FILE_TYPE4}DOCX (<a href="{LINK}">and {OVERFLOW_COUNT} more</a>)} } + + Installed and streamed applications from $1Citrix + + + Permissions that you allow for $1Citrix will also be allowed for its installed and streamed apps. + + + + Permissions that you allow for $1Citrix will also be allowed for this app. + + diff --git a/app/brave_command_line_helper.cc b/app/brave_command_line_helper.cc index beed38227a15..46e4c0f80c2b 100644 --- a/app/brave_command_line_helper.cc +++ b/app/brave_command_line_helper.cc @@ -40,9 +40,9 @@ void BraveCommandLineHelper::ParseCSV( } void BraveCommandLineHelper::Parse() { - ParseCSV(command_line_.GetSwitchValueASCII(switches::kEnableFeatures), + ParseCSV(command_line_->GetSwitchValueASCII(switches::kEnableFeatures), &enabled_features_); - ParseCSV(command_line_.GetSwitchValueASCII(switches::kDisableFeatures), + ParseCSV(command_line_->GetSwitchValueASCII(switches::kDisableFeatures), &disabled_features_); // Remove enabled features that are also disabled. When processing // features, if the same feature is enabled and disabled the latter takes @@ -57,8 +57,9 @@ void BraveCommandLineHelper::Parse() { } void BraveCommandLineHelper::AppendSwitch(const char* switch_key) { - if (!command_line_.HasSwitch(switch_key)) - command_line_.AppendSwitch(switch_key); + if (!command_line_->HasSwitch(switch_key)) { + command_line_->AppendSwitch(switch_key); + } } void BraveCommandLineHelper::AppendFeatures( @@ -91,11 +92,12 @@ void BraveCommandLineHelper::AppendCSV( ss << ","; ss << *it; } - command_line_.AppendSwitchASCII(switch_key, ss.str()); + command_line_->AppendSwitchASCII(switch_key, ss.str()); } void BraveCommandLineHelper::AppendSwitchASCII(const char* switch_key, const char* value) { - if (!command_line_.HasSwitch(switch_key)) - command_line_.AppendSwitchASCII(switch_key, value); + if (!command_line_->HasSwitch(switch_key)) { + command_line_->AppendSwitchASCII(switch_key, value); + } } diff --git a/app/brave_command_line_helper.h b/app/brave_command_line_helper.h index 41c745c082d9..e9ba4a268618 100644 --- a/app/brave_command_line_helper.h +++ b/app/brave_command_line_helper.h @@ -8,6 +8,7 @@ #include #include +#include "base/memory/raw_ref.h" namespace base { class CommandLine; @@ -35,7 +36,7 @@ class BraveCommandLineHelper { void AppendCSV(const char* switch_key, const std::unordered_set& values); - base::CommandLine& command_line_; + const raw_ref command_line_; std::unordered_set enabled_features_; std::unordered_set disabled_features_; }; diff --git a/app/brave_main_delegate_browsertest.cc b/app/brave_main_delegate_browsertest.cc index c87da086fb21..2a38914f50b7 100644 --- a/app/brave_main_delegate_browsertest.cc +++ b/app/brave_main_delegate_browsertest.cc @@ -6,6 +6,7 @@ #include "base/feature_list.h" #include "brave/components/update_client/buildflags.h" #include "build/build_config.h" +#include "chrome/browser/apps/intent_helper/intent_picker_features.h" #include "chrome/browser/browser_features.h" #include "chrome/browser/companion/core/features.h" #include "chrome/browser/companion/visual_search/features.h" @@ -45,6 +46,7 @@ #include "components/segmentation_platform/public/features.h" #include "components/send_tab_to_self/features.h" #include "components/shared_highlighting/core/common/shared_highlighting_features.h" +#include "components/signin/public/base/signin_buildflags.h" #include "components/subresource_filter/core/common/common_features.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_test.h" @@ -111,21 +113,25 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &android_webview::features::kWebViewServerSideSampling, &android_webview::features::kWebViewMeasureScreenCoverage, #endif + &apps::features::kLinkCapturingInfoBar, &attribution_reporting::kAttributionReportingNullAggregatableReports, &autofill::features::kAutofillEnableOfferNotificationForPromoCodes, &autofill::features::kAutofillEnableRemadeDownstreamMetrics, &autofill::features::test::kAutofillServerCommunication, &autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains, + &blink::features::kAdAuctionReportingWithMacroApi, &blink::features::kAdInterestGroupAPI, &blink::features::kAllowURNsInIframes, &blink::features::kBackgroundResourceFetch, &blink::features::kBiddingAndScoringDebugReportingAPI, &blink::features::kBrowsingTopics, &blink::features::kBrowsingTopicsXHR, + &blink::features::kClientHintsFormFactor, &blink::features::kClientHintsMetaEquivDelegateCH, &blink::features::kComputePressure, &blink::features::kConversionMeasurement, &blink::features::kCssSelectorFragmentAnchor, + &blink::features::kEventTimingReportAllEarlyEntriesOnPaintedPresentation, &blink::features::kFencedFrames, &blink::features::kFledge, &blink::features::kFledgeBiddingAndAuctionServer, @@ -142,6 +148,7 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &blink::features::kSpeculationRulesPrefetchFuture, &blink::features::kSpeculationRulesPrefetchProxy, &blink::features::kTextFragmentAnchor, + &blink::features::kWebEnvironmentIntegrity, &commerce::kCommerceAllowOnDemandBookmarkUpdates, &commerce::kCommerceDeveloper, &commerce::kCommerceMerchantViewer, @@ -165,23 +172,32 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { #if BUILDFLAG(IS_WIN) &features::kAppBoundEncryptionMetrics, #endif + &features::kAttributionFencedFrameReportingBeacon, &features::kBookmarkTriggerForPrerender2, + &features::kChromeLabs, + &features::kChromeRefresh2023, #if !BUILDFLAG(IS_ANDROID) &features::kCopyLinkToText, #endif - &features::kAttributionFencedFrameReportingBeacon, +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + &features::kDesktopPWAsLinkCapturing, +#endif &features::kDigitalGoodsApi, &features::kExtensionsMenuInAppMenu, &features::kFedCm, - &features::kFedCmIframeSupport, - &features::kFedCmUserInfo, &features::kFedCmWithoutThirdPartyCookies, &features::kFirstPartySets, +#if !BUILDFLAG(IS_ANDROID) + &features::kHaTSWebUI, +#endif &features::kIdleDetection, &features::kKAnonymityService, &features::kNotificationTriggers, &features::kOmniboxTriggerForNoStatePrefetch, &features::kOmniboxTriggerForPrerender2, +#if !BUILDFLAG(IS_ANDROID) + &features::kPrivacyGuide3, +#endif #if BUILDFLAG(IS_ANDROID) &features::kPrivacyGuideAndroidPostMVP, #endif @@ -198,7 +214,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { #if BUILDFLAG(IS_MAC) &features::kUseChromiumUpdater, #endif - &features::kWebEnvironmentIntegrity, &features::kWebOTP, &history::kOrganicRepeatableQueries, &history::kSyncSegmentsData, @@ -217,13 +232,16 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &history_clusters::internal::kPersistContextAnnotationsInHistoryDb, #if !BUILDFLAG(IS_ANDROID) &kForYouFre, +#endif +#if BUILDFLAG(ENABLE_MIRROR) + &kVerifyRequestInitiatorForMirrorHeaders, #endif &lens::features::kEnableLensPing, &lens::features::kLensStandalone, &media::kLiveCaption, + &net::features::kEnableWebTransportDraft07, &net::features::kNoncedPartitionedCookies, &net::features::kPartitionedCookies, - &net::features::kSamePartyAttributeEnabled, &network::features::kPrivateStateTokens, &network_time::kNetworkTimeServiceQuerying, &ntp_features::kNtpAlphaBackgroundCollections, @@ -232,6 +250,9 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &ntp_features::kNtpHistoryClustersModule, &ntp_features::kNtpHistoryClustersModuleLoad, &omnibox::kInspireMe, + &omnibox::kDocumentProviderNoSetting, + &omnibox::kDocumentProviderNoSyncRequirement, + &omnibox::kOmniboxMostVisitedTilesOnSrp, &omnibox::kOmniboxSteadyStateHeight, &omnibox::kRichAutocompletion, &optimization_guide::features::kOptimizationHints, @@ -242,7 +263,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &page_image_service::kImageService, &page_image_service::kImageServiceSuggestPoweredImages, #if !BUILDFLAG(IS_ANDROID) - &page_info::kPageInfoCookiesSubpage, &permissions::features::kPermissionsPromptSurvey, &permissions::features::kRecordPermissionExpirationTimestamps, #endif @@ -259,7 +279,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &segmentation_platform::features::kSegmentationPlatformFeature, &send_tab_to_self::kSendTabToSelfSigninPromo, &shared_highlighting::kIOSSharedHighlightingV2, - &shared_highlighting::kSharedHighlightingAmp, &shared_highlighting::kSharedHighlightingManager, &subresource_filter::kAdTagging, #if !BUILDFLAG(IS_ANDROID) @@ -277,7 +296,8 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, EnabledFeatures) { &blink::features::kPrefetchPrivacyChanges, &blink::features::kReducedReferrerGranularity, &blink::features::kReduceUserAgentMinorVersion, - &features::kHttpsFirstModeV2, + &blink::features::kUACHOverrideBlank, + &features::kCertificateTransparencyAskBeforeEnabling, #if BUILDFLAG(IS_WIN) &features::kWinrtGeolocationImplementation, #endif diff --git a/app/brave_settings_strings.grdp b/app/brave_settings_strings.grdp index 09a2658d6e68..5c8f24dd3133 100644 --- a/app/brave_settings_strings.grdp +++ b/app/brave_settings_strings.grdp @@ -1027,6 +1027,9 @@ Get more extensions + + Open Web Store + diff --git a/app/brave_strings.grd b/app/brave_strings.grd index 88980400aff0..bd0c95b0b8b4 100644 --- a/app/brave_strings.grd +++ b/app/brave_strings.grd @@ -421,9 +421,18 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> Not used in Brave. Placeholder to keep resource maps in sync. - - Not used in Brave. Placeholder to keep resource maps in sync. - + + + + Terms of Service + + + + + Not used in Brave. Placeholder to keep resource maps in sync. + + + To get future Brave updates, you'll need macOS 10.15 or later. This computer is using macOS 10.13. @@ -674,10 +683,8 @@ Permissions you've already given to websites and apps may apply to this account. Brave recommends scanning this file because it may be dangerous - - - - Brave blocked this archive file because it may hide malware + + Brave blocks some downloads @@ -753,11 +760,14 @@ Permissions you've already given to websites and apps may apply to this account. This extension contains malware and is unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. - - This extension violates the Web Store policy, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. + + This extension violates the Web Store policy, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. - This extension was unpublished by its developer, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. + This extension was unpublished by its developer, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. + + + Brave recommends you review this extension @@ -928,9 +938,18 @@ Permissions you've already given to websites and apps may apply to this account. - - Customize Brave - + + + + Customize Brave for Testing + + + + + Customize Brave + + + @@ -1038,17 +1057,19 @@ Permissions you've already given to websites and apps may apply to this account. - + {NUM_DEVICES, plural, - =0 {A Brave extension was accessing HID devices} - =1 {A Brave extension is accessing 1 HID device} - other {A Brave extension is accessing # HID devices}} + =0 {1 HID device was being accessed by one or more Brave extensions} + =1 {1 HID device is being accessed by one or more Brave extensions} + other {# HID devices are being accessed by one or more Brave extensions}} - + + + {NUM_DEVICES, plural, - =0 {Brave extensions were accessing HID devices} - =1 {Brave extensions are accessing HID devices} - other {Brave extensions are accessing # HID devices}} + =0 {1 USB device was being accessed by one or more Brave extensions} + =1 {1 USB device is being accessed by one or more Brave extensions} + other {# USB devices are being accessed by one or more Brave extensions}} @@ -1448,8 +1469,8 @@ Permissions you've already given to websites and apps may apply to this account. {COUNT, plural, - =1 {Your organization automatically deletes browsing data when Brave isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} - other {Your organization automatically deletes browsing data when Brave isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} + =1 {Your organization automatically deletes browsing data when Brave isn't used for 1 minute. This could include history, autofill, and downloads. Your tabs will stay open.} + other {Your organization automatically deletes browsing data when Brave isn't used for # minutes. This could include history, autofill, and downloads. Your tabs will stay open.}} {COUNT, plural, @@ -1466,13 +1487,11 @@ Permissions you've already given to websites and apps may apply to this account. Help us improve Brave + - - Your parent has turned off "Permissions for sites, apps and extensions" for Brave. Adding this $1extension is not allowed. - - - Your parent has turned off "Permissions for sites, apps and extensions" for Brave. Enabling this $1extension is not allowed. + + Your parent has turned off "Permissions for sites, apps and extensions" for Brave @@ -1509,9 +1528,6 @@ Permissions you've already given to websites and apps may apply to this account. Set up your new Brave profile - - Customize your Brave profile - Each profile holds its own Brave info like bookmarks, history, passwords, and more @@ -1552,6 +1568,17 @@ Permissions you've already given to websites and apps may apply to this account. + + + Set Brave as your default browser + + + Use Brave anytime you click links in messages, documents, and other apps + + + Brave logo inside a computer screen. + + You can switch between Brave profiles here diff --git a/app/brave_strings_override.grd b/app/brave_strings_override.grd index bdfd9b8900fc..585f080b2b10 100644 --- a/app/brave_strings_override.grd +++ b/app/brave_strings_override.grd @@ -127,6 +127,12 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> + + + + + + @@ -182,7 +188,7 @@ Permissions you've already given to websites and apps may apply to this account. - This extension violates the Web Store policy, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. + This extension violates the Web Store policy, and might be unsafe. Remove it from Brave so it can no longer see and change your data on sites you visit, including your personal info. Warning: Brave cannot prevent extensions from recording your browsing history. To disable this extension in Private mode, unselect this option. @@ -230,6 +236,13 @@ Permissions you've already given to websites and apps may apply to this account. + + + + + + + @@ -350,6 +363,7 @@ Permissions you've already given to websites and apps may apply to this account. + diff --git a/app/command_utils_unittest.cc b/app/command_utils_unittest.cc index d46cae8d9e73..f2f3463c1f54 100644 --- a/app/command_utils_unittest.cc +++ b/app/command_utils_unittest.cc @@ -17,7 +17,7 @@ // add the missing command to |commands::GetCommands| in command_utils.h. TEST(CommandUtilsUnitTest, AllAcceleratedCommandsShouldBeAvailable) { base::flat_set excluded_commands = { - IDC_RUN_SCREEN_AI_VISUAL_ANNOTATIONS}; + IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION}; base::test::ScopedFeatureList features; features.InitAndEnableFeature(commands::features::kBraveCommands); diff --git a/app/extensions_strings.grdp b/app/extensions_strings.grdp index 46db17d0b72f..3e702a76b820 100644 --- a/app/extensions_strings.grdp +++ b/app/extensions_strings.grdp @@ -273,7 +273,7 @@ ID - Extension Enabled + On, extension enabled App Enabled @@ -501,10 +501,10 @@ Site - Extensions + My extensions - - Open Web Store + + Discover more extensions and themes on the <a target="_blank" href="$1">Web Store</a> </a> Keyboard shortcuts @@ -539,6 +539,22 @@ Subpage button + + + Off • This extension contains malware + + + Off • This extension violates the Web Store policy + + + On • This extension violates the Web Store policy + + + Off • This extension was unpublished by its developer + + + On • This extension was unpublished by its developer + {NUM_EXTENSIONS, plural, =1 {Review 1 extension that was taken down from the Web Store} @@ -554,7 +570,19 @@ Keep this extension - Remove All + Remove all + + + All done for now + + + All Extensions + + + Remove $1Voice Over extension + + + More actions for $1Voice Over extension diff --git a/app/extensions_strings_override.grdp b/app/extensions_strings_override.grdp index 17301aede707..36f0e0588f5f 100644 --- a/app/extensions_strings_override.grdp +++ b/app/extensions_strings_override.grdp @@ -19,8 +19,14 @@ Find extensions and themes in the <a target="_blank" href="https://chrome.google.com/webstore/category/extensions">Web Store</a></a> - - Open Web Store + + Discover more extensions and themes on the <a target="_blank" href="$1">Web Store</a> </a> + + + Off • This extension violates the Web Store policy + + + On • This extension violates the Web Store policy {NUM_EXTENSIONS, plural, diff --git a/app/generated_resources.grd b/app/generated_resources.grd index 751c5b0d6e88..58d719b341cd 100644 --- a/app/generated_resources.grd +++ b/app/generated_resources.grd @@ -309,6 +309,11 @@ are declared in tools/grit/grit_rule.gni. + + + + + @@ -543,6 +548,12 @@ are declared in tools/grit/grit_rule.gni. &Disable Live Caption + + Fill in form + + + Addresses and more + &Back @@ -755,6 +766,9 @@ are declared in tools/grit/grit_rule.gni. Just once + + Recognize visual layout semantics + Use enhanced spell check @@ -1042,6 +1056,9 @@ are declared in tools/grit/grit_rule.gni. Just once + + Recognize Visual Layout Semantics + Use Enhanced Spell Check @@ -1592,6 +1609,12 @@ are declared in tools/grit/grit_rule.gni. Managed by your parent + + Profile managed by $1example.com + + + Your browser and profile are managed + Tips for Brave @@ -2077,9 +2100,18 @@ are declared in tools/grit/grit_rule.gni. This file is being scanned. + + This file might be a virus or malware. You can send it to Brave to check if it's unsafe. + + + Scanning for malware... + This file could let attackers steal your personal information. + + This file might be a virus or malware. You can send it to Brave to check if it's unsafe. + Security checks are done @@ -2098,6 +2130,9 @@ are declared in tools/grit/grit_rule.gni. This file is encrypted. Ask its owner to decrypt. + + Scan failed. This file might be a virus or malware. + @@ -2166,6 +2201,9 @@ are declared in tools/grit/grit_rule.gni. Review + + Open anyway + @@ -2259,9 +2297,15 @@ are declared in tools/grit/grit_rule.gni. Scan + + Scan for malware + Open + + Open anyway + @@ -2525,6 +2569,25 @@ are declared in tools/grit/grit_rule.gni. + + + Recent Download History + + + Full Download History + + + + + Recent download history + + + Full download history + + + + Show full download history in a new tab + Recent Downloads @@ -2561,6 +2624,18 @@ are declared in tools/grit/grit_rule.gni. Scan is done + + Insecure download blocked + + + Suspicious download blocked + + + Dangerous download blocked + + + Unverified download blocked + Blocked @@ -2570,15 +2645,30 @@ are declared in tools/grit/grit_rule.gni. Suspicious + + Scan failed + I understand this download will harm my computer Continue download + + Download insecure file + + + Download suspicious file + + + Download unverified file + Delete + + Delete from history + $1bla.exe $2blocked dangerous more details @@ -2595,7 +2685,7 @@ are declared in tools/grit/grit_rule.gni. Scan for malware - Open anyway + Download anyway Open Now @@ -2606,6 +2696,9 @@ are declared in tools/grit/grit_rule.gni. Try again + + Open anyway + Out of storage space @@ -2654,11 +2747,32 @@ are declared in tools/grit/grit_rule.gni. Couldn’t finish download - - Insecure download + + This site isn't using a secure connection and the file may have been tampered with + + + This file is dangerous + + + This file is deceptive and may make unexpected changes to your device + + + This file type isn't commonly downloaded and it may be dangerous + + + This file isn't commonly downloaded and it may be dangerous + + + This file can't be verified because Safe Browsing is off - - This file may have been read or edited because this site isn't using a secure connection + + Learn why $1Brave blocks some downloads + + + $1Turn on Safe Browsing to make downloading files safer + + + Turn on Safe Browsing Dangerous @@ -2700,15 +2814,10 @@ are declared in tools/grit/grit_rule.gni. Your organization blocked this file because it is too big for a security check. You can open files up to 50 MB. - This file might be a virus or malware. - -You can send it to Brave to check if it's unsafe. Scans usually take a few seconds. + This file might be a virus or malware.$1You can send it to Google Safe Browsing to check if it's unsafe. Scans usually take a few seconds. - - Analysis done by $1Google Safe Browsing - - - Google Safe Browsing + + Learn more about malware scans This file might be a virus or malware @@ -2716,6 +2825,9 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Scanning for malware... + + Checking with your organization's security policies... + Delete file @@ -2824,6 +2936,9 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Retry $1bla.exe + + Open $1bla.exe anyway + Don't show when downloads finish @@ -2838,11 +2953,14 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon - - This file contains malware that can compromise your personal or social network accounts + + This file can harm your personal and social network accounts + + + This file can harm your personal and social network accounts, including $1john@google.com - - This file contains malware that can compromise your personal or social network accounts, including $1john@google.com + + This file may hide malware @@ -3315,6 +3433,9 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Notifications are automatically blocked for all sites except ones you allow + + Location requests are automatically blocked for all sites except ones you allow + Allow for this site @@ -3354,11 +3475,15 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Allow for this site - - - These sites can use info they’ve saved about you as you browse $1example.com. + + These sites can use info they've saved about you as you browse $1parent.com + + + Embedded content on this site can use info they've saved about you + + + Embedded content on this site can't use info they've saved about you - @@ -3398,6 +3523,81 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Cookies are files created by websites. There are two types of cookies: First-party cookies are created by the site you visit. The site is shown on the address bar. Third-party cookies are created by other sites. These sites own some of the content, like ads or images, that you see on the website you visit. + + + Third-party cookies blocked + + + Third-party cookies allowed + + + Site not working? + + + Try temporarily allowing third-party cookies, which means less protection but site features are more likely to work + + + Try allowing third-party cookies, which means less protection but site features are more likely to work + + + {COUNT, plural, + =0 {Brave will block cookies again today} + =1 {Brave will block cookies again tomorrow} + other {# days until Brave blocks cookies again}} + + + You allowed this site to use third-party cookies. This means that most site features should work, but you have less protection. + + + You allowed third-party cookies for this site + + + This means that most site features should work, but you have less protection + + + Send feedback + + + Help us improve Brave by telling us why you allowed third-party cookies + + + Reloading $1example.com... + + + Third-party cookies + + + Tell us why you allowed third-party cookies on this site + + + {COUNT, plural, + =1 {1 site blocked} + other {# sites blocked}} + + + {COUNT, plural, + =1 {1 site allowed} + other {# sites allowed}} + + + Third-party cookies allowed + + + Third-party cookies blocked + + + Third-party cookies blocked + + + If you visit a site that uses cookies, you may need to temporarily enable cookies to make all site features work. + + + Close + + + See how + + @@ -4604,6 +4804,9 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Read and change your bookmarks + + Read and change entries in the reading list + Read data you copy and paste @@ -5088,6 +5291,9 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Allow $13? + + Allowed + Click to allow "$1Extension A" on $2google.com @@ -5297,6 +5503,10 @@ You can send it to Brave to check if it's unsafe. Scans usually take a few secon Activate the extension + + Parent permission request failed. + + Select the root directory of the extension to pack. To update an extension, also select the private key file to reuse. @@ -5406,6 +5616,15 @@ Keep your key file in a safe place. You will need it to create new versions of y Uninstall + + + ''' • ''' + + + {NUM_EXTENSIONS, plural, + =1 {Remove extension?} + other {Remove # extensions?}} + "$1Extension Manager" would like to remove this extension. @@ -5644,7 +5863,10 @@ Keep your key file in a safe place. You will need it to create new versions of y Extensions - More actions + more options + + + Select to see more options for $1MyExtension Pin extension @@ -5691,6 +5913,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Extensions are blocked on this site + + Extensions installed by your administrator can still read and change sites + Extensions can request access to this site @@ -5886,6 +6111,35 @@ Keep your key file in a safe place. You will need it to create new versions of y + + {NUM_SUB_APP_INSTALLS, plural, + =1 {Install app?} + other {Install apps?} + } + + + + {NUM_SUB_APP_INSTALLS, plural, + =1 {"{APP_NAME}Citrix" ({DOMAIN}citrix.com) would like to install the following app on this device:} + other {"{APP_NAME}Citrix" ({DOMAIN}citrix.com) would like to install the following apps on this device:} + } + + + + {NUM_SUB_APP_INSTALLS, plural, + =1 {Permissions that you allow for "{APP_NAME}Citrix" will also be allowed for this app.} + other {Permissions that you allow for "{APP_NAME}Citrix" will also be allowed for these apps.} + } + + + + Install + + + + No thanks + + Customize and control $1GMail @@ -6104,6 +6358,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Quickly use a strong password + + Edit password + @@ -6121,6 +6378,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Quickly Use a Strong Password + + Edit Password + @@ -6256,6 +6516,20 @@ Keep your key file in a safe place. You will need it to create new versions of y App ($1com.netflix.mediaclient) + + Got it + + + $1Elisa Becket has shared a password with you for $2amazon.com. You can use it in the sign-in form. + + + There are passwords shared with you for $1amazon.com. You can use them in the sign-in form. + + + {NUM_PASSWORDS, plural, + =1 {New password for this site} + other {New passwords for this site}} + Save your passwords? @@ -6742,6 +7016,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Edit shortcut + + More actions for $1YouTube shortcut + *.jpeg, *.jpg, *.png @@ -6871,17 +7148,20 @@ Keep your key file in a safe place. You will need it to create new versions of y Color and theme - - Classic Brave + + Default Brave - + Brave Colors Change theme - - Reset to Classic Brave + + Reset to Default Brave + + + Follow device colors Uploaded image @@ -6943,6 +7223,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Default color + + Grey default color + Color based on theme @@ -7012,6 +7295,36 @@ Keep your key file in a safe place. You will need it to create new versions of y Dark purple + + Blue + + + Grey + + + Aqua + + + Green + + + Viridian + + + Citron + + + Apricot + + + Rose + + + Fuchsia + + + Violet + You won't see this specific message again @@ -7025,7 +7338,13 @@ Keep your key file in a safe place. You will need it to create new versions of y Dark - System + Device + + + You can find older colors in the Web Store + + + Find themes @@ -7044,9 +7363,15 @@ Keep your key file in a safe place. You will need it to create new versions of y Hide $1Office Chairs - + Never show $1shopping suggestions + + Don't show $1shopping suggestions + + + More actions for $1shopping suggestions + Customize cards @@ -7158,12 +7483,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Super Duper Module - - Even Better Module - From your Google Drive + + From Your Drive + You’re seeing suggested files to help you easily get back to your most recent activity in Google Drive. <br> @@ -7368,21 +7693,36 @@ Keep your key file in a safe place. You will need it to create new versions of y <br> You can manage settings from the card menu or see more options in Customize Brave. + + You’re seeing suggested searches and shopping discounts that might interest you based on your recent activity. + <br> + <br> + You can manage settings from this card anytime or see more options in Customize Brave. + Journeys this type of card + + No longer interested + Journeys card this card + + Mark as done and hide + Open all in new tab group + + Open in side panel + Show all searches for $1Office Chairs @@ -7639,7 +7979,7 @@ Keep your key file in a safe place. You will need it to create new versions of y No results found - There are no bookmarks that match your search. + There are no bookmarks that match your search ($11) @@ -7737,6 +8077,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Select + + Results found in $1All Bookmarks + + + In other folders + @@ -7761,6 +8107,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Text formatting + + Display + + + Font size + Font @@ -7771,7 +8123,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Increase font-size - Theme + Color theme Line height @@ -7812,6 +8164,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Getting ready + + Back + To show a simplified view of this page, open the side panel and select Reading mode @@ -8011,6 +8366,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Can't save card right now + + Save CVC + Save IBAN @@ -8099,6 +8457,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Get Started + + No Thanks + @@ -8110,15 +8471,18 @@ Keep your key file in a safe place. You will need it to create new versions of y Get started + + No thanks + You can access it on Brave Password Manager. - - To use your saved passwords on your phone, download Brave for iOS and sync your account. + + To use your saved passwords on your phone, download Brave for iOS and sign in to your Brave sync chain. - - To use your saved passwords on your phone, follow the QR code, download Brave for iOS and sync your account. + + To use your saved passwords on your phone, follow the QR code, download Brave for iOS and sign in to your Brave sync chain. @@ -8281,6 +8645,22 @@ Keep your key file in a safe place. You will need it to create new versions of y Brave tip + + See what extensions can read or change a site + + + From here, you can see and manage extension permissions for the site you're on + + + {NUM_EXTENSIONS, plural, + =1 {Choose if this extension can read or change this site} + other {Choose if these extensions can read or change this site}} + + + {NUM_EXTENSIONS, plural, + =1 {To manage it, open Extensions} + other {To manage them, open Extensions}} + New! Control your music, videos, and more. @@ -8438,6 +8818,17 @@ Keep your key file in a safe place. You will need it to create new versions of y Try using the side panel for bookmarks, journeys, and more + + + Brave theme colors have been refreshed to work better for everyone, whether you’re in dark or light mode + + + Customize the appearance of Brave and this page + + + Customize themes + + Customize Brave to give your browser a new look @@ -8465,6 +8856,16 @@ Keep your key file in a safe place. You will need it to create new versions of y Open the menu + + + Click “Passwords and Autofill” + + + + + Click “Passwords and autofill” + + Click “Settings” @@ -8677,6 +9078,9 @@ Check your passwords anytime in $1Brave P Protect your passwords + + New password received + Import Passwords To Brave @@ -8995,10 +9399,22 @@ Check your passwords anytime in $1Brave P None available + + + A site is playing media + + (Brave error pages) + + Embedded content + + + Go to embedded content settings + + @@ -9231,6 +9647,9 @@ Check your passwords anytime in $1Brave P Close tabs to the left + + Close all tabs + Focus this tab @@ -9326,6 +9745,9 @@ Check your passwords anytime in $1Brave P Close Tabs to the Left + + Close All Tabs + Focus This Tab @@ -9506,6 +9928,9 @@ Check your passwords anytime in $1Brave P Save group + + Unsave group + New tab in group @@ -9535,6 +9960,9 @@ Check your passwords anytime in $1Brave P Save Group + + Unsave Group + New Tab in Group @@ -9809,7 +10237,10 @@ Check your passwords anytime in $1Brave P Your administrator recommends a specific value for this setting. - This setting can't be changed by a child user. + This setting isn't available for your account. + + + This setting is managed by a parent. @@ -10495,6 +10926,18 @@ Check your passwords anytime in $1Brave P Your <a href="$1">browser is managed</a> by $2example.com + + Your <a href="$1">profile is managed</a> by $2example.com + + + Your <a href="$1">browser is managed</a> by your organization and your <a href="$1">profile is managed</a> by $2bar.com + + + Your <a href="$1">browser is managed</a> by $2foo.com and your <a href="$1">profile is managed</a> by $3bar.com + + + Your <a href="$1">browser and profile are managed</a> by $2google.com + Your <a href="$1">browser is managed</a> by your parent @@ -10817,23 +11260,23 @@ Check your passwords anytime in $1Brave P - Share device signals? + Share information about your device? - Share signals + Share - Close profile + Decline and close profile - This profile is managed by $1example.com. To continue using this managed profile, your organization requires you to share your device signals. + To use your device with your $1example.com profile, your organization needs information about the device. -Device signals can include information about your browser, OS, device, installed software, and files. +This can include information about installed software, files, your browser, and the device’s operating system. - This profile is managed by your organization. To continue using this managed profile, your organization requires you to share your device signals. + To use your device with your organization profile, your organization needs information about the device. -Device signals can include information about your browser, OS, device, installed software, and files. +This can include information about installed software, files, your browser, and the device’s operating system. @@ -12649,6 +13092,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Linux apps + + Bruschetta apps + @@ -12693,6 +13139,18 @@ Please help our engineers fix this problem. Tell us what happened right before y Also share system audio. This device will be muted to prevent feedback. + + Also share system audio + + + Also share tab audio + + + To share audio, share a tab instead + + + To share audio, share a tab or screen instead + Entire Screen @@ -13059,6 +13517,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Extensions + + Display + File Info @@ -13090,13 +13551,19 @@ Please help our engineers fix this problem. Tell us what happened right before y - + HID settings About HID devices + + USB settings + + + About USB devices + @@ -13105,9 +13572,15 @@ Please help our engineers fix this problem. Tell us what happened right before y =2 {Extensions accessing devices: {1}Brave Translate, {2}Secure Shell} other {Extensions accessing devices: {1}Brave Translate, {2}Secure Shell +{3} more}} + + {NUM_EXTENSION, plural, + =1 {{1}Brave Translate is accessing USB devices} + =2 {Extensions accessing devices: {1}Brave Translate, {2}Secure Shell} + other {Extensions accessing devices: {1}Brave Translate, {2}Secure Shell +{3} more}} + - + {NUM_CONNECTION, plural, =0 {Extension "{1}Brave Translate" was accessing devices} =1 {Extension "{1}Brave Translate" is accessing {0} device} @@ -14239,6 +14712,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Please enter a reason for uploading this data: + + Please enter a reason for downloading this data: + $110/$2280 @@ -14384,6 +14860,16 @@ Please help our engineers fix this problem. Tell us what happened right before y other {Uninstalling "{APP_NAME}Citrix" will also uninstall these apps:}} + + {NUM_SUB_APPS, plural, + =1 {{APP_NAME}Citrix uninstalled an app} + other {{APP_NAME}Citrix uninstalled # apps}} + + + + Go to the "{APP_NAME}Citrix" app to manage installed and streamed apps + + Speech recognition service @@ -14533,7 +15019,7 @@ Please help our engineers fix this problem. Tell us what happened right before y - Select image area to search + Select an area to search with Lens @@ -14938,21 +15424,29 @@ Please help our engineers fix this problem. Tell us what happened right before y - - - + + + Lorem ipsum dolor sit amet - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore. + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + + + labore - - First button + + Button - - Second button + + Lorem ipsum dolor sit amet + + + + Protected Audiences Debugging is enabled. + diff --git a/app/generated_resources_override.grd b/app/generated_resources_override.grd index 4803d71625df..451c7a6ea4c9 100644 --- a/app/generated_resources_override.grd +++ b/app/generated_resources_override.grd @@ -109,6 +109,9 @@ are declared in tools/grit/grit_rule.gni. + + + @@ -333,6 +336,10 @@ are declared in tools/grit/grit_rule.gni. + + + + @@ -603,6 +610,9 @@ are declared in tools/grit/grit_rule.gni. + + You can find older colors in the Web Store + See memories of your favorite profiles and more @@ -691,6 +701,10 @@ are declared in tools/grit/grit_rule.gni. + + + + @@ -1223,8 +1237,9 @@ are declared in tools/grit/grit_rule.gni. - + - + + diff --git a/app/nearby_share_strings.grdp b/app/nearby_share_strings.grdp index 9ddfafe6d29d..209985474b26 100644 --- a/app/nearby_share_strings.grdp +++ b/app/nearby_share_strings.grdp @@ -35,15 +35,24 @@ Your contacts can share with you when they are nearby. Transfers won't start until you accept. + + Contacts can share with you when they're nearby. You'll be asked to approve these requests. You won't need to approve sharing between devices that are signed into $1example@gmail.com. + No one can share with you until you make yourself visible.<br><br>To make yourself visible temporarily, open the status area, then turn on Nearby visibility. Selected contacts can share with you when nearby. Transfers won't start until you accept. + + Selected contacts can share with you when they're nearby. You'll be asked to approve these requests. You won't need to approve sharing between devices that are signed into $1example@gmail.com. + Your device visibility controls who can share with you while your screen is unlocked. <a>Learn more</a> + + Only devices that are signed into $1example@gmail.com can share with this device. You won't need to approve sharing between your devices. + @@ -269,8 +278,11 @@ Nearby Share settings for $1Jane Doe's device, sharing under the account $2example@gmail.com. - - To use Nearby Share, make sure both devices are unlocked, close together, and have Bluetooth turned on. If you’re sharing with a Chromebook that is not in your contacts, make sure it has Nearby visibility turned on (open the status area by selecting the time, then turn on Nearby visibility) <a>Learn more</a> + + Nearby Share uses Bluetooth scanning to find nearby devices. + + + If you're sharing with a Chromebook that is not in your contacts, make sure the Chromebook has “Nearby visibility” turned on. To turn on “Nearby visibility,” select the bottom right corner and then select to turn on “Nearby visibility.” <a>Learn more</a> All contacts @@ -278,12 +290,21 @@ Current visibility setting is all contacts + + Contacts + Some contacts Current visibility setting is some contacts + + Your devices + + + Current visibility setting is your devices + Hidden diff --git a/app/os_settings_search_tag_strings.grdp b/app/os_settings_search_tag_strings.grdp index 60e19dca5885..5e3bc3afc7a8 100644 --- a/app/os_settings_search_tag_strings.grdp +++ b/app/os_settings_search_tag_strings.grdp @@ -1196,6 +1196,9 @@ Speech synthesis + + TTS + ChromeVox (spoken feedback) @@ -1413,6 +1416,24 @@ Get image descriptions from Brave + + Color correction + + + Color filters + + + Color blindness + + + Protanomaly + + + Deuteranomaly + + + Tritanomaly + diff --git a/app/os_settings_strings.grdp b/app/os_settings_strings.grdp index c05b35f51d65..5b34dd16504f 100644 --- a/app/os_settings_strings.grdp +++ b/app/os_settings_strings.grdp @@ -184,6 +184,9 @@ See what's new + + Automatic updates provide you with the latest features. Explore highlights from recent updates. + Edit device name @@ -244,9 +247,27 @@ Diagnostics + + Test your battery, CPU, memory, connectivity, and more + Firmware updates + + Firmware is up to date + + + Update available + + + Share feedback or report an issue + + + Get help + + + View help articles or find device support + Updates @@ -821,11 +842,51 @@ Colemak + + + Shorthand typing + + + Use modern tone mark placement + + + For example, use oà, oè, uỳ instead of òa, òe, ùy + + + Flexible typing + + + Allow flexible diacritic assignment. For example, you can type “anhs” or “asnh” to get “ánh”. + + + Allow flexible diacritic assignment. For example, you can type “anh1” or “a1nh” to get “ánh”. + + + Show underline for composition text + + + Not supported by some apps + + + Type "uo7" to get "ươ" + + + Type "uow" to get "ươ" + + + Type "w" to get "ư" + Enable reverse scrolling. <a>Learn more</a> + + Reverse scrolling <a>Learn more</a> + + + Swipe up to move the page down + Device @@ -834,9 +895,15 @@ Personalization + + Wallpaper and style + Set your wallpaper & style + + Personalize wallpaper, screen saver, accent colors, and more + Personalize wallpaper, screen saver, accent colors, and more @@ -900,75 +967,104 @@ Disconnect Google Drive account - - - Google Drive + + Clean up storage - - Disabled + + Clean up offline storage? - - Disconnect + + This will remove $15.0 GB of space used by your offline files. Some files will still be available offline. <a target="_blank" href="$2https://google.com/">Learn more</a> - - Connect account + + Can’t clean up storage while file sync is on - + + Can’t clean up storage until offline storage size is known. + + Signed in as <strong>$1john@google.com</strong> - - Disconnected from <strong>$1john@google.com</strong> + + File sync - - Keep your files available when you're offline + + Your files in My Drive sync to your Chromebook automatically so you can access them without an internet connection. - - This will store your Google Drive files on this Chromebook so you can view and edit them without an internet connection. + + Your files in My Drive sync to your Chromebook automatically so you can access them without an internet connection. This will use about $112.2 GB. You currently have $296.7 GB available. - - This will use about $112.2 GB leaving $296.7 GB available. + + Offline storage - - Offline Storage + + Using $110 GB - - Calculating... + + Turn off - - Unknown + + Turn off file sync? - - Clear offline storage + + New files in My Drive will stop syncing automatically to this Chromebook - - Clear offline storage? + + Remove Drive access - - This will remove $15.0 GB of space used by your offline files. + + Remove Google Drive access? - - Turn off + + This will remove access to Google Drive on this Chromebook, including access to any files that have been made available offline + + + Remove - - Are you sure you want to turn off automatic syncing? + + Something went wrong - - New Google Drive files will no longer be synced automatically, but files that are already synced will remain available. + + Try again later - - Can’t clean up storage while files are automatically syncing. + + You are currently offline - - Low disk space + + For initial setup, you need to connect to the internet so files can sync to your Chromebook + + + Not enough storage space + + + There isn’t enough storage to sync your files. Try freeing up space. + + + Dismiss - - Cannot enable this feature due to insufficient disk space. + + OK + + + Not signed in + + + File sync on + + + Connect <strong>$1john@google.com</strong> to access your Drive files in the Files app + + + Connect + + + Calculating... - - An unexpected error occurred + + Unknown - - Cannot enable this feature as an unexpected error has occurred. + + Google Drive Network file shares @@ -1104,10 +1200,10 @@ Turn light screens dark, and dark screens light. Press Search + Ctrl + H to turn color inversion on and off. - + Color correction - + Adjust how colors display on your screen @@ -1134,31 +1230,31 @@ 100 - + Adjust the color correction settings to make sure colors are distinct - + Red - + Orange - + Yellow - + Green - + Cyan - + Blue - + Purple - + Gray @@ -1427,6 +1523,12 @@ Use Ctrl + Alt + Brightness down to zoom out. Enable tap dragging + + Tap and drag to move items + + + Double-tap an item, hold down on the second tap, and then drag the item to move it + Automatic clicks @@ -2032,9 +2134,12 @@ Press an assigned switch or key to remove assignment. Display and magnification - + Color inversion, magnifier, and display settings + + Color inversion, color correction, magnifier, and display settings + Keyboard and text input @@ -2186,7 +2291,7 @@ Press an assigned switch or key to remove assignment. Only supported devices are shown. - + Available USB devices will appear here. @@ -2212,6 +2317,9 @@ Press an assigned switch or key to remove assignment. Linux development environment + + Set Up + Shared folders are available in Linux at $1/mnt/chromeos. @@ -2473,6 +2581,9 @@ Press an assigned switch or key to remove assignment. Run Linux tools, editors, and IDEs on your $1Chromebook. <a target="_blank" href="$2https://google.com/">Learn more</a> + + Run developer tools, IDEs, and editors. <a target="_blank" href="$1https://google.com/">Learn more</a> + Linux is not supported on your $1Chromebook. <a target="_blank" href="$2https://google.com/">Learn more</a> @@ -2495,28 +2606,28 @@ Press an assigned switch or key to remove assignment. - Bruschetta + Managed Development Environment ($1HappyVm) - Give Bruschetta permission to access USB devices. Bruschetta won't remember a USB device after it's removed. + Give $1HappyVm permission to access USB devices. $1HappyVm won't remember a USB device after it's removed. - - - Shared folders are available in Bruschetta at $1/mnt/chromeos. + + Shared folders are available in $1HappyVm at $2/mnt/chromeos. - - To share, right-click on a folder in Files app, then select "Share with Bruschetta". + + To share, right-click on a folder in Files app, then select "Share with $1HappyVm". - - Couldn't unshare because an application is using this folder. The folder will be unshared when Bruschetta is next shut down. + + Couldn't unshare because an application is using this folder. The folder will be unshared when $1HappyVm is next shut down. - Run Bruschetta on your device. + Run tools, editors, and IDEs in an environment managed by your enterprise on your $1Chromebook. <a target="_blank" href="$2https://google.com/">Learn more</a> + + + Run tools, editors, and IDEs in an environment managed by your enterprise on your $1Chromebook. - Remove Bruschetta + Remove Managed Development Environment ($1HappyVm) Remove @@ -2586,11 +2697,22 @@ Press an assigned switch or key to remove assignment. Loading apps... - + Graphics tablet + + Customize tablet buttons + + + Customize pen buttons + + + + + Customize mouse buttons + @@ -2932,9 +3054,15 @@ Press an assigned switch or key to remove assignment. Touchpad - + Enable tap-to-click + + Tap to click + + + To click, tap your touchpad instead of pressing it + Touchpad speed @@ -2953,12 +3081,23 @@ Press an assigned switch or key to remove assignment. TrackPoint speed - - Mouse scroll speed + + + Scrolling speed + + + + Mouse cursor + + + Mouse scrolling Swap primary mouse button + + Primary mouse button + Primary TrackPoint button @@ -2971,11 +3110,30 @@ Press an assigned switch or key to remove assignment. Enable reverse scrolling. <a>Learn more</a> - + + Reverse scrolling <a>Learn more</a> + + + Scroll up to move the page down + + Enable mouse acceleration - - Enable mouse scroll acceleration + + Mouse acceleration + + + Faster movements with your mouse will move the cursor farther + + + + Enable scroll acceleration. <a>Learn more</a> + + + Cursor speed + + + Enable cursor acceleration Enable TrackPoint acceleration @@ -2983,6 +3141,12 @@ Press an assigned switch or key to remove assignment. Enable touchpad acceleration + + Touchpad acceleration + + + Faster movements on your touchpad will move the cursor farther + Enable touchpad scroll acceleration @@ -3007,24 +3171,99 @@ Press an assigned switch or key to remove assignment. Learn more - + Use touchpad and keyboard to right-click - - Off + + disabled - + search + click - + + launcher + click + + alt + click - - Modifier keys + + Select an action for each key + + + Select a shortcut for each action + + + insert + + + home + + + end + + + page up + + + page down + + + delete + + + alt + backspace + + + search + backspace + + + launcher + backspace + + + ctrl + alt + up arrow + + + search + left arrow + + + launcher + left arrow + + + ctrl + alt + down arrow + + + search + right arrow - - Other keys + + launcher + right arrow + + + search + shift + backspace + + + launcher + shift + backspace + + + alt + down arrow + + + search + down arrow + + + launcher + down arrow + + + alt + up arrow + + + search + up arrow + + + launcher + up arrow + + + disabled @@ -3043,20 +3282,20 @@ Press an assigned switch or key to remove assignment. Add printer - + Add printer manually Save detected printers to your profile, or add a new printer. <a>Learn more</a> - - Connected printers will automatically appear here and ready to use or save to your profile. + + These printers are connected and ready to use. Save to your profile for easier access. Add printers to your profile - - Available printers ready to use + + Other available printers There are $13 printers available to save. @@ -3091,23 +3330,17 @@ Press an assigned switch or key to remove assignment. Set up - - Set up $1HP OfficeJet 500 - Save - - Save $1HP OfficeJet 500 - Search printers Your saved printers - - Saved printers will appear here for easier managing and access. + + Easily access and manage printers You have $13 saved printers. @@ -3121,11 +3354,11 @@ Press an assigned switch or key to remove assignment. No saved printers - - Don't see your printers below? + + Don’t see your printer? - - Make sure your printer is connected to the same Wi-Fi network as your Chromebook or via a USB cable. For more help, check compatibility and help information. + + Make sure your printer is connected to the same Wi-Fi network as your Chromebook or use a USB cable. <a>Learn more about compatibility</a> Show more @@ -3346,48 +3579,54 @@ Press an assigned switch or key to remove assignment. Scan documents and images - + + Mechanical issue. Check printer - + Printer door is open - + Low on ink - + Low on paper - - Out of ink + + Out of ink - + Out of paper - + Output tray is almost full - + Output tray is full - + Paper is jammed - + Printer is paused - + Printer queue is full - - Can’t connect to printer + + Not connected to printer - + Printer has stopped - + Tray is missing + + $1HP 3100 $2Low on ink. Printer $32 of $44. + @@ -3436,7 +3675,7 @@ Press an assigned switch or key to remove assignment. Hotspot details - Uses your Chromebook’s mobile data and your carrier may charge additional fees. May increase battery usage. <a target="_blank" href="$1">Learn more</a> + Uses your $1Chromebook’s mobile data and your carrier may charge additional fees. May increase battery usage. <a target="_blank" href="$2">Learn more</a> Your mobile data may not support hotspot. <a target="_blank" href="$1">Learn more</a> @@ -3450,9 +3689,15 @@ Press an assigned switch or key to remove assignment. On + + Turning On... + Off + + Turning off... + Hotspot enabled @@ -3475,10 +3720,10 @@ Press an assigned switch or key to remove assignment. When no devices are connected - Hotspot Settings + Configure $1Chromebook Hotspot - Create a Wi-Fi hotspot to provide internet to other deivces. <a target="_blank" href="$1">Learn more</a> + Create a Wi-Fi hotspot using your $1Chromebook's mobile data to provide internet to other devices. <a target="_blank" href="$2">Learn more</a> Hotspot name @@ -3486,6 +3731,12 @@ Press an assigned switch or key to remove assignment. This will be visible to others + + Name cannot be empty + + + Name cannot exceed 32 characters + Password @@ -3567,6 +3818,9 @@ Press an assigned switch or key to remove assignment. Preferred networks will be preferred over other known networks if more than one is available + + Preferred networks will be used if more than one previous network is available + Preferred networks @@ -3759,6 +4013,9 @@ Press an assigned switch or key to remove assignment. Prefer this network + + This network will be preferred if more than one previously connected or configured network is available + Network configuration is controlled by $1joe@gmail.com. @@ -3810,6 +4067,9 @@ Press an assigned switch or key to remove assignment. You are sharing this network with other users of this device + + Other users on this device can also use this network + This network is shared with you @@ -4391,8 +4651,17 @@ Press an assigned switch or key to remove assignment. Lock screen from sleep mode + + Remove + + + PIN + - Set up PIN + Set up + + + Sign-in options Lock screen @@ -4752,6 +5021,9 @@ Press an assigned switch or key to remove assignment. Displays + + Display + Drag or use arrow keys to move a display @@ -5443,6 +5715,9 @@ Press & hold keyboard keys to see accent marks and special characters. This Allow access for apps and websites with the camera permission + + Allow apps and webpages to use the camera(s) connected to this device. If you still have a problem with your camera, try restart the app or refresh the webpage. + No camera @@ -5491,5 +5766,10 @@ Press & hold keyboard keys to see accent marks and special characters. This Off + + + + System Preferences + diff --git a/app/password_manager_ui_strings.grdp b/app/password_manager_ui_strings.grdp index 6357c19e09ec..cf9eace47b42 100644 --- a/app/password_manager_ui_strings.grdp +++ b/app/password_manager_ui_strings.grdp @@ -52,6 +52,45 @@ Share + + Your password wasn’t shared. Check your internet connection and make sure you’re signed in to Brave. Then, try again. + + + Something went wrong + + + Sharing password + + + Password shared + + + Password was not shared + + + For now, you can only share passwords with family members. <a href="$1" target="_blank">Create a family group</a> with up to 6 members, and get more from your products and subscriptions across Brave. + + + When you share a copy of your <b>username</b> and <b>password</b>, your family member can fill them using Brave Password Manager + + + Manage family + + + Your family member can't receive passwords right now. Ask them to update Brave and sync their passwords. + + + Not available + + + Try again + + + Got it + + + Share a copy of your password for $1website.com + Import passwords diff --git a/app/printing_strings.grdp b/app/printing_strings.grdp index 9dfc4c682dd8..78d61902aa2f 100644 --- a/app/printing_strings.grdp +++ b/app/printing_strings.grdp @@ -190,6 +190,9 @@ Paper size + + Paper type + Quality @@ -263,6 +266,21 @@ These settings are enforced by your administrator + + Manage printers + + + Manage your printers in printer settings + + + Make sure your printer is turned on and connected to the same network as your Chromebook or use a USB cable + + + No printer available + + + Not connected to printer + Save to Google Drive @@ -287,6 +305,10 @@ End User License Agreement + Mechanical issue. Check printer @@ -321,7 +343,7 @@ Printer queue is full - Can’t connect to printer + Not connected to printer Printer has stopped diff --git a/app/profiles_strings.grdp b/app/profiles_strings.grdp index a9b6aa9f7b31..24f9c2705d1c 100644 --- a/app/profiles_strings.grdp +++ b/app/profiles_strings.grdp @@ -43,12 +43,6 @@ Paused - - - $1It may have mature content. - I don't think this site should be blocked! - - Profiles @@ -605,8 +599,8 @@ Browsing history - - Passwords + + Sign-in methods Bookmarks @@ -623,27 +617,15 @@ Continue without an account + Customize avatar - - Pick a theme color - Pick an avatar - - Done - - - Done - - - Add a name or a label like Work, Personal, or Kids - - - Create a desktop shortcut - Take a tour @@ -773,5 +755,19 @@ + + + Set your default browser + + + Get Brave Search and Brave smarts every time you browse + + + Set as default + + + Skip + + diff --git a/app/profiles_strings_override.grdp b/app/profiles_strings_override.grdp index ebec491a26e9..35a280bf770c 100644 --- a/app/profiles_strings_override.grdp +++ b/app/profiles_strings_override.grdp @@ -70,5 +70,5 @@ - + diff --git a/app/settings_brave_strings.grdp b/app/settings_brave_strings.grdp index 4daaf4706cd6..a88103b788ac 100644 --- a/app/settings_brave_strings.grdp +++ b/app/settings_brave_strings.grdp @@ -146,8 +146,8 @@ Sites will probably work as you expect but won't remember you after you close all Brave windows - - Always clear site data from your device when you close Brave + + Always delete site data from your device when you close Brave @@ -166,9 +166,15 @@ Choose whether to include Brave history for more personalized experiences in Brave services + + If you also save your bookmarks in your Brave sync chain, you can track product prices in Brave and get notified when the price drops + If you also share Brave usage reports, those reports include the URLs you visit + + Depending on your settings, Brave may also send cookies and your current URL + @@ -331,4 +337,9 @@ Information about how Brave manages its root certificates + + + + Brave regularly checks to make sure your browser has the safest settings. We'll let you know if anything needs your review. + diff --git a/app/settings_brave_strings_override.grdp b/app/settings_brave_strings_override.grdp index 22bdd826f4ad..cb2facac4375 100644 --- a/app/settings_brave_strings_override.grdp +++ b/app/settings_brave_strings_override.grdp @@ -51,4 +51,5 @@ - + + diff --git a/app/settings_strings.grdp b/app/settings_strings.grdp index 9e60619856a1..60998ba3cd8d 100644 --- a/app/settings_strings.grdp +++ b/app/settings_strings.grdp @@ -48,6 +48,10 @@ Report an issue + + Privacy policy + + Send feedback @@ -129,21 +133,19 @@ Automatically translates captions - + Automatically creates captions for media in Brave browser (currently available in English). Audio and captions are processed locally and never leave the device. - + Automatically creates captions for media in Brave browser. Audio and captions are processed locally and never leave the device. - - - Automatically creates captions for English audio and video. Audio and captions never leave your device. - - - Automatically creates captions for audio and video. Audio and captions never leave your device. - - + + Automatically creates captions for English audio and video. Audio and captions never leave your device. + + + Automatically creates captions for audio and video. Audio and captions never leave your device. + Downloading speech recognition files... $117% @@ -156,6 +158,9 @@ Can't install speech files. Your device needs to be updated. Restart your device and try again. + + Hide profanity + Navigate pages with a text cursor @@ -231,6 +236,9 @@ Brave Colors + + Mode + Show home button @@ -388,9 +396,6 @@ Title - - Type - Enable Autofill to fill out forms in a single click @@ -418,9 +423,6 @@ Edit in Google Pay - - (Virtual card enabled) - Virtual card turned on @@ -685,9 +687,12 @@ Automatically sign in to sites and apps using saved credentials. If turned off, you'll be asked for confirmation every time before signing in to a site or app. - + Warn you if passwords are exposed in a data breach + + Warn you if a password was compromised in a data breach + When you sign in to your Brave sync chain, this feature is turned on. @@ -1409,7 +1414,7 @@ Browsing history - Signs you out of most sites. + Signs you out of most sites Signs you out of most sites. You'll stay signed in to your Brave sync chain so your synced data can be cleared. @@ -1645,9 +1650,6 @@ Websites will show content in your preferred languages, when possible - - Offer to translate pages in this language - Use Brave Translate @@ -2075,7 +2077,7 @@ When on, a list of sites you visit that guess your interests appears here - It can take up to a week for a list of sites to appear here based on your browsing history + No sites to show right now List of recent sites you visited that can suggest ads to other sites as you keep browsing @@ -2226,10 +2228,10 @@ You'll browse faster because content is proactively loaded based on your current webpage visit - You'll get improved suggestions in the address bar + From the address bar, you can open page info to see additional info about the page you're visiting - URLs you visit are sent to Brave to predict what sites you might visit next + URLs you visit are sent to Brave to predict what sites you might visit next and to show you additional info about the page you're visiting Choose whether to sync history @@ -2291,6 +2293,15 @@ Detects and warns you about dangerous events when they happen + + Choose whether to get additional search suggestions + + + When you click or type in the address bar or search box, you'll see suggestions from your default search engine. This is off in Private. + + + What you type in the address bar or search box is sent to your default search engine + @@ -2403,6 +2414,14 @@ Permissions allowed again for $1www.example.com + + + Automatically remove permissions from unused sites + + + + To protect your data, remove permissions from sites you haven't visited in 2 months. Doesn't stop notifications. + Updates @@ -2586,6 +2605,9 @@ Standard protection against websites, downloads, and extensions that are known to be dangerous + + Protects against sites, downloads, and extensions that are known to be dangerous. If a page does something suspicious, URLs and bits of page content are sent to Google Safe Browsing. + Show standard protection details @@ -3239,7 +3261,7 @@ Not allowed to use your microphone - Sites usually connect to MIDI devices for features for creating and editing music + Sites usually connect to MIDI devices for creating and editing music Sites can ask to connect to MIDI devices @@ -3720,7 +3742,7 @@ Remove - Clear on exit + Delete on exit Usage @@ -3759,19 +3781,16 @@ Reset permissions - Clear data - - - Clear data + Delete data Including third-party cookies on this site - - Clear all data? + + Delete all data? - - Clear displayed data? + + Delete displayed data? These sites are in a group defined by $1google.com. Sites in a group can see your activity in the group. @@ -3785,11 +3804,11 @@ Total storage used by displayed sites: $18 GB - - Clear all data + + Delete all data - - Clear displayed data + + Delete displayed data Show site details for $1google.com @@ -3805,20 +3824,20 @@ Show sites in same group - - Clear data and permissions + + Delete data and permissions - - This will clear $18 GB of data stored by sites + + This will delete $18 GB of data stored by sites - - This will clear $18 GB of data stored by displayed sites + + This will delete $18 GB of data stored by displayed sites - - This will clear $18 GB of data stored by sites and installed apps + + This will delete $18 GB of data stored by sites and installed apps - - This will clear $18 GB of data stored by displayed sites and installed apps + + This will delete $18 GB of data stored by displayed sites and installed apps You'll be signed out of all sites, including in open tabs @@ -3829,8 +3848,8 @@ Reset site permissions for $1www.example.com? - - Clear site data? + + Delete site data? All data stored by $1www.example.com will be deleted. @@ -3841,32 +3860,32 @@ You’ll be signed out of this site, including in open tabs - - Any offline data will be cleared + + Any offline data will be deleted Data that affects ad personalization is deleted - - Any offline data will be cleared + + Any offline data will be deleted - Clear site data and permissions for $1www.example.com? + Delete site data and permissions for $1www.example.com? - Clear site data and permissions for $1www.example.com and its installed app? + Delete site data and permissions for $1www.example.com and its installed app? - Clear site data for $1www.ad-tech.com partitioned on $2www.publisher.com? + Delete site data for $1www.ad-tech.com partitioned on $2www.publisher.com? - Clear site data and permissions for $1www.example.com and all sites under it? + Delete site data and permissions for $1www.example.com and all sites under it? - Clear site data and permissions for $1www.example.com, all sites under it, and its installed app? + Delete site data and permissions for $1www.example.com, all sites under it, and its installed app? - Clear site data and permissions for $1www.example.com, all sites under it, and installed apps? + Delete site data and permissions for $1www.example.com, all sites under it, and installed apps? You'll be signed out of this site, including in open tabs @@ -3875,13 +3894,13 @@ You'll be signed out of these sites, including in open tabs - Any offline data will be cleared + Any offline data will be deleted - Your chosen permissions will be reset + Your chosen permissions will be removed - Clear + Delete Remove $1google.com @@ -3890,7 +3909,7 @@ Reset - Clear + Delete Default @@ -3946,8 +3965,14 @@ Sites aren't allowed to save data on your device - - Site data is cleared from your device when you close all windows + + Site data is deleted from your device when you close all windows + + + {COUNT, plural, + =0 {Expires today} + =1 {Expires tomorrow} + other {Expires in # days}} @@ -4004,21 +4029,38 @@ - - - Sites you visit can embed content from other sites, for example images, ads, and text. These other sites can ask for permission to use info they’ve saved about you as you browse the site. + + Sites you visit can embed content from other sites, for example images, ads, and text. These other sites can ask for permission to use info they've saved about you as you browse the site. + + + Sites can ask to use info they've saved about you - - Sites can ask to use info they’ve saved about you + + Sites are blocked from asking you to use info they've saved about you - - Sites are blocked from asking you to use info they’ve saved about you + + You allowed these sites to use info they've saved about you - - Allowed to access info they've about you while embedded in another site + + You blocked these sites from using info they've saved about you + + + Remove $1google.com - - Not allowed to access info they've about you while embedded in another site + + Remove $1embedding.com from $2top-level.com + + + Show sites + + + Show less + + + can use your info as you browse + + + is blocked from using your info on @@ -4602,4 +4644,21 @@ $1Google Docs Offline (ID: $2ghbmnnjooekpmoecnnnilnnbdlolhkhi) + + + + Safety Hub + + + Go to Safety Hub + + + Safety at a glance + + + Safety recommendation + + + Safety tips + diff --git a/app/settings_strings_override.grdp b/app/settings_strings_override.grdp index e098459bdc2c..0e11477d14c5 100644 --- a/app/settings_strings_override.grdp +++ b/app/settings_strings_override.grdp @@ -23,8 +23,6 @@ - - @@ -127,6 +125,9 @@ When you’re in Private mode, sites can only use cookies to see your browsing activity on their own site. Cookies are deleted at the end of the Private session. + + When you click or type in the address bar or search box, you'll see suggestions from your default search engine. This is off in Private. + {NUM_EXTENSIONS, plural, =1 {Review <b>1 extension</b> that was taken down from the Web Store} diff --git a/app/shared_settings_strings.grdp b/app/shared_settings_strings.grdp index acea8b1a90df..acd69f8dafdd 100644 --- a/app/shared_settings_strings.grdp +++ b/app/shared_settings_strings.grdp @@ -305,6 +305,9 @@ Open tabs + + Saved tab groups + Wi-Fi networks diff --git a/app/support_tool_strings.grdp b/app/support_tool_strings.grdp new file mode 100644 index 000000000000..ea6f46e99684 --- /dev/null +++ b/app/support_tool_strings.grdp @@ -0,0 +1,222 @@ + + + + + + + Step 1 of 4: Describe the issue + + + Step 2 of 4: Select diagnostics data to export + + + Step 3 of 4: Review personally identifiable information + + + Step 4 of 4: Diagnostics data is exported + + + Data has been exported into the selected location + + + Support Case ID + + + Email Address + + + Describe the issue + + + Provide a clear desciption of the issue and steps to reproduce the issue (if possible) + + + Diagnostic data collection is complete. Some of your personal information is included in this data. + + + Include all personal information + + + Automatically remove most personal information + + + Some personal information may still be included in the data. Make sure to review the exported files. + + + Manually select personal information you want to include + + + Cancel + + + Export + + + Back + + + Dismiss + + + Continue + + + Collecting diagnostic data + + + Exporting diagnostic data + + + Support Tool + + + Get a Support Tool link + + + Data sources to collect + + + Get a link + + + Copy and send this link to the user to collect the logs. + + + Copy link + + + Copy token + + + Do not include email address + + + Link copied + + + Token copied + + + No data collector selected. Please select at least one data collector. + + + + Brave System Information + + + Crash IDs + + + Memory Details + + + UI Hierarchy + + + Additional ChromeOS Platform Logs + + + Device Event + + + Intel WiFi NICs Debug Dump + + + Touch Events + + + Lacros System Information + + + Lacros + + + ChromeOS Flex Logs + + + DBus Details + + + ChromeOS Network Routes + + + ChromeOS Shill (Connection Manager) Logs + + + Policies + + + ChromeOS System State and Reports + + + ChromeOS System Logs + + + ChromeOS Brave User Logs + + + ChromeOS Bluetooth Floss + + + ChromeOS Connected Input Devices + + + ChromeOS Traffic Counters + + + ChromeOS Virtual Keyboard + + + ChromeOS Network Health + + + Performance and Battery State + + + Sign In State + + + + Android App Information + + + WiFi SSID + + + Cellular Location Info + + + Email Address + + + Brave sync chain ID + + + Other Stable Identifiers (e.g., Hashes or UUIDs) + + + Printing IPP Address + + + IP Address + + + Network MAC Address + + + Window Titles + + + URLs + + + Device and Component Serial Numbers + + + Removable Storage Names + + + EAP Network Authentication Information + + + diff --git a/base/feature_override_unittest.cc b/base/feature_override_unittest.cc index b6e8e0f4f5f1..f33a54371a0c 100644 --- a/base/feature_override_unittest.cc +++ b/base/feature_override_unittest.cc @@ -7,6 +7,7 @@ #include "base/debug/debugging_buildflags.h" #include "base/feature_list.h" #include "base/logging.h" +#include "base/memory/raw_ref.h" #include "base/test/mock_callback.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -47,28 +48,32 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ TEST(FeatureOverrideTest, OverridesTest) { struct TestCase { - const Feature& feature; + const raw_ref feature; const bool is_enabled; const bool is_overridden; }; constexpr TestCase kTestCases[] = { // Untouched features. - {kTestControlEnabledFeature, true, false}, - {kTestControlDisabledFeature, false, false}, + {raw_ref(kTestControlEnabledFeature), true, false}, + {raw_ref(kTestControlDisabledFeature), false, false}, // Overridden features. - {kTestEnabledButOverridenFeature, false, true}, - {kTestDisabledButOverridenFeature, true, true}, + {raw_ref(kTestEnabledButOverridenFeature), false, + true}, + {raw_ref(kTestDisabledButOverridenFeature), true, + true}, // Overridden but with the same state. - {kTestEnabledButOverridenFeatureWithSameState, true, false}, + {raw_ref( + kTestEnabledButOverridenFeatureWithSameState), + true, false}, }; for (const auto& test_case : kTestCases) { - SCOPED_TRACE(testing::Message() << test_case.feature.name); - EXPECT_EQ(test_case.is_enabled, FeatureList::IsEnabled(test_case.feature)); + SCOPED_TRACE(testing::Message() << test_case.feature->name); + EXPECT_EQ(test_case.is_enabled, FeatureList::IsEnabled(*test_case.feature)); EXPECT_EQ(test_case.is_overridden, FeatureList::GetInstance()->IsFeatureOverridden( - test_case.feature.name)); + test_case.feature->name)); } } diff --git a/base/mac/BUILD.gn b/base/mac/BUILD.gn index aba32590ae3f..4aacb4aa9882 100644 --- a/base/mac/BUILD.gn +++ b/base/mac/BUILD.gn @@ -6,8 +6,6 @@ assert(is_apple) source_set("mac") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "conversions.h" ] frameworks = [ "Foundation.framework" ] diff --git a/browser/android/brave_sync_worker.cc b/browser/android/brave_sync_worker.cc index 58c6aa43f7d8..8dc276f668a7 100644 --- a/browser/android/brave_sync_worker.cc +++ b/browser/android/brave_sync_worker.cc @@ -165,7 +165,7 @@ void BraveSyncWorker::MarkFirstSetupComplete() { } unified_consent::metrics::RecordSyncSetupDataTypesHistrogam( - service->GetUserSettings(), profile_->GetPrefs()); + service->GetUserSettings()); // We're done configuring, so notify SyncService that it is OK to start // syncing. diff --git a/browser/brave_ads/background_helper/background_helper_mac.mm b/browser/brave_ads/background_helper/background_helper_mac.mm index 99ff312dd173..f514ec2dfdcb 100644 --- a/browser/brave_ads/background_helper/background_helper_mac.mm +++ b/browser/brave_ads/background_helper/background_helper_mac.mm @@ -11,8 +11,6 @@ #include "base/mac/foundation_util.h" #include "base/mac/mac_logging.h" #include "base/mac/mac_util.h" -#include "base/mac/scoped_nsautorelease_pool.h" -#include "base/mac/scoped_nsobject.h" #include "base/memory/raw_ptr.h" @interface BackgroundHelperDelegateMac : NSObject { @@ -60,14 +58,14 @@ - (void)appDidResignActive:(NSNotification*)notification { class BackgroundHelperMac::BackgroundHelperDelegate { public: explicit BackgroundHelperDelegate(BackgroundHelper* background_helper) { - delegate_.reset( - [[BackgroundHelperDelegateMac alloc] initWithHelper:background_helper]); + delegate_ = + [[BackgroundHelperDelegateMac alloc] initWithHelper:background_helper]; } ~BackgroundHelperDelegate() = default; private: - base::scoped_nsobject delegate_; + BackgroundHelperDelegateMac* __strong delegate_; }; BackgroundHelperMac::BackgroundHelperMac() { diff --git a/browser/brave_ads/notification_helper/notification_helper_impl_mac.mm b/browser/brave_ads/notification_helper/notification_helper_impl_mac.mm index a032431b0198..c63517d4fb85 100644 --- a/browser/brave_ads/notification_helper/notification_helper_impl_mac.mm +++ b/browser/brave_ads/notification_helper/notification_helper_impl_mac.mm @@ -156,11 +156,6 @@ bool IsEnabled() { return false; } - if (base::mac::IsAtMostOS10_13()) { - VLOG(1) << "Native notifications are not supported prior to macOS 10.14"; - return false; - } - if (!IsAuthorized()) { return false; } diff --git a/browser/brave_content_browser_client.cc b/browser/brave_content_browser_client.cc index 17125fce1e92..5d4c6498ca32 100644 --- a/browser/brave_content_browser_client.cc +++ b/browser/brave_content_browser_client.cc @@ -822,8 +822,7 @@ void BraveContentBrowserClient::AppendExtraCommandLineSwitches( static const char* const kSwitchNames[] = { translate::switches::kBraveTranslateUseGoogleEndpoint, }; - command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, - std::size(kSwitchNames)); + command_line->CopySwitchesFrom(browser_command_line, kSwitchNames); } } diff --git a/browser/brave_profile_prefs.cc b/browser/brave_profile_prefs.cc index 29b137e8ff8f..7bebc34640aa 100644 --- a/browser/brave_profile_prefs.cc +++ b/browser/brave_profile_prefs.cc @@ -49,7 +49,6 @@ #include "chrome/browser/ui/webui/new_tab_page/ntp_pref_names.h" #include "chrome/common/channel_info.h" #include "chrome/common/pref_names.h" -#include "components/autofill/core/common/autofill_prefs.h" #include "components/content_settings/core/common/pref_names.h" #include "components/embedder_support/pref_names.h" #include "components/gcm_driver/gcm_buildflags.h" @@ -399,7 +398,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->SetDefaultPrefValue( password_manager::prefs::kPasswordLeakDetectionEnabled, base::Value(false)); - registry->SetDefaultPrefValue(autofill::prefs::kAutofillWalletImportEnabled, + registry->SetDefaultPrefValue(syncer::prefs::internal::kSyncPayments, base::Value(false)); // Default search engine version diff --git a/browser/brave_shields/https_upgrade_browsertest.cc b/browser/brave_shields/https_upgrade_browsertest.cc index 444a0d7efdd7..b3795dd189e4 100644 --- a/browser/brave_shields/https_upgrade_browsertest.cc +++ b/browser/brave_shields/https_upgrade_browsertest.cc @@ -99,8 +99,7 @@ class HttpsUpgradeBrowserTest : public PlatformBrowserTest { ~HttpsUpgradeBrowserTest() override = default; void SetUp() override { - feature_list_.InitWithFeatures( - {features::kHttpsFirstModeV2, kBraveHttpsByDefault}, {}); + feature_list_.InitWithFeatures({kBraveHttpsByDefault}, {}); PlatformBrowserTest::SetUp(); } diff --git a/browser/brave_vpn/win/brave_vpn_wireguard_service/status_tray/status_icon/native_popup_menu.cc b/browser/brave_vpn/win/brave_vpn_wireguard_service/status_tray/status_icon/native_popup_menu.cc index 307ec6548996..c7c401a1fa4a 100644 --- a/browser/brave_vpn/win/brave_vpn_wireguard_service/status_tray/status_icon/native_popup_menu.cc +++ b/browser/brave_vpn/win/brave_vpn_wireguard_service/status_tray/status_icon/native_popup_menu.cc @@ -60,12 +60,8 @@ void NativePopupMenu::AddMenuItemAt(size_t menu_index) { MENUITEMINFO mii = { .cbSize = sizeof(mii), .fMask = MIIM_FTYPE | MIIM_ID | MIIM_DATA | MIIM_STRING | MIIM_STATE, + .fType = MFT_STRING, }; - if (!model_->HasIcons()) { - mii.fType = MFT_STRING; - } else { - mii.fType = MFT_OWNERDRAW; - } std::unique_ptr item_data = std::make_unique(); item_data->label = model_->GetLabelAt(menu_index); diff --git a/browser/browsing_data/brave_browsing_data_remover_delegate.cc b/browser/browsing_data/brave_browsing_data_remover_delegate.cc index 9df87c905c2d..6ff46d3b6173 100644 --- a/browser/browsing_data/brave_browsing_data_remover_delegate.cc +++ b/browser/browsing_data/brave_browsing_data_remover_delegate.cc @@ -87,8 +87,8 @@ void BraveBrowsingDataRemoverDelegate::ClearShieldsSettings( static_cast(map->GetPrefProvider()); for (const auto& content_type : content_settings::GetShieldsContentSettingsTypes()) { - ContentSettingsForOneType settings; - map->GetSettingsForOneType(content_type, &settings); + ContentSettingsForOneType settings = + map->GetSettingsForOneType(content_type); for (const ContentSettingPatternSource& setting : settings) { base::Time last_modified = setting.metadata.last_modified(); if (last_modified >= begin_time && diff --git a/browser/browsing_data/brave_browsing_data_remover_delegate_unittest.cc b/browser/browsing_data/brave_browsing_data_remover_delegate_unittest.cc index 9007276b5efe..d7d0c328555a 100644 --- a/browser/browsing_data/brave_browsing_data_remover_delegate_unittest.cc +++ b/browser/browsing_data/brave_browsing_data_remover_delegate_unittest.cc @@ -41,8 +41,8 @@ class BraveBrowsingDataRemoverDelegateTest : public testing::Test { int shields_settings_count = 0; for (const auto& content_type : content_settings::GetShieldsContentSettingsTypes()) { - ContentSettingsForOneType settings; - map()->GetSettingsForOneType(content_type, &settings); + ContentSettingsForOneType settings = + map()->GetSettingsForOneType(content_type); shields_settings_count += settings.size(); } return shields_settings_count; diff --git a/browser/content_settings/BUILD.gn b/browser/content_settings/BUILD.gn index a958c8065b52..57436f028188 100644 --- a/browser/content_settings/BUILD.gn +++ b/browser/content_settings/BUILD.gn @@ -3,19 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. -source_set("content_settings") { - sources = [ - "brave_global_value_map.cc", - "brave_global_value_map.h", - ] - - deps = [ - "//base", - "//components/content_settings/core/browser", - "//components/content_settings/core/common", - ] -} - source_set("unit_tests") { testonly = true diff --git a/browser/debounce/debounce_browsertest.cc b/browser/debounce/debounce_browsertest.cc index 0da11249097b..4fb48b5d150f 100644 --- a/browser/debounce/debounce_browsertest.cc +++ b/browser/debounce/debounce_browsertest.cc @@ -26,6 +26,7 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/network_session_configurator/common/network_switches.h" +#include "content/public/browser/notification_service.h" #include "content/public/common/content_client.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" diff --git a/browser/default_protocol_handler_utils_win.cc b/browser/default_protocol_handler_utils_win.cc index 3e7f32818d72..1f2b8f33af99 100644 --- a/browser/default_protocol_handler_utils_win.cc +++ b/browser/default_protocol_handler_utils_win.cc @@ -301,7 +301,7 @@ std::wstring GetBrowserProgId() { const auto suffix = ShellUtil::GetCurrentInstallationSuffix(brave_exe); std::wstring brave_html = - base::StrCat({install_static::GetProgIdPrefix(), suffix}); + base::StrCat({install_static::GetBrowserProgIdPrefix(), suffix}); // ProgIds cannot be longer than 39 characters. // Ref: http://msdn.microsoft.com/en-us/library/aa911706.aspx. diff --git a/browser/download/android/BUILD.gn b/browser/download/android/BUILD.gn index ace13200b377..9da41b9695ed 100644 --- a/browser/download/android/BUILD.gn +++ b/browser/download/android/BUILD.gn @@ -15,8 +15,6 @@ android_library("java") { "//base:jni_java", "//chrome/browser/download/android:java", ] - - annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] } generate_jni("jni_headers") { diff --git a/browser/download/bubble/download_display_controller_unittest.cc b/browser/download/bubble/download_display_controller_unittest.cc index ad8d235330f8..86c706c5b8d6 100644 --- a/browser/download/bubble/download_display_controller_unittest.cc +++ b/browser/download/bubble/download_display_controller_unittest.cc @@ -13,6 +13,7 @@ #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr_exclusion.h" +#include "base/memory/raw_ref.h" #include "base/time/time.h" #include "chrome/browser/download/bubble/download_bubble_ui_controller.h" #include "chrome/browser/download/bubble/download_bubble_utils.h" @@ -186,7 +187,7 @@ class MockDownloadBubbleUpdateService : public DownloadBubbleUpdateService { for (ModelType type : model_types_) { if (type == ModelType::kDownloadItem) { auto model = DownloadItemModel::Wrap( - download_items_.at(download_item_index++).get()); + download_items_->at(download_item_index++).get()); if (!model->ShouldShowInBubble()) { continue; } @@ -194,7 +195,7 @@ class MockDownloadBubbleUpdateService : public DownloadBubbleUpdateService { } else { auto model = OfflineItemModel::Wrap( OfflineItemModelManagerFactory::GetForBrowserContext(profile_), - offline_items_.at(offline_item_index++)); + offline_items_->at(offline_item_index++)); if (!model->ShouldShowInBubble()) { continue; } @@ -214,14 +215,14 @@ class MockDownloadBubbleUpdateService : public DownloadBubbleUpdateService { for (ModelType type : model_types_) { if (type == ModelType::kDownloadItem) { auto model = DownloadItemModel::Wrap( - download_items_.at(download_item_index++).get()); + download_items_->at(download_item_index++).get()); if (model->ShouldShowInBubble()) { models.push_back(std::move(model)); } } else { auto model = OfflineItemModel::Wrap( OfflineItemModelManagerFactory::GetForBrowserContext(profile_), - offline_items_.at(offline_item_index++)); + offline_items_->at(offline_item_index++)); if (model->ShouldShowInBubble()) { models.push_back(std::move(model)); } @@ -253,8 +254,9 @@ class MockDownloadBubbleUpdateService : public DownloadBubbleUpdateService { raw_ptr profile_; DownloadDisplayController::AllDownloadUIModelsInfo info_; std::vector model_types_; - const std::vector>& download_items_; - const OfflineItemList& offline_items_; + const raw_ref>> + download_items_; + const raw_ref offline_items_; }; class MockDownloadCoreService : public DownloadCoreService { diff --git a/browser/download/internal/android/java/res/drawable-night/downloads_empty_state_illustration.xml b/browser/download/internal/android/java/res/drawable-night/downloads_empty_state_illustration.xml new file mode 100644 index 000000000000..aa2ab4586b9f --- /dev/null +++ b/browser/download/internal/android/java/res/drawable-night/downloads_empty_state_illustration.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + diff --git a/browser/download/internal/android/java/res/drawable/downloads_empty_state_illustration.xml b/browser/download/internal/android/java/res/drawable/downloads_empty_state_illustration.xml new file mode 100644 index 000000000000..848da9400886 --- /dev/null +++ b/browser/download/internal/android/java/res/drawable/downloads_empty_state_illustration.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + diff --git a/browser/ephemeral_storage/blob_url_browsertest.cc b/browser/ephemeral_storage/blob_url_browsertest.cc index 7c42f6d14152..8a7b7ae3d23e 100644 --- a/browser/ephemeral_storage/blob_url_browsertest.cc +++ b/browser/ephemeral_storage/blob_url_browsertest.cc @@ -190,8 +190,10 @@ class BlobUrlBrowserTestBase : public EphemeralStorageBrowserTest { // Close the first a.com tab, ensure all blobs created there become obsolete // and can't be fetched. - ASSERT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( - 1, TabCloseTypes::CLOSE_NONE)); + const int previous_tab_count = browser()->tab_strip_model()->count(); + browser()->tab_strip_model()->CloseWebContentsAt(1, + TabCloseTypes::CLOSE_NONE); + EXPECT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); content::RunAllTasksUntilIdle(); for (size_t idx = 0; idx < a_com2_registered_blobs.size(); ++idx) { auto* rfh = a_com2_registered_blobs[idx].rfh.get(); @@ -267,8 +269,10 @@ class BlobUrlBrowserTestBase : public EphemeralStorageBrowserTest { // Close the first a.com tab, ensure all blobs created there become obsolete // and can't be fetched. - ASSERT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( - 1, TabCloseTypes::CLOSE_NONE)); + const int previous_tab_count = browser()->tab_strip_model()->count(); + browser()->tab_strip_model()->CloseWebContentsAt(1, + TabCloseTypes::CLOSE_NONE); + EXPECT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); content::RunAllTasksUntilIdle(); for (size_t idx = 0; idx < a_com2_registered_blobs.size(); ++idx) { auto* rfh = a_com2_registered_blobs[idx].rfh.get(); @@ -507,9 +511,6 @@ IN_PROC_BROWSER_TEST_P(BlobUrlBrowserTest, ReplaceStateToAddAuthorityToBlob) { EXPECT_FALSE( base::MatchPattern(new_contents->GetVisibleURL().spec(), "*spoof*")); - // The currently implemented behavior is that the URL gets rewritten to - // about:blank#blocked. The content of the page stays the same. - EXPECT_EQ(content::kBlockedURL, new_contents->GetVisibleURL().spec()); EXPECT_EQ( origin.Serialize() + " potato", EvalJs(new_contents, "self.origin + ' ' + document.body.innerText;")); @@ -518,5 +519,5 @@ IN_PROC_BROWSER_TEST_P(BlobUrlBrowserTest, ReplaceStateToAddAuthorityToBlob) { // This seems unfortunate -- can we fix it? std::string window_location = EvalJs(new_contents, "window.location.href;").ExtractString(); - EXPECT_TRUE(base::MatchPattern(window_location, "*spoof*")); + EXPECT_FALSE(base::MatchPattern(window_location, "*spoof*")); } diff --git a/browser/ephemeral_storage/ephemeral_storage_browsertest.cc b/browser/ephemeral_storage/ephemeral_storage_browsertest.cc index 4dbc4be18d8e..8d96a0ccb1a1 100644 --- a/browser/ephemeral_storage/ephemeral_storage_browsertest.cc +++ b/browser/ephemeral_storage/ephemeral_storage_browsertest.cc @@ -254,9 +254,11 @@ WebContents* EphemeralStorageBrowserTest::LoadURLInNewTab(GURL url) { void EphemeralStorageBrowserTest::CloseWebContents(WebContents* web_contents) { int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(web_contents); - bool was_closed = browser()->tab_strip_model()->CloseWebContentsAt( - tab_index, TabCloseTypes::CLOSE_NONE); - EXPECT_TRUE(was_closed); + + const int previous_tab_count = browser()->tab_strip_model()->count(); + browser()->tab_strip_model()->CloseWebContentsAt(tab_index, + TabCloseTypes::CLOSE_NONE); + EXPECT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); } void EphemeralStorageBrowserTest::SetStorageValueInFrame( @@ -661,9 +663,11 @@ IN_PROC_BROWSER_TEST_F(EphemeralStorageBrowserTest, // an eTLD. int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(site_a_tab); - bool was_closed = browser()->tab_strip_model()->CloseWebContentsAt( - tab_index, TabCloseTypes::CLOSE_NONE); - EXPECT_TRUE(was_closed); + + const int previous_tab_count = browser()->tab_strip_model()->count(); + browser()->tab_strip_model()->CloseWebContentsAt(tab_index, + TabCloseTypes::CLOSE_NONE); + EXPECT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); EXPECT_TRUE(WaitForCleanupAfterKeepAlive()); // Navigate the main tab to the same site. @@ -1142,9 +1146,10 @@ IN_PROC_BROWSER_TEST_F(EphemeralStorageKeepAliveDisabledBrowserTest, // an eTLD. int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(site_a_tab); - bool was_closed = browser()->tab_strip_model()->CloseWebContentsAt( - tab_index, TabCloseTypes::CLOSE_NONE); - EXPECT_TRUE(was_closed); + const int previous_tab_count = browser()->tab_strip_model()->count(); + browser()->tab_strip_model()->CloseWebContentsAt(tab_index, + TabCloseTypes::CLOSE_NONE); + EXPECT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); // Navigate the main tab to the same site. ASSERT_TRUE( diff --git a/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc b/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc index e60e67507673..943ac31b9afe 100644 --- a/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc +++ b/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc @@ -388,9 +388,11 @@ class EphemeralStorageTest : public InProcessBrowserTest { "document.getElementById('continue-test-url-step-6').value") .ExtractString(); - ASSERT_TRUE( - tabs_->CloseWebContentsAt(tabs_->GetIndexOfWebContents(original_tab_), - TabCloseTypes::CLOSE_NONE)); + const int previous_tab_count = browser()->tab_strip_model()->count(); + tabs_->CloseWebContentsAt(tabs_->GetIndexOfWebContents(original_tab_), + TabCloseTypes::CLOSE_NONE); + ASSERT_EQ(previous_tab_count - 1, browser()->tab_strip_model()->count()); + EphemeralStorageServiceFactory::GetInstance() ->GetForContext(browser()->profile()) ->FireCleanupTimersForTesting(); diff --git a/browser/extensions/api/identity/brave_web_auth_flow.cc b/browser/extensions/api/identity/brave_web_auth_flow.cc index cc05fd4eefc5..adb93bfc18a7 100644 --- a/browser/extensions/api/identity/brave_web_auth_flow.cc +++ b/browser/extensions/api/identity/brave_web_auth_flow.cc @@ -78,7 +78,7 @@ void BraveWebAuthFlow::StartWebAuthFlow( web_auth_flow_ = std::make_unique( this, profile_, google_oauth_url, interactive ? WebAuthFlow::INTERACTIVE : WebAuthFlow::SILENT, - WebAuthFlow::LAUNCH_WEB_AUTH_FLOW, user_gesture); + user_gesture); web_auth_flow_->Start(); } diff --git a/browser/extensions/brave_crx_generation_browsertest.cc b/browser/extensions/brave_crx_generation_browsertest.cc index 342f3a822261..c1a80d235f07 100644 --- a/browser/extensions/brave_crx_generation_browsertest.cc +++ b/browser/extensions/brave_crx_generation_browsertest.cc @@ -66,6 +66,7 @@ class InstallCrxFileWaiter : public extensions::InstallObserver { } void OnFinishCrxInstall(content::BrowserContext* context, + const extensions::CrxInstaller& installer, const std::string& extension_id, bool success) override { did_install_extension_ = success; diff --git a/browser/farbling/brave_dark_mode_fingerprint_protection_browsertest.cc b/browser/farbling/brave_dark_mode_fingerprint_protection_browsertest.cc index f8001b7ca6cd..161301e6036e 100644 --- a/browser/farbling/brave_dark_mode_fingerprint_protection_browsertest.cc +++ b/browser/farbling/brave_dark_mode_fingerprint_protection_browsertest.cc @@ -25,6 +25,7 @@ #include "content/public/test/browser_test_utils.h" #include "net/dns/mock_host_resolver.h" #include "ui/color/color_provider.h" +#include "ui/color/color_provider_key.h" #include "ui/color/color_provider_manager.h" #include "ui/color/color_provider_source.h" #include "ui/native_theme/test_native_theme.h" @@ -54,8 +55,8 @@ class BraveDarkModeFingerprintProtectionTest : public InProcessBrowserTest { class MockColorProviderSource : public ui::ColorProviderSource { public: explicit MockColorProviderSource(bool is_dark) { - key_.color_mode = is_dark ? ui::ColorProviderManager::ColorMode::kDark - : ui::ColorProviderManager::ColorMode::kLight; + key_.color_mode = is_dark ? ui::ColorProviderKey::ColorMode::kDark + : ui::ColorProviderKey::ColorMode::kLight; provider_.GenerateColorMap(); } MockColorProviderSource(const MockColorProviderSource&) = delete; @@ -66,13 +67,11 @@ class BraveDarkModeFingerprintProtectionTest : public InProcessBrowserTest { const ui::ColorProvider* GetColorProvider() const override { return &provider_; } - ui::ColorProviderManager::Key GetColorProviderKey() const override { - return key_; - } + ui::ColorProviderKey GetColorProviderKey() const override { return key_; } private: ui::ColorProvider provider_; - ui::ColorProviderManager::Key key_; + ui::ColorProviderKey key_; }; void SetUpOnMainThread() override { diff --git a/browser/farbling/brave_navigator_usb_farbling_browsertest.cc b/browser/farbling/brave_navigator_usb_farbling_browsertest.cc index d6905669e8d5..6056d9a25122 100644 --- a/browser/farbling/brave_navigator_usb_farbling_browsertest.cc +++ b/browser/farbling/brave_navigator_usb_farbling_browsertest.cc @@ -120,16 +120,16 @@ class TestUsbDelegate : public ChromeUsbDelegate { std::unique_ptr RunChooser( content::RenderFrameHost& frame, - std::vector filters, + blink::mojom::WebUsbRequestDeviceOptionsPtr options, blink::mojom::WebUsbService::GetPermissionCallback callback) override { if (use_fake_chooser_) { auto chooser = std::make_unique(); chooser->ShowChooser( &frame, std::make_unique( - &frame, std::move(filters), std::move(callback))); + &frame, std::move(options), std::move(callback))); return chooser; } else { - return ChromeUsbDelegate::RunChooser(frame, std::move(filters), + return ChromeUsbDelegate::RunChooser(frame, std::move(options), std::move(callback)); } } diff --git a/browser/favicon/favicon_database_browsertest.cc b/browser/favicon/favicon_database_browsertest.cc index 3cfa6de736f7..477b7f15103e 100644 --- a/browser/favicon/favicon_database_browsertest.cc +++ b/browser/favicon/favicon_database_browsertest.cc @@ -14,6 +14,7 @@ #include "chrome/common/chrome_content_client.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/public/browser/notification_service.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_mock_cert_verifier.h" diff --git a/browser/net/brave_site_hacks_network_delegate_helper_browsertest.cc b/browser/net/brave_site_hacks_network_delegate_helper_browsertest.cc index 3258d2cc3e3b..1a135163ad23 100644 --- a/browser/net/brave_site_hacks_network_delegate_helper_browsertest.cc +++ b/browser/net/brave_site_hacks_network_delegate_helper_browsertest.cc @@ -15,6 +15,7 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/content_settings/core/browser/host_content_settings_map.h" +#include "content/public/browser/notification_service.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_mock_cert_verifier.h" diff --git a/browser/permissions/mock_permission_lifetime_prompt.cc b/browser/permissions/mock_permission_lifetime_prompt.cc index 5dc3790a979f..e4b0623a2d21 100644 --- a/browser/permissions/mock_permission_lifetime_prompt.cc +++ b/browser/permissions/mock_permission_lifetime_prompt.cc @@ -37,4 +37,9 @@ void MockPermissionLifetimePrompt::ResetFactory() { factory_ = nullptr; } +absl::optional MockPermissionLifetimePrompt::GetViewBoundsInScreen() + const { + return absl::nullopt; +} + } // namespace permissions diff --git a/browser/permissions/mock_permission_lifetime_prompt.h b/browser/permissions/mock_permission_lifetime_prompt.h index 4cd8277ec16d..73026fb7f7d5 100644 --- a/browser/permissions/mock_permission_lifetime_prompt.h +++ b/browser/permissions/mock_permission_lifetime_prompt.h @@ -22,6 +22,7 @@ class MockPermissionLifetimePrompt : public PermissionPrompt { bool UpdateAnchor() override; TabSwitchingBehavior GetTabSwitchingBehavior() override; PermissionPromptDisposition GetPromptDisposition() const override; + absl::optional GetViewBoundsInScreen() const override; Delegate* delegate() { return delegate_; } void ResetFactory(); diff --git a/browser/resources/extensions/brave_overrides/index.ts b/browser/resources/extensions/brave_overrides/index.ts index f7fd9fe6c4dc..f7a36fa8f014 100644 --- a/browser/resources/extensions/brave_overrides/index.ts +++ b/browser/resources/extensions/brave_overrides/index.ts @@ -4,3 +4,4 @@ // you can obtain one at https://mozilla.org/MPL/2.0/. import './extensions_detail_view.js' +import './side_bar.js' diff --git a/browser/resources/extensions/brave_overrides/side_bar.ts b/browser/resources/extensions/brave_overrides/side_bar.ts new file mode 100644 index 000000000000..c6d11f066054 --- /dev/null +++ b/browser/resources/extensions/brave_overrides/side_bar.ts @@ -0,0 +1,41 @@ +// Copyright (c) 2023 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +// @ts-nocheck TODO(petemill): Define types and remove ts-nocheck + +import {RegisterStyleOverride} from 'chrome://resources/brave/polymer_overriding.js' +import {html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js' + +RegisterStyleOverride( + 'extensions-sidebar', + html` + + ` +) diff --git a/browser/resources/extensions/sources.gni b/browser/resources/extensions/sources.gni index 083c1a0f7c48..592de2a20a53 100644 --- a/browser/resources/extensions/sources.gni +++ b/browser/resources/extensions/sources.gni @@ -8,6 +8,7 @@ brave_extensions_web_component_files = [ "brave_item_list_more_items.ts" ] brave_extensions_non_web_component_files = [ "brave_overrides/extensions_detail_view.ts", "brave_overrides/index.ts", + "brave_overrides/side_bar.ts", ] brave_extensions_preprocess_extra_deps = diff --git a/browser/resources/password_manager/BUILD.gn b/browser/resources/password_manager/BUILD.gn new file mode 100644 index 000000000000..977127227320 --- /dev/null +++ b/browser/resources/password_manager/BUILD.gn @@ -0,0 +1,18 @@ +# Copyright (c) 2023 The Brave Authors. All rights reserved. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at https://mozilla.org/MPL/2.0/. + +import("//tools/grit/preprocess_if_expr.gni") +import("sources.gni") + +# Move brave files to the place where chromium password manager page is compiled +# from. It should be the same directory that build_webui.gni uses after it +# performs its own preprocess_if_expr. Once chromium and brave frontend files +# are all in the same place, build_webui.gni will continue its typescript and +# rollup compile (etc.) from that directory. +preprocess_if_expr("preprocess") { + out_folder = + "$root_gen_dir/chrome/browser/resources/password_manager/preprocessed" + in_files = brave_password_manager_ts_local_files +} diff --git a/browser/resources/password_manager/brave_overrides/index.ts b/browser/resources/password_manager/brave_overrides/index.ts new file mode 100644 index 000000000000..3dc5d75ff6d7 --- /dev/null +++ b/browser/resources/password_manager/brave_overrides/index.ts @@ -0,0 +1,6 @@ +// Copyright (c) 2023 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +import './side_bar.js' diff --git a/browser/resources/password_manager/brave_overrides/side_bar.ts b/browser/resources/password_manager/brave_overrides/side_bar.ts new file mode 100644 index 000000000000..a45a9af99952 --- /dev/null +++ b/browser/resources/password_manager/brave_overrides/side_bar.ts @@ -0,0 +1,53 @@ +// Copyright (c) 2023 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +// @ts-nocheck TODO(petemill): Define types and remove ts-nocheck + +import {RegisterPolymerTemplateModifications, RegisterStyleOverride} from 'chrome://resources/brave/polymer_overriding.js' +import {html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js' + +RegisterStyleOverride( + 'password-manager-side-bar', + html` + + ` +) + +RegisterPolymerTemplateModifications({ + 'password-manager-side-bar': (templateContent) => { + const checkupMenuItem = templateContent.querySelector('#checkup') + if (!checkupMenuItem) { + console.log( + `[Brave Password Manager Overrides] Could not find menu item 'checkup'`) + } else { + checkupMenuItem.remove() + } + } +}) diff --git a/browser/resources/password_manager/sources.gni b/browser/resources/password_manager/sources.gni new file mode 100644 index 000000000000..c53d348de1b5 --- /dev/null +++ b/browser/resources/password_manager/sources.gni @@ -0,0 +1,15 @@ +# Copyright (c) 2023 The Brave Authors. All rights reserved. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at https://mozilla.org/MPL/2.0/. + +brave_password_manager_non_web_component_files = [ + "brave_overrides/side_bar.ts", + "brave_overrides/index.ts", +] + +brave_password_manager_preprocess_extra_deps = + [ "//brave/browser/resources/password_manager:preprocess" ] + +brave_password_manager_ts_local_files = + brave_password_manager_non_web_component_files diff --git a/browser/resources/settings/brave_overrides/security_page.ts b/browser/resources/settings/brave_overrides/security_page.ts index 9f32a4a2c333..17eb9e275f2a 100644 --- a/browser/resources/settings/brave_overrides/security_page.ts +++ b/browser/resources/settings/brave_overrides/security_page.ts @@ -27,20 +27,13 @@ RegisterPolymerTemplateModifications({ passwordsLeakToggle.setAttribute('hidden', 'true') } if (loadTimeData.getBoolean("isHttpsByDefaultEnabled")) { - const httpsOnlyModeToggleTemplate = templateContent.querySelector( - `template[if*='showHttpsOnlyModeSetting_']`) - if (!httpsOnlyModeToggleTemplate) { - console.error('[Brave Settings Overrides] Could not find template ' + - 'with if*=showHttpsOnlyModeSetting_ on security page.') + const httpsOnlyModeToggle = templateContent. + getElementById('httpsOnlyModeToggle') + if (!httpsOnlyModeToggle) { + console.error('[Brave Settings Overrides] Could not find' + + 'httpsOnlyModeToggle on security page.') } else { - const httpsOnlyModeToggle = httpsOnlyModeToggleTemplate.content - .getElementById('httpsOnlyModeToggle') - if (!httpsOnlyModeToggle) { - console.error('[Brave Settings Overrides] Could not find' + - 'httpsOnlyModeToggle on security page.') - } else { - httpsOnlyModeToggle.setAttribute('hidden', 'true') - } + httpsOnlyModeToggle.setAttribute('hidden', 'true') } } const link = templateContent.getElementById('advanced-protection-program-link') diff --git a/browser/sources.gni b/browser/sources.gni index 5b96cb98f210..7237d820a43a 100644 --- a/browser/sources.gni +++ b/browser/sources.gni @@ -118,7 +118,6 @@ brave_chrome_browser_deps = [ "//brave/browser/brave_wallet:brave_wallet_delegate", "//brave/browser/brave_wallet:tab_helper", "//brave/browser/component_updater", - "//brave/browser/content_settings", "//brave/browser/ethereum_remote_client/buildflags", "//brave/browser/gcm_driver", "//brave/browser/metrics/buildflags", diff --git a/browser/tab_group/BUILD.gn b/browser/tab_group/BUILD.gn new file mode 100644 index 000000000000..9c05278f48fe --- /dev/null +++ b/browser/tab_group/BUILD.gn @@ -0,0 +1,22 @@ +# Copyright (c) 2023 The Brave Authors. All rights reserved. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at https://mozilla.org/MPL/2.0/. + +import("//brave/android/features/tab_ui/brave_tab_management_java_sources.gni") +import("//build/config/android/config.gni") +import("//build/config/android/rules.gni") +import("//chrome/browser/buildflags.gni") + +android_library("java") { + sources = [ "java/src/org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter.java" ] + + deps = [ + "//base:base_java", + "//chrome/browser/preferences:java", + "//chrome/browser/tab:java", + "//chrome/browser/tab_group:java", + "//chrome/browser/tabmodel:java", + "//third_party/androidx:androidx_annotation_annotation_java", + ] +} diff --git a/browser/tab_group/java/src/org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter.java b/browser/tab_group/java/src/org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter.java new file mode 100644 index 000000000000..4f9a818b206c --- /dev/null +++ b/browser/tab_group/java/src/org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +package org.chromium.chrome.browser.tasks.tab_groups; + +import org.chromium.base.BravePreferenceKeys; +import org.chromium.base.BraveReflectionUtil; +import org.chromium.chrome.browser.preferences.SharedPreferencesManager; +import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.tab.state.CriticalPersistedTabData; +import org.chromium.chrome.browser.tabmodel.TabModel; +import org.chromium.chrome.browser.tabmodel.TabModelFilter; +import org.chromium.chrome.browser.tabmodel.TabModelUtils; + +/** + * Brave's super class for {@link TabGroupModelFilter} + */ +public abstract class BraveTabGroupModelFilter extends TabModelFilter { + /** + * This variable will be used instead of {@link + * TabGroupModelFilter}'s variable, that will be deleted in bytecode. + */ + protected boolean mIsResetting; + + public BraveTabGroupModelFilter(TabModel tabModel) { + super(tabModel); + } + + /** + * Call from {@link TabGroupModelFilter} will be redirected here via bytrcode. + */ + public int getParentId(Tab tab) { + if (isTabModelRestored() && !mIsResetting + && SharedPreferencesManager.getInstance().readBoolean( + BravePreferenceKeys.BRAVE_TAB_GROUPS_ENABLED, true)) { + Tab parentTab = TabModelUtils.getTabById( + getTabModel(), CriticalPersistedTabData.from(tab).getParentId()); + if (parentTab != null) { + return (int) BraveReflectionUtil.InvokeMethod( + TabGroupModelFilter.class, this, "getRootId", Tab.class, parentTab); + } + } + // Otherwise just call parent. + return (int) BraveReflectionUtil.InvokeMethod( + TabGroupModelFilter.class, this, "getParentId", Tab.class, tab); + } +} diff --git a/browser/themes/brave_private_window_theme_supplier.cc b/browser/themes/brave_private_window_theme_supplier.cc index f286279a55f9..2bb06e7a5b79 100644 --- a/browser/themes/brave_private_window_theme_supplier.cc +++ b/browser/themes/brave_private_window_theme_supplier.cc @@ -6,7 +6,7 @@ #include "brave/browser/themes/brave_private_window_theme_supplier.h" #include "brave/browser/ui/color/brave_color_mixer.h" -#include "ui/color/color_provider_manager.h" +#include "ui/color/color_provider_key.h" BravePrivateWindowThemeSupplier::BravePrivateWindowThemeSupplier( bool private_window) @@ -17,7 +17,7 @@ BravePrivateWindowThemeSupplier::~BravePrivateWindowThemeSupplier() = default; void BravePrivateWindowThemeSupplier::AddColorMixers( ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) const { + const ui::ColorProviderKey& key) const { for_private_window_ ? AddPrivateThemeColorMixer(provider, key) : AddTorThemeColorMixer(provider, key); // Private/Tor uses same omnibox colors. diff --git a/browser/themes/brave_private_window_theme_supplier.h b/browser/themes/brave_private_window_theme_supplier.h index 43302ddad2d0..8c44b7871e9a 100644 --- a/browser/themes/brave_private_window_theme_supplier.h +++ b/browser/themes/brave_private_window_theme_supplier.h @@ -22,7 +22,7 @@ class BravePrivateWindowThemeSupplier : public CustomThemeSupplier { ~BravePrivateWindowThemeSupplier() override; void AddColorMixers(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) const override; + const ui::ColorProviderKey& key) const override; // false if this is for tor window. bool for_private_window_ = true; diff --git a/browser/themes/brave_theme_service_browsertest.cc b/browser/themes/brave_theme_service_browsertest.cc index 2139e2774869..85c7bfb9bb79 100644 --- a/browser/themes/brave_theme_service_browsertest.cc +++ b/browser/themes/brave_theme_service_browsertest.cc @@ -275,14 +275,14 @@ IN_PROC_BROWSER_TEST_F(BraveThemeServiceTest, ColorProviderTest) { EXPECT_EQ(kPrivateFrame, frame_active_color); } +#if BUILDFLAG(IS_WIN) // Some tests are failing for Windows x86 CI, // See https://github.com/brave/brave-browser/issues/22767 -#if BUILDFLAG(IS_WIN) && defined(ARCH_CPU_X86) +#if defined(ARCH_CPU_X86) #define MAYBE_DarkModeChangeByRegTest DISABLED_DarkModeChangeByRegTest #else #define MAYBE_DarkModeChangeByRegTest DarkModeChangeByRegTest #endif -#if BUILDFLAG(IS_WIN) IN_PROC_BROWSER_TEST_F(BraveThemeServiceTest, MAYBE_DarkModeChangeByRegTest) { // Test native theme notification is called properly by changing reg value. // This simulates dark mode setting from Windows settings. @@ -305,36 +305,63 @@ IN_PROC_BROWSER_TEST_F(BraveThemeServiceTest, MAYBE_DarkModeChangeByRegTest) { &apps_use_light_theme); const bool initial_dark_mode = apps_use_light_theme == 0; - // Toggle dark mode and check get notification for default type (same as...). + // Set dark mode to "Same as Windows". In this mode we want to be receiving + // system notifications of the dark mode changes. dark_mode::SetBraveDarkModeType( dark_mode::BraveDarkModeType::BRAVE_DARK_MODE_TYPE_DEFAULT); - apps_use_light_theme = !initial_dark_mode ? 0 : 1; - hkcu_themes_regkey.WriteValue(L"AppsUseLightTheme", apps_use_light_theme); - - TestNativeThemeObserver native_theme_observer_for_default; - EXPECT_CALL( - native_theme_observer_for_default, - OnNativeThemeUpdated(ui::NativeTheme::GetInstanceForNativeUi())).Times(1); - ui::NativeTheme::GetInstanceForNativeUi()->AddObserver( - &native_theme_observer_for_default); - - // Toggle dark mode and |native_theme_observer_for_light| will not get - // notification for light type. - dark_mode::SetBraveDarkModeType( - dark_mode::BraveDarkModeType::BRAVE_DARK_MODE_TYPE_LIGHT); - - TestNativeThemeObserver native_theme_observer_for_light; - EXPECT_CALL( - native_theme_observer_for_light, - OnNativeThemeUpdated(ui::NativeTheme::GetInstanceForNativeUi())).Times(0); - ui::NativeTheme::GetInstanceForNativeUi()->AddObserver( - &native_theme_observer_for_light); + { + // Set up theme observer and toggle the system dark mode by writing to the + // registry. We should get 2 notifications: + // 1 for dark mode change + 1 for reduced transparency. + // We get notifications for both because they are watching the same registry + // key. + TestNativeThemeObserver native_theme_observer_for_default; + ui::NativeTheme::GetInstanceForNativeUi()->AddObserver( + &native_theme_observer_for_default); + + EXPECT_CALL(native_theme_observer_for_default, + OnNativeThemeUpdated(ui::NativeTheme::GetInstanceForNativeUi())) + .Times(2); + apps_use_light_theme = !initial_dark_mode ? 0 : 1; + hkcu_themes_regkey.WriteValue(L"AppsUseLightTheme", apps_use_light_theme); + + // Timeout is used to let notifications trickle in. + RunLoopRunWithTimeout(base::Milliseconds(500)); + + // Toggling dark mode to light should result in only one notification since + // we aren't touching the registry. + EXPECT_CALL(native_theme_observer_for_default, + OnNativeThemeUpdated(ui::NativeTheme::GetInstanceForNativeUi())) + .Times(1); + dark_mode::SetBraveDarkModeType( + dark_mode::BraveDarkModeType::BRAVE_DARK_MODE_TYPE_LIGHT); - apps_use_light_theme = initial_dark_mode ? 0 : 1; - hkcu_themes_regkey.WriteValue(L"AppsUseLightTheme", apps_use_light_theme); + ui::NativeTheme::GetInstanceForNativeUi()->RemoveObserver( + &native_theme_observer_for_default); + } - // Timeout is used because we can't get notifiication with light theme. - RunLoopRunWithTimeout(base::Milliseconds(500)); + { + // Set up theme observer and toggle the system dark mode via the registry + // again. We should only get 1 reduced transparency notifications this time + // because we short circuit dark mode change system notifications when we + // are in non-default dark mode (i.e. dark mode is set to Dark or Light, not + // to "Same as Windows"). + TestNativeThemeObserver native_theme_observer_for_light; + EXPECT_CALL(native_theme_observer_for_light, + OnNativeThemeUpdated(ui::NativeTheme::GetInstanceForNativeUi())) + .Times(1); + ui::NativeTheme::GetInstanceForNativeUi()->AddObserver( + &native_theme_observer_for_light); + + apps_use_light_theme = initial_dark_mode ? 0 : 1; + hkcu_themes_regkey.WriteValue(L"AppsUseLightTheme", apps_use_light_theme); + + // Timeout is used to let notifications trickle in. + RunLoopRunWithTimeout(base::Milliseconds(500)); + + ui::NativeTheme::GetInstanceForNativeUi()->RemoveObserver( + &native_theme_observer_for_light); + } } -#endif +#endif // BUILDFLAG(IS_WIN) diff --git a/browser/ui/BUILD.gn b/browser/ui/BUILD.gn index f7fb2342665d..ce4b08595779 100644 --- a/browser/ui/BUILD.gn +++ b/browser/ui/BUILD.gn @@ -543,6 +543,7 @@ source_set("ui") { "//components/image_fetcher/core", "//components/infobars/content", "//components/omnibox/browser:vector_icons", + "//components/optimization_guide/optimization_guide_internals/webui:url_constants", "//components/prefs", "//components/resources:components_resources_grit", "//components/search_engines", @@ -1065,6 +1066,7 @@ source_set("browser_tests") { "//chrome/test:test_support", "//chrome/test:test_support_ui", "//components/javascript_dialogs", + "//components/optimization_guide/optimization_guide_internals/webui:url_constants", "//components/prefs", "//content/test:test_support", ] diff --git a/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml b/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml new file mode 100644 index 000000000000..aecfb622fe8b --- /dev/null +++ b/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + diff --git a/browser/ui/android/omnibox/java/res/values/dimens.xml b/browser/ui/android/omnibox/java/res/values/dimens.xml index c3f90536adfd..9cf29eac735f 100644 --- a/browser/ui/android/omnibox/java/res/values/dimens.xml +++ b/browser/ui/android/omnibox/java/res/values/dimens.xml @@ -8,4 +8,5 @@ 150dp 30dp 4dp + 20dp diff --git a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveAutocompleteMediator.java b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveAutocompleteMediator.java index 6d5e1d69f920..fe02df0d7dc9 100644 --- a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveAutocompleteMediator.java +++ b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveAutocompleteMediator.java @@ -15,9 +15,9 @@ import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.omnibox.LocationBarDataProvider; import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider; -import org.chromium.chrome.browser.omnibox.suggestions.base.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; import org.chromium.chrome.browser.omnibox.suggestions.brave_search.BraveSearchBannerProcessor; +import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.share.ShareDelegate; diff --git a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListBuilder.java b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListBuilder.java index 2fea9f79192b..c6a91765fbaa 100644 --- a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListBuilder.java +++ b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListBuilder.java @@ -18,9 +18,9 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.omnibox.OmniboxPrefManager; import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider; -import org.chromium.chrome.browser.omnibox.suggestions.base.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; import org.chromium.chrome.browser.omnibox.suggestions.brave_search.BraveSearchBannerProcessor; +import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.search_engines.settings.BraveSearchEngineAdapter; import org.chromium.chrome.browser.tab.Tab; diff --git a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor.java b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor.java index 57a929428e7f..eb2a30bad64d 100644 --- a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor.java +++ b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor.java @@ -10,7 +10,7 @@ import android.content.Context; import org.chromium.base.supplier.Supplier; -import org.chromium.chrome.browser.omnibox.suggestions.FaviconFetcher; +import org.chromium.chrome.browser.omnibox.styles.OmniboxImageSupplier; import org.chromium.chrome.browser.omnibox.suggestions.SuggestionHost; import org.chromium.chrome.browser.omnibox.suggestions.UrlBarDelegate; import org.chromium.chrome.browser.share.ShareDelegate; @@ -21,9 +21,9 @@ public class BraveEditUrlSuggestionProcessor extends EditUrlSuggestionProcessor private boolean mHasClearedOmniboxForFocus; public BraveEditUrlSuggestionProcessor(Context context, SuggestionHost suggestionHost, - UrlBarDelegate locationBarDelegate, FaviconFetcher faviconFetcher, + UrlBarDelegate locationBarDelegate, OmniboxImageSupplier imageSupplier, Supplier tabSupplier, Supplier shareDelegateSupplier) { - super(context, suggestionHost, locationBarDelegate, faviconFetcher, tabSupplier, + super(context, suggestionHost, locationBarDelegate, imageSupplier, tabSupplier, shareDelegateSupplier); } diff --git a/browser/ui/android/strings/android_brave_strings.grd b/browser/ui/android/strings/android_brave_strings.grd index 283b347ff689..07df12afde30 100644 --- a/browser/ui/android/strings/android_brave_strings.grd +++ b/browser/ui/android/strings/android_brave_strings.grd @@ -3003,7 +3003,7 @@ If you don't accept this request, VPN will not reconnect and your internet conne This page wants to interact with Brave Wallet - + Connection error diff --git a/browser/ui/android/strings/android_chrome_strings.grd b/browser/ui/android/strings/android_chrome_strings.grd index f002a8786e08..110b8cf6fd27 100644 --- a/browser/ui/android/strings/android_chrome_strings.grd +++ b/browser/ui/android/strings/android_chrome_strings.grd @@ -203,6 +203,11 @@ CHAR_LIMIT guidelines: + + + Site not working? Third-party cookies are blocked + + Basics @@ -520,12 +525,6 @@ CHAR_LIMIT guidelines: Copied to Brave - - Verify your card - - - Your bank wants to confirm it\u2019s you. - Not seeing your current info? Please contact your bank to update it. @@ -556,6 +555,10 @@ CHAR_LIMIT guidelines: Turn off + + + Autofill Options + @@ -580,11 +583,11 @@ CHAR_LIMIT guidelines: - + Passwords - - Password Manager <new>New</new> + + Password Manager Save passwords @@ -598,6 +601,12 @@ CHAR_LIMIT guidelines: Warn you if passwords are exposed in a data breach + + Warn you if a password was compromised in a data breach + + + When you use a password, Brave warns you if it has been published online. When doing this, your passwords and usernames are encrypted, so they can’t be read by anyone, including Brave. + Check passwords @@ -737,7 +746,7 @@ CHAR_LIMIT guidelines: We’re changing how passwords are saved on this device - Your lists of saved passwords for Brave and Brave %1$sDev will merge after version 121. You’ll be able to autofill all your saved passwords on both apps. + Right now, passwords saved on this device cannot be used across Brave channels. After Brave 121, passwords saved on your device for Brave and %1$sBrave Dev will be merged and can be used in both apps. Got it @@ -761,7 +770,7 @@ CHAR_LIMIT guidelines: Export & delete passwords saved to this device - All passwords will be downloaded on your device and removed from Brave %1$sDev + All passwords will be downloaded on your device and removed from %1$sBrave Dev Next @@ -772,12 +781,27 @@ CHAR_LIMIT guidelines: Delete passwords from Brave Password Manager? + + Deleting + + + Exporting + - Your passwords will be deleted from Brave Password Manager for Brave %1$sDev. You will keep the passwords file you just downloaded. + Your passwords will be deleted from Brave Password Manager for %1$sBrave Dev. You will keep the passwords file you just downloaded. Delete passwords + + Brave Canary + + + Brave Dev + + + Brave Beta + @@ -1195,10 +1219,10 @@ Private state tokens improve privacy on the web and can’t be used to find out You can block sites you don’t want. Brave also auto-deletes sites from the list that are older than 30 days. <link>Learn more</link> - When on, a list of sites you visit that guess your interests appears here. + When on, a list of sites you visit that guess your interests appears here - It can take up to a week for a list of sites to appear here based on your browsing history. + No sites to show right now See all sites @@ -1346,16 +1370,16 @@ Your Brave account may have other forms of browsing history like searches and ac Cookies and site data - Signs you out of most sites. + Signs you out of most sites Signs you out of most sites. You won't be signed out of your Brave sync chain. - Clears history, including in the search box. + Clears history, including in the search box - Clears history from all synced devices. + Clears history from all synced devices <link1>Search history</link1> and <link2>other forms of activity</link2> may be saved in your Brave sync chain when you’re signed in. You can delete them anytime. @@ -1390,6 +1414,9 @@ Your Brave account may have other forms of browsing history like searches and ac Time range + + Last 15 minutes + Last hour @@ -1698,6 +1725,9 @@ Your Brave account may have other forms of browsing history like searches and ac Standard protection against websites, downloads, and extensions that are known to be dangerous. + + Protects against sites, downloads, and extensions that are known to be dangerous. If a page does something suspicious, URLs and bits of page content are sent to Google Safe Browsing. + No protection (not recommended) @@ -1729,6 +1759,9 @@ Your Brave account may have other forms of browsing history like searches and ac Standard protection: + + Standard protection + Detects and warns you about dangerous events when they happen. @@ -1738,6 +1771,9 @@ Your Brave account may have other forms of browsing history like searches and ac Help improve security on the web + + Help improve security on the web for everyone + Sends URLs of some pages you visit, limited system information, and some page content to Brave, to help discover new threats and protect everyone on the web. @@ -1793,9 +1829,6 @@ Your Brave account may have other forms of browsing history like searches and ac Offer to translate - - What languages do you read? - Pick Brave’s language @@ -2147,7 +2180,12 @@ Your Brave account may have other forms of browsing history like searches and ac Tabs that you've opened in Brave on your other devices will appear here. - + + You’ll find your recent tabs here + + + To see your tabs from wherever you use Brave, sign in on all your devices + Search and browse @@ -2429,6 +2467,10 @@ To change this setting, <resetlink>reset sync

+ + Listen to this page + + Print… @@ -3079,16 +3121,16 @@ To change this setting, <resetlink>reset sync

- To sync your info and keep your data secure in the car, you must create a profile lock. You’ll use a code or password every time you enter the car. + To sync your Brave info and keep your data secure in the car, you must create a profile lock. You’ll use a code or password every time you enter the car. - To sync your info and keep your data secure in the car, you must create a profile lock in your security settings. You’ll use a code or password every time you enter the car. + To sync your Brave info and keep your data secure in the car, you must create a profile lock in your security settings. You’ll use a code or password every time you enter the car. Your profile lock keeps your info secure in the car, including synced passwords, payments and more. - Your saved info will be erased if you remove profile lock later. + Your saved data will be erased if the profile lock is removed later. Create a profile lock @@ -3143,6 +3185,12 @@ To change this setting, <resetlink>reset sync

Choose an account + + Choose an account. Currently selected %1$sjohn.doe@example.com. + + + Choose an account. + Sign in to Brave @@ -3535,6 +3583,9 @@ To change this setting, <resetlink>reset sync

Translate + + Listen to this page + Based on your usage @@ -3559,10 +3610,13 @@ To change this setting, <resetlink>reset sync

Quickly translate this page. To edit this shortcut, touch and hold. + + Listen to this page. To edit this shortcut, touch and hold. + Quickly open a new tab. To edit this shortcut, go to Settings. - + Quickly share this page. To edit this shortcut, go to Settings. @@ -3627,8 +3681,8 @@ To change this setting, <resetlink>reset sync

History - - Delete last 15 minutes + + Clear browsing data Downloads @@ -3879,6 +3933,9 @@ To change this setting, <resetlink>reset sync

Sort by oldest + + Sort by last opened + Sort by A to Z @@ -3894,6 +3951,15 @@ To change this setting, <resetlink>reset sync

Create new folder + + Move to\u2026 + + + Move here + + + Cancel + @@ -4040,9 +4106,6 @@ To change this setting, <resetlink>reset sync

You can request the mobile site for %1$swww.example.com - - Switch to desktop site for a better view of this site - @@ -4071,6 +4134,12 @@ To change this setting, <resetlink>reset sync

+ + You’ll find your tabs here + + + Open tabs to visit different pages at the same time + Switch or close tabs @@ -4078,13 +4147,13 @@ To change this setting, <resetlink>reset sync

- Signed in as %1$sPeter Parker. %2$speter.parker@gmail.com. Button. Opens settings. + Signed in as %1$sPeter Parker. %2$speter.parker@gmail.com. Opens settings. - Signed in as %sBruce Wayne. Button. Opens settings. + Signed in as %sBruce Wayne. Opens settings. - Signed out. Button. Opens dialog to sign in and turn on sync. + Signed out. Opens dialog to sign in and turn on sync. Home @@ -4326,6 +4395,9 @@ To change this setting, <resetlink>reset sync

Page insights bottom sheet is closed + + Related Insights + @@ -5551,6 +5623,12 @@ To change this setting, <resetlink>reset sync

Sign in bottom sheet is closed. + + You can use your %1$sidp.com account on this site. To continue, sign in to %1$sidp.com. + + + Continue + Signing you in… @@ -5668,24 +5746,6 @@ To change this setting, <resetlink>reset sync

Price drop spotted - - - - Resume your last task? - - - Easily continue where you left off - - - Restore - - - Task resumed - - - Undo - - Bottom sheet @@ -5698,24 +5758,65 @@ To change this setting, <resetlink>reset sync

- - Delete last 15 minutes? - - - History from the last 15 minutes will be deleted: + + Clear browsing data - + {NUM_TABS, plural, =1 {1 tab on this device} other {# tabs on this device}} + + No tabs on this device + + + No tabs from the %1$slast 15 minutes + + + {DOMAIN_COUNT, plural, + =1 {+ 1 site} + other {+ # sites}} + + + No sites + + + No sites from the %1$slast 15 minutes + + + More on synced devices + Cookies, cache, and other site data - + <link1>Search history</link1> and <link2>other forms of activity</link2> may be saved in your Brave sync chain - + + More options + + + Calculating... + + + %1$sLast 15 minutes deleted + + Deleted + + last 15 minutes + + + last hour + + + last 24 hours + + + last 7 days + + + last 4 weeks + @@ -5739,6 +5840,9 @@ To change this setting, <resetlink>reset sync

Create my own + + Please wait… + diff --git a/browser/ui/brave_layout_constants.cc b/browser/ui/brave_layout_constants.cc index 47234960987f..e4c88b495b59 100644 --- a/browser/ui/brave_layout_constants.cc +++ b/browser/ui/brave_layout_constants.cc @@ -1,7 +1,7 @@ /* Copyright (c) 2019 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "brave/browser/ui/brave_layout_constants.h" @@ -20,6 +20,9 @@ absl::optional GetBraveLayoutConstant(LayoutConstant constant) { case TAB_HEIGHT: { return (touch ? 41 : 30) + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP); } + case TAB_SEPARATOR_HEIGHT: { + return 24; + } default: break; } diff --git a/browser/ui/color/brave_color_mixer.cc b/browser/ui/color/brave_color_mixer.cc index a3261c67bb72..da2e47ef1196 100644 --- a/browser/ui/color/brave_color_mixer.cc +++ b/browser/ui/color/brave_color_mixer.cc @@ -51,7 +51,7 @@ SkColor GetToolbarInkDropColor(const ui::ColorMixer& mixer) { 0xFF * kToolbarInkDropHighlightVisibleOpacity); } -SkColor PickColorContrastingToToolbar(const ui::ColorProviderManager::Key& key, +SkColor PickColorContrastingToToolbar(const ui::ColorProviderKey& key, const ui::ColorMixer& mixer, SkColor color1, SkColor color2) { @@ -67,7 +67,7 @@ SkColor PickColorContrastingToToolbar(const ui::ColorProviderManager::Key& key, } #if BUILDFLAG(ENABLE_BRAVE_VPN) || BUILDFLAG(ENABLE_SPEEDREADER) -SkColor PickSimilarColorToToolbar(const ui::ColorProviderManager::Key& key, +SkColor PickSimilarColorToToolbar(const ui::ColorProviderKey& key, const ui::ColorMixer& mixer, SkColor light_theme_color, SkColor dark_theme_color) { @@ -87,7 +87,7 @@ SkColor PickSimilarColorToToolbar(const ui::ColorProviderManager::Key& key, #if BUILDFLAG(ENABLE_BRAVE_VPN) void AddBraveVpnColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorBraveVpnButtonText] = { @@ -127,7 +127,7 @@ void AddBraveVpnColorMixer(ui::ColorProvider* provider, #if BUILDFLAG(ENABLE_SPEEDREADER) void AddBraveSpeedreaderColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorSpeedreaderIcon] = { @@ -160,7 +160,7 @@ void AddBraveSpeedreaderColorMixer(ui::ColorProvider* provider, #endif void AddChromeLightThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorTabThrobber] = {SkColorSetRGB(0xd7, 0x55, 0x26)}; @@ -201,7 +201,7 @@ void AddChromeLightThemeColorMixer(ui::ColorProvider* provider, } void AddChromeDarkThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorTabThrobber] = {SkColorSetRGB(0xd7, 0x55, 0x26)}; @@ -291,20 +291,19 @@ SkColor GetOmniboxResultBackground(int id, bool dark, bool priv) { color, base::ClampRound(omnibox_opacity * 0xff)); } -void AddBravifiedChromeThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBravifiedChromeThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { if (key.custom_theme) { return; } - key.color_mode == ui::ColorProviderManager::ColorMode::kDark + key.color_mode == ui::ColorProviderKey::ColorMode::kDark ? AddChromeDarkThemeColorMixer(provider, key) : AddChromeLightThemeColorMixer(provider, key); } void AddBraveLightThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorForTest] = {kLightColorForTest}; @@ -398,7 +397,7 @@ void AddBraveLightThemeColorMixer(ui::ColorProvider* provider, } void AddBraveDarkThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorForTest] = {kDarkColorForTest}; @@ -491,8 +490,8 @@ void AddBraveDarkThemeColorMixer(ui::ColorProvider* provider, // Handling dark or light theme on normal profile. void AddBraveThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { - key.color_mode == ui::ColorProviderManager::ColorMode::kDark + const ui::ColorProviderKey& key) { + key.color_mode == ui::ColorProviderKey::ColorMode::kDark ? AddBraveDarkThemeColorMixer(provider, key) : AddBraveLightThemeColorMixer(provider, key); #if BUILDFLAG(ENABLE_BRAVE_VPN) @@ -504,7 +503,7 @@ void AddBraveThemeColorMixer(ui::ColorProvider* provider, } void AddBravePrivateThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddBraveDarkThemeColorMixer(provider, key); // Add private theme specific brave colors here. @@ -513,7 +512,7 @@ void AddBravePrivateThemeColorMixer(ui::ColorProvider* provider, } void AddBraveTorThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddBravePrivateThemeColorMixer(provider, key); AddChromeDarkThemeColorMixer(provider, key); @@ -521,7 +520,7 @@ void AddBraveTorThemeColorMixer(ui::ColorProvider* provider, } void AddPrivateThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddBravePrivateThemeColorMixer(provider, key); AddChromeDarkThemeColorMixer(provider, key); @@ -551,7 +550,7 @@ void AddPrivateThemeColorMixer(ui::ColorProvider* provider, } void AddTorThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddBraveTorThemeColorMixer(provider, key); ui::ColorMixer& mixer = provider->AddMixer(); @@ -573,9 +572,8 @@ void AddTorThemeColorMixer(ui::ColorProvider* provider, color_utils::HSLShift(kPrivateTorFrame, {-1, -1, 0.55})}; } -void AddBraveOmniboxLightThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBraveOmniboxLightThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( @@ -595,9 +593,8 @@ void AddBraveOmniboxLightThemeColorMixer( /*dark*/ false, /*incognito*/ false)}; } -void AddBraveOmniboxDarkThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBraveOmniboxDarkThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( @@ -617,9 +614,8 @@ void AddBraveOmniboxDarkThemeColorMixer( /*dark*/ true, /*incognito*/ false)}; } -void AddBraveOmniboxPrivateThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBraveOmniboxPrivateThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( diff --git a/browser/ui/color/brave_color_mixer.h b/browser/ui/color/brave_color_mixer.h index 418a6d6e531b..ed1a09cf6b56 100644 --- a/browser/ui/color/brave_color_mixer.h +++ b/browser/ui/color/brave_color_mixer.h @@ -7,7 +7,7 @@ #define BRAVE_BROWSER_UI_COLOR_BRAVE_COLOR_MIXER_H_ #include "third_party/skia/include/core/SkColor.h" -#include "ui/color/color_provider_manager.h" +#include "ui/color/color_provider_key.h" namespace ui { class ColorProvider; @@ -19,22 +19,18 @@ SkColor GetOmniboxResultBackground(int id, bool dark, bool priv); // Handling normal profile's dark or light theme. void AddBraveThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); -void AddBravifiedChromeThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); + const ui::ColorProviderKey& key); +void AddBravifiedChromeThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); void AddPrivateThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); + const ui::ColorProviderKey& key); void AddTorThemeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); -void AddBraveOmniboxLightThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); -void AddBraveOmniboxDarkThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); -void AddBraveOmniboxPrivateThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); + const ui::ColorProviderKey& key); +void AddBraveOmniboxLightThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); +void AddBraveOmniboxDarkThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); +void AddBraveOmniboxPrivateThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); #endif // BRAVE_BROWSER_UI_COLOR_BRAVE_COLOR_MIXER_H_ diff --git a/browser/ui/color/playlist/playlist_color_mixer.cc b/browser/ui/color/playlist/playlist_color_mixer.cc index 2250ba30310d..50b32ad63165 100644 --- a/browser/ui/color/playlist/playlist_color_mixer.cc +++ b/browser/ui/color/playlist/playlist_color_mixer.cc @@ -14,7 +14,7 @@ namespace playlist { void AddThemeColorMixer(ui::ColorProvider* provider, leo::Theme theme, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); mixer[kColorBravePlaylistAddedIcon] = { leo::GetColor(leo::Color::kColorSystemfeedbackSuccessIcon, theme)}; diff --git a/browser/ui/color/playlist/playlist_color_mixer.h b/browser/ui/color/playlist/playlist_color_mixer.h index b6efddc2f522..ad18ab698f10 100644 --- a/browser/ui/color/playlist/playlist_color_mixer.h +++ b/browser/ui/color/playlist/playlist_color_mixer.h @@ -7,7 +7,7 @@ #define BRAVE_BROWSER_UI_COLOR_PLAYLIST_PLAYLIST_COLOR_MIXER_H_ #include "brave/browser/ui/color/leo/colors.h" -#include "ui/color/color_provider_manager.h" +#include "ui/color/color_provider_key.h" namespace ui { class ColorProvider; @@ -17,7 +17,7 @@ namespace playlist { void AddThemeColorMixer(ui::ColorProvider* provider, leo::Theme theme, - const ui::ColorProviderManager::Key& key); + const ui::ColorProviderKey& key); } // namespace playlist diff --git a/browser/ui/commander/commander_service_browsertest.cc b/browser/ui/commander/commander_service_browsertest.cc index c3b7cd283796..b85317929b77 100644 --- a/browser/ui/commander/commander_service_browsertest.cc +++ b/browser/ui/commander/commander_service_browsertest.cc @@ -133,8 +133,14 @@ IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, base::BindLambdaForTesting([&]() { return !commander()->IsShowing(); })); } +// This test is flaky on macOS CI. +#if BUILDFLAG(IS_MAC) +#define MAYBE_CommandsAreUpdatedViaOmnibox DISABLED_CommandsAreUpdatedViaOmnibox +#else +#define MAYBE_CommandsAreUpdatedViaOmnibox CommandsAreUpdatedViaOmnibox +#endif IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, - CommandsAreUpdatedViaOmnibox) { + MAYBE_CommandsAreUpdatedViaOmnibox) { omnibox()->SetUserText( base::StrCat({commander::kCommandPrefix, u" NT Right"})); @@ -149,7 +155,14 @@ IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, #endif } -IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, CommandsCanBeSelected) { +// This test is flaky on macOS CI. +#if BUILDFLAG(IS_MAC) +#define MAYBE_CommandsCanBeSelected DISABLED_CommandsCanBeSelected +#else +#define MAYBE_CommandsCanBeSelected CommandsCanBeSelected +#endif +IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, + MAYBE_CommandsCanBeSelected) { omnibox()->SetUserText( base::StrCat({commander::kCommandPrefix, u" New tab"})); @@ -169,8 +182,15 @@ IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, CommandsCanBeSelected) { EXPECT_EQ(2, browser()->tab_strip_model()->count()); } +// This test is flaky on macOS CI. +#if BUILDFLAG(IS_MAC) +#define MAYBE_CompositeCommandsCanBeSelected \ + DISABLED_CompositeCommandsCanBeSelected +#else +#define MAYBE_CompositeCommandsCanBeSelected CompositeCommandsCanBeSelected +#endif IN_PROC_BROWSER_TEST_F(CommanderServiceBrowserTest, - CompositeCommandsCanBeSelected) { + MAYBE_CompositeCommandsCanBeSelected) { omnibox()->SetUserText( base::StrCat({commander::kCommandPrefix, u" Pin tab"})); diff --git a/browser/ui/tabs/brave_vertical_tab_color_mixer.cc b/browser/ui/tabs/brave_vertical_tab_color_mixer.cc index 2e40f201a83c..00eb11f21ce8 100644 --- a/browser/ui/tabs/brave_vertical_tab_color_mixer.cc +++ b/browser/ui/tabs/brave_vertical_tab_color_mixer.cc @@ -10,6 +10,7 @@ #include "chrome/browser/ui/color/chrome_color_id.h" #include "ui/color/color_mixer.h" #include "ui/color/color_provider.h" +#include "ui/color/color_provider_key.h" #include "ui/color/color_recipe.h" namespace { @@ -39,7 +40,7 @@ ChromeColorIds GetMappedChromeColorId(BraveColorIds brave_color_id) { } ui::ColorTransform GetCustomColorOrDefaultColor( - const scoped_refptr& + const scoped_refptr& custom_theme, BraveColorIds color_id, SkColor color) { @@ -63,9 +64,8 @@ ui::ColorTransform GetCustomColorOrDefaultColor( namespace tabs { -void AddBraveVerticalTabLightThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBraveVerticalTabLightThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); static constexpr const auto kDefaultColorMap = @@ -89,9 +89,8 @@ void AddBraveVerticalTabLightThemeColorMixer( } } -void AddBraveVerticalTabDarkThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { +void AddBraveVerticalTabDarkThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key) { ui::ColorMixer& mixer = provider->AddMixer(); static constexpr const auto kDefaultColorMap = diff --git a/browser/ui/tabs/brave_vertical_tab_color_mixer.h b/browser/ui/tabs/brave_vertical_tab_color_mixer.h index e8bd1d6ff3e1..0b14345c13f0 100644 --- a/browser/ui/tabs/brave_vertical_tab_color_mixer.h +++ b/browser/ui/tabs/brave_vertical_tab_color_mixer.h @@ -6,16 +6,14 @@ #ifndef BRAVE_BROWSER_UI_TABS_BRAVE_VERTICAL_TAB_COLOR_MIXER_H_ #define BRAVE_BROWSER_UI_TABS_BRAVE_VERTICAL_TAB_COLOR_MIXER_H_ -#include "ui/color/color_provider_manager.h" +#include "ui/color/color_provider_key.h" namespace tabs { -void AddBraveVerticalTabLightThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); -void AddBraveVerticalTabDarkThemeColorMixer( - ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key); +void AddBraveVerticalTabLightThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); +void AddBraveVerticalTabDarkThemeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderKey& key); } // namespace tabs diff --git a/browser/ui/views/brave_actions/brave_rewards_action_view.cc b/browser/ui/views/brave_actions/brave_rewards_action_view.cc index fa6e2ae4b4da..9643ec60d5e7 100644 --- a/browser/ui/views/brave_actions/brave_rewards_action_view.cc +++ b/browser/ui/views/brave_actions/brave_rewards_action_view.cc @@ -31,6 +31,7 @@ #include "components/grit/brave_components_strings.h" #include "components/prefs/pref_service.h" #include "ui/base/models/simple_menu_model.h" +#include "ui/color/color_provider_manager.h" #include "ui/gfx/canvas.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/image/image.h" diff --git a/browser/ui/views/brave_actions/brave_shields_action_view.cc b/browser/ui/views/brave_actions/brave_shields_action_view.cc index de8eac258731..6c72115c2f0f 100644 --- a/browser/ui/views/brave_actions/brave_shields_action_view.cc +++ b/browser/ui/views/brave_actions/brave_shields_action_view.cc @@ -28,6 +28,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/color/color_provider_manager.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/skia_conversions.h" #include "ui/gfx/image/image_skia_rep.h" diff --git a/browser/ui/views/frame/brave_browser_frame.cc b/browser/ui/views/frame/brave_browser_frame.cc index cc353673eea6..733a7841f1f4 100644 --- a/browser/ui/views/frame/brave_browser_frame.cc +++ b/browser/ui/views/frame/brave_browser_frame.cc @@ -13,6 +13,7 @@ #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/views/frame/browser_view.h" +#include "ui/color/color_provider_key.h" BraveBrowserFrame::BraveBrowserFrame(BrowserView* browser_view) : BrowserFrame(browser_view), view_(browser_view) { @@ -41,7 +42,7 @@ const ui::NativeTheme* BraveBrowserFrame::GetNativeTheme() const { } #endif -ui::ColorProviderManager::ThemeInitializerSupplier* +ui::ColorProviderKey::ThemeInitializerSupplier* BraveBrowserFrame::GetCustomTheme() const { // To provider private(tor) windows's theme color via color provider, // we use |theme_supplier_| for both as upstream doesn't use separated diff --git a/browser/ui/views/frame/brave_browser_frame.h b/browser/ui/views/frame/brave_browser_frame.h index 28d372ae84bb..f6d16c5a9f76 100644 --- a/browser/ui/views/frame/brave_browser_frame.h +++ b/browser/ui/views/frame/brave_browser_frame.h @@ -10,6 +10,7 @@ #include "base/memory/scoped_refptr.h" #include "build/build_config.h" #include "chrome/browser/ui/views/frame/browser_frame.h" +#include "ui/color/color_provider_key.h" class CustomThemeSupplier; @@ -26,7 +27,7 @@ class BraveBrowserFrame : public BrowserFrame { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) const ui::NativeTheme* GetNativeTheme() const override; #endif - ui::ColorProviderManager::ThemeInitializerSupplier* GetCustomTheme() + ui::ColorProviderKey::ThemeInitializerSupplier* GetCustomTheme() const override; views::internal::RootView* CreateRootView() override; diff --git a/browser/ui/views/frame/brave_browser_view.cc b/browser/ui/views/frame/brave_browser_view.cc index fd899bc01aa5..288d6b5e258c 100644 --- a/browser/ui/views/frame/brave_browser_view.cc +++ b/browser/ui/views/frame/brave_browser_view.cc @@ -170,7 +170,8 @@ class BraveBrowserView::TabCyclingEventHandler : public ui::EventObserver, BraveBrowserView::BraveBrowserView(std::unique_ptr browser) : BrowserView(std::move(browser)) { pref_change_registrar_.Init(GetProfile()->GetPrefs()); - if (!WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled(browser_.get())) { + if (!WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled( + browser_.get())) { pref_change_registrar_.Add( kTabsSearchShow, base::BindRepeating(&BraveBrowserView::OnPreferenceChanged, @@ -685,7 +686,7 @@ void BraveBrowserView::OnThemeChanged() { TabSearchBubbleHost* BraveBrowserView::GetTabSearchBubbleHost() { if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs) || !tabs::utils::ShouldShowVerticalTabs(browser()) || - WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled(browser())) { + WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled(browser())) { return BrowserView::GetTabSearchBubbleHost(); } diff --git a/browser/ui/views/frame/brave_tabs_search_button_browsertest.cc b/browser/ui/views/frame/brave_tabs_search_button_browsertest.cc index f08430b991e1..06101bdd71ac 100644 --- a/browser/ui/views/frame/brave_tabs_search_button_browsertest.cc +++ b/browser/ui/views/frame/brave_tabs_search_button_browsertest.cc @@ -34,7 +34,7 @@ IN_PROC_BROWSER_TEST_F(BraveTabsSearchButtonTest, HideShowSettingTest) { EXPECT_TRUE(prefs->GetBoolean(kTabsSearchShow)); views::View* button = nullptr; - if (WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled(browser())) { + if (WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled(browser())) { auto* frame_view = BrowserView::GetBrowserViewForBrowser(browser()) ->frame() ->GetFrameView(); diff --git a/browser/ui/views/frame/vertical_tab_strip_region_view.cc b/browser/ui/views/frame/vertical_tab_strip_region_view.cc index c29bd6327e9f..e009ac7c3569 100644 --- a/browser/ui/views/frame/vertical_tab_strip_region_view.cc +++ b/browser/ui/views/frame/vertical_tab_strip_region_view.cc @@ -80,15 +80,9 @@ class ToggleButton : public BraveNewTabButton { constexpr static int GetIconWidth() { return tabs::kVerticalTabHeight; } - // views::Button: + // views::BraveNewTabButton: void OnThemeChanged() override { - Button::OnThemeChanged(); - - FrameColorsChanged(); - } - - void FrameColorsChanged() override { - NewTabButton::FrameColorsChanged(); + BraveNewTabButton::OnThemeChanged(); // Resets the ink drop highlight color views::InkDrop::Get(this)->GetInkDrop()->HostViewThemeChanged(); @@ -106,7 +100,7 @@ class ToggleButton : public BraveNewTabButton { icon_ = gfx::CreateVectorIcon(kVerticalTabStripToggleButtonIcon, color); } - void PaintIcon(gfx::Canvas* canvas) override { + void PaintButtonContents(gfx::Canvas* canvas) override { const gfx::Point origin = GetContentsBounds().CenterPoint() - gfx::Vector2d(icon_.width() / 2, icon_.height() / 2); @@ -123,10 +117,6 @@ class ToggleButton : public BraveNewTabButton { views::Emphasis::kMaximum, GetPreferredSize()); } - void PaintFill(gfx::Canvas* canvas) const override { - // dont' fill - } - std::u16string GetTooltipText(const gfx::Point& p) const override { if (region_view_->state() == VerticalTabStripRegionView::State::kExpanded) { return l10n_util::GetStringUTF16(IDS_VERTICAL_TABS_MINIMIZE); @@ -217,23 +207,9 @@ class VerticalTabSearchButton : public BraveTabSearchButton { ~VerticalTabSearchButton() override = default; // BraveTabSearchButton: - SkPath GetBorderPath(const gfx::Point& origin, - float scale, - bool extend_to_top) const override { - // Return empty path in order not to fill the background. - return {}; - } - void OnThemeChanged() override { BraveTabSearchButton::OnThemeChanged(); - FrameColorsChanged(); - } - - void FrameColorsChanged() override { - TabSearchButton::FrameColorsChanged(); - // We should call SetImageModel() after FrameColorChanged() to override - // the icon. SetImageModel(views::Button::STATE_NORMAL, ui::ImageModel::FromVectorIcon( kLeoSearchIcon, kColorBraveVerticalTabHeaderButtonColor, @@ -387,8 +363,8 @@ class VerticalTabNewTabButton : public BraveNewTabButton { canvas->DrawRect(gfx::RectF(separator_bounds), flags); } - void FrameColorsChanged() override { - BraveNewTabButton::FrameColorsChanged(); + void OnThemeChanged() override { + BraveNewTabButton::OnThemeChanged(); CHECK(text_ && shortcut_text_); @@ -534,7 +510,7 @@ class VerticalTabStripRegionView::HeaderView : public views::View { void UpdateTabSearchButtonVisibility() { tab_search_button_->SetVisible( - !WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled( + !WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled( region_view_->browser()) && tab_search_button_->GetPreferredSize().width() + toggle_button_->GetPreferredSize().width() <= diff --git a/browser/ui/views/omnibox/brave_omnibox_result_view.cc b/browser/ui/views/omnibox/brave_omnibox_result_view.cc index 321c75bf9937..4a0b78b681ad 100644 --- a/browser/ui/views/omnibox/brave_omnibox_result_view.cc +++ b/browser/ui/views/omnibox/brave_omnibox_result_view.cc @@ -17,6 +17,7 @@ #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_provider_client.h" #include "components/omnibox/browser/autocomplete_result.h" +#include "components/omnibox/browser/omnibox_controller.h" #include "components/omnibox/browser/omnibox_edit_model.h" #include "components/omnibox/browser/omnibox_popup_selection.h" #include "ui/base/metadata/metadata_impl_macros.h" @@ -53,12 +54,12 @@ void BraveOmniboxResultView::OnSelectionStateChanged() { } void BraveOmniboxResultView::OpenMatch() { - model_->OpenSelection(OmniboxPopupSelection(model_index_), - base::TimeTicks::Now()); + popup_view_->model()->OpenSelection(OmniboxPopupSelection(model_index_), + base::TimeTicks::Now()); } void BraveOmniboxResultView::RefreshOmniboxResult() { - auto* controller = model_->autocomplete_controller(); + auto* controller = popup_view_->controller()->autocomplete_controller(); // To refresh autocomplete result, start again with current input. controller->Start(controller->input()); @@ -82,7 +83,7 @@ void BraveOmniboxResultView::UpdateForBraveSearchConversion() { button_row_->SetVisible(false); if (!brave_search_promotion_view_) { - auto* controller = model_->autocomplete_controller(); + auto* controller = popup_view_->controller()->autocomplete_controller(); auto* prefs = controller->autocomplete_provider_client()->GetPrefs(); brave_search_promotion_view_ = AddChildView(std::make_unique( @@ -92,7 +93,7 @@ void BraveOmniboxResultView::UpdateForBraveSearchConversion() { brave_search_promotion_view_->SetVisible(true); brave_search_promotion_view_->SetTypeAndInput( GetConversionTypeFromMatch(match_), - model_->autocomplete_controller()->input().text()); + popup_view_->controller()->autocomplete_controller()->input().text()); } BEGIN_METADATA(BraveOmniboxResultView, OmniboxResultView) diff --git a/browser/ui/views/omnibox/omnibox_autocomplete_browsertest.cc b/browser/ui/views/omnibox/omnibox_autocomplete_browsertest.cc index 94aa64a7b209..ab15443d4379 100644 --- a/browser/ui/views/omnibox/omnibox_autocomplete_browsertest.cc +++ b/browser/ui/views/omnibox/omnibox_autocomplete_browsertest.cc @@ -15,6 +15,7 @@ #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/omnibox/browser/omnibox_controller.h" #include "components/omnibox/browser/omnibox_edit_model.h" #include "components/prefs/pref_service.h" #include "content/public/test/browser_test.h" @@ -34,27 +35,27 @@ class OmniboxAutocompleteTest : public InProcessBrowserTest { IN_PROC_BROWSER_TEST_F(OmniboxAutocompleteTest, AutocompleteDisabledTest) { EXPECT_FALSE(popup_view()->IsOpen()); - EXPECT_TRUE(edit_model()->result().empty()); + EXPECT_TRUE(omnibox_view()->controller()->result().empty()); // Initially autocomplete is enabled. EXPECT_TRUE(browser()->profile()->GetPrefs()->GetBoolean( omnibox::kAutocompleteEnabled)); - edit_model()->SetUserText(u"foo"); + omnibox_view()->SetUserText(u"foo", /* update_popup=*/true); edit_model()->StartAutocomplete(false, false); // Check popup is opened and results are not empty. - EXPECT_FALSE(edit_model()->result().empty()); + EXPECT_FALSE(omnibox_view()->controller()->result().empty()); EXPECT_TRUE(popup_view()->IsOpen()); edit_model()->StopAutocomplete(); browser()->profile()->GetPrefs()->SetBoolean(omnibox::kAutocompleteEnabled, false); - edit_model()->SetUserText(u"bar"); + omnibox_view()->SetUserText(u"bar", /* update_popup=*/true); edit_model()->StartAutocomplete(false, false); // Check popup isn't opened and result is empty. - EXPECT_TRUE(edit_model()->result().empty()); + EXPECT_TRUE(omnibox_view()->controller()->result().empty()); EXPECT_FALSE(popup_view()->IsOpen()); } diff --git a/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.cc b/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.cc index 18ec02fa0e62..8931b20dd9f4 100644 --- a/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.cc +++ b/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.cc @@ -46,3 +46,8 @@ permissions::PermissionPromptDisposition BraveWalletPermissionPromptImpl::GetPromptDisposition() const { return permissions::PermissionPromptDisposition::ANCHORED_BUBBLE; } + +absl::optional +BraveWalletPermissionPromptImpl::GetViewBoundsInScreen() const { + return absl::nullopt; +} diff --git a/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.h b/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.h index d849dfae99c1..c050a33f44e1 100644 --- a/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.h +++ b/browser/ui/views/permission_bubble/brave_wallet_permission_prompt_impl.h @@ -29,6 +29,7 @@ class BraveWalletPermissionPromptImpl : public permissions::PermissionPrompt { TabSwitchingBehavior GetTabSwitchingBehavior() override; permissions::PermissionPromptDisposition GetPromptDisposition() const override; + absl::optional GetViewBoundsInScreen() const override; private: void ShowBubble(); diff --git a/browser/ui/views/playlist/playlist_action_dialogs.cc b/browser/ui/views/playlist/playlist_action_dialogs.cc index a3ef25440d5a..7eef21b0d8e0 100644 --- a/browser/ui/views/playlist/playlist_action_dialogs.cc +++ b/browser/ui/views/playlist/playlist_action_dialogs.cc @@ -100,8 +100,8 @@ class TiledItemsView : public views::BoxLayoutView { // prerequisite. // * Download the thumbnail from network // * Sanitize the image - auto* row = i < kMaxTileCount / 2 ? container->children().front() - : container->children().back(); + views::View* row = i < kMaxTileCount / 2 ? container->children().front() + : container->children().back(); auto* thumbnail = row->AddChildView(std::make_unique(gfx::Image())); diff --git a/browser/ui/views/tabs/brave_tab.cc b/browser/ui/views/tabs/brave_tab.cc index 6b423588d39c..b76e03bc44cf 100644 --- a/browser/ui/views/tabs/brave_tab.cc +++ b/browser/ui/views/tabs/brave_tab.cc @@ -135,8 +135,9 @@ int BraveTab::GetWidthOfLargestSelectableRegion() const { selectable_width -= alert_indicator_button_->width(); } - if (close_button_->GetVisible()) + if (close_button_->GetVisible()) { selectable_width -= close_button_->width(); + } return std::max(0, selectable_width); } @@ -157,8 +158,9 @@ void BraveTab::ActiveStateChanged() { } absl::optional BraveTab::GetGroupColor() const { - if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) + if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) { return Tab::GetGroupColor(); + } // Hide tab border with group color as it doesn't go well with vertical tabs. if (tabs::utils::ShouldShowVerticalTabs(controller()->GetBrowser())) { @@ -222,12 +224,6 @@ void BraveTab::Layout() { if (showing_close_button_) { close_button_->SetX(GetLocalBounds().CenterPoint().x() - (close_button_->width() / 2)); - gfx::Insets* current_padding = - close_button_->GetProperty(views::kInternalPaddingKey); - DCHECK(current_padding); - - // Use the same padding for all sides. - close_button_->SetButtonPadding(gfx::Insets(current_padding->left())); // In order to reset ink drop bounds based on new padding. auto* ink_drop = views::InkDrop::Get(close_button_)->GetInkDrop(); @@ -303,8 +299,9 @@ bool BraveTab::ShouldRenderAsNormalTab() const { } bool BraveTab::IsAtMinWidthForVerticalTabStrip() const { - if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) + if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) { return false; + } return tabs::utils::ShouldShowVerticalTabs(controller()->GetBrowser()) && width() <= tabs::kVerticalTabMinWidth; diff --git a/browser/ui/views/tabs/brave_tab_strip.cc b/browser/ui/views/tabs/brave_tab_strip.cc index f77396ee1261..c04d944420ba 100644 --- a/browser/ui/views/tabs/brave_tab_strip.cc +++ b/browser/ui/views/tabs/brave_tab_strip.cc @@ -75,13 +75,14 @@ bool BraveTabStrip::IsVerticalTabsFloating() const { bool BraveTabStrip::ShouldDrawStrokes() const { if (ShouldShowVerticalTabs()) { - // Prevent root view from drawing lines. For tabs, we're overriding - // GetStrokeThickness(). + // Prevent root view from drawing lines. For vertical tabs stroke , we + // ignore this method and always draw strokes in GetStrokeThickness(). return false; } - if (!TabStrip::ShouldDrawStrokes()) + if (!TabStrip::ShouldDrawStrokes()) { return false; + } // Use a little bit lower minimum contrast ratio as our ratio is 1.27979 // between default tab background and frame color of light theme. @@ -93,8 +94,9 @@ bool BraveTabStrip::ShouldDrawStrokes() const { // enabled state. Although TabStrip::ShouldDrawStrokes() has related code, // that feature is already expired since cr82. See // chrome/browser/flag-metadata.json. - const SkColor background_color = GetTabBackgroundColor( - TabActive::kActive, BrowserFrameActiveState::kActive); + const SkColor background_color = TabStyle::Get()->GetTabBackgroundColor( + TabStyle::TabSelectionState::kActive, /*hovered=*/false, + /*frame_active*/ true, *GetColorProvider()); const SkColor frame_color = controller_->GetFrameColor(BrowserFrameActiveState::kActive); const float contrast_ratio = @@ -112,8 +114,9 @@ int BraveTabStrip::GetStrokeThickness() const { } void BraveTabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) { - if (brave_tabs::AreTooltipsEnabled(controller_->GetProfile()->GetPrefs())) + if (brave_tabs::AreTooltipsEnabled(controller_->GetProfile()->GetPrefs())) { return; + } TabStrip::UpdateHoverCard(tab, update_type); } @@ -128,8 +131,9 @@ void BraveTabStrip::MaybeStartDrag( source->GetTabSlotViewType() == TabSlotView::ViewType::kTab && static_cast(source)->data().pinned; for (size_t index : original_selection.selected_indices()) { - if (controller_->IsTabPinned(index) != source_is_pinned) + if (controller_->IsTabPinned(index) != source_is_pinned) { return; + } } } @@ -158,8 +162,9 @@ void BraveTabStrip::MaybeStartDrag( void BraveTabStrip::AddedToWidget() { TabStrip::AddedToWidget(); - if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) + if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) { return; + } if (BrowserView::GetBrowserViewForBrowser(GetBrowser())) { UpdateTabContainer(); @@ -172,29 +177,16 @@ void BraveTabStrip::AddedToWidget() { } } -SkColor BraveTabStrip::GetTabBackgroundColor( - TabActive active, - BrowserFrameActiveState active_state) const { - if (!ShouldShowVerticalTabs()) - return TabStrip::GetTabBackgroundColor(active, active_state); - - const ui::ColorProvider* cp = GetColorProvider(); - if (!cp) - return gfx::kPlaceholderColor; - - return cp->GetColor(active == TabActive::kActive - ? kColorBraveVerticalTabActiveBackground - : kColorBraveVerticalTabInactiveBackground); -} - SkColor BraveTabStrip::GetTabSeparatorColor() const { - if (ShouldShowVerticalTabs()) + if (ShouldShowVerticalTabs()) { return SK_ColorTRANSPARENT; + } Profile* profile = controller()->GetProfile(); if (!brave::IsRegularProfile(profile)) { - if (profile->IsTor()) + if (profile->IsTor()) { return SkColorSetRGB(0x5A, 0x53, 0x66); + } // For incognito/guest window. return SkColorSetRGB(0x3F, 0x32, 0x56); @@ -202,8 +194,9 @@ SkColor BraveTabStrip::GetTabSeparatorColor() const { // If custom theme is used, follow upstream separator color. auto* theme_service = ThemeServiceFactory::GetForProfile(profile); - if (theme_service->GetThemeSupplier()) + if (theme_service->GetThemeSupplier()) { return TabStrip::GetTabSeparatorColor(); + } bool dark_mode = dark_mode::GetActiveBraveDarkModeType() == dark_mode::BraveDarkModeType::BRAVE_DARK_MODE_TYPE_DARK; @@ -211,6 +204,27 @@ SkColor BraveTabStrip::GetTabSeparatorColor() const { : SkColorSetRGB(0xBE, 0xBF, 0xBF); } +absl::optional BraveTabStrip::GetCustomBackgroundId( + BrowserFrameActiveState active_state) const { + if (!ShouldShowVerticalTabs()) { + return TabStrip::GetCustomBackgroundId(active_state); + } + + // When vertical tab strip mode is enabled, the tab strip could be reattached + // to the original parent during destruction. In this case, theme changing + // could occur. But unfortunately, some of native widget's implementation + // doesn't check the validity of pointer, which causes crash. + // e.g. DesktopNativeWidgetAura's many methods desktop_tree_host without + // checking it's validity. + // In order to avoid accessing invalid pointer, filters here. + if (auto* widget = GetWidget(); + !widget || widget->IsClosed() || !widget->native_widget()) { + return {}; + } + + return TabStrip::GetCustomBackgroundId(active_state); +} + void BraveTabStrip::UpdateTabContainer() { DCHECK(base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) << "This should be called only when the flag is on."; @@ -279,8 +293,9 @@ void BraveTabStrip::UpdateTabContainer() { tab_container_->AddTab( tab->parent()->RemoveChildViewT(tab), i, tab->data().pinned ? TabPinned::kPinned : TabPinned::kUnpinned); - if (tab->dragging()) + if (tab->dragging()) { GetDragContext()->AddChildView(tab); + } } auto* group_model = model->group_model(); @@ -315,8 +330,9 @@ void BraveTabStrip::UpdateTabContainer() { } for (int i = 0; i < model->count(); i++) { - for (auto& observer : observers_) + for (auto& observer : observers_) { observer.OnTabAdded(i); + } } // During drag-and-drop session, the active value could be invalid. @@ -381,8 +397,9 @@ void BraveTabStrip::UpdateTabContainer() { } bool BraveTabStrip::ShouldShowVerticalTabs() const { - if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) + if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs)) { return false; + } return tabs::utils::ShouldShowVerticalTabs(GetBrowser()); } @@ -393,10 +410,11 @@ void BraveTabStrip::Layout() { // want. auto bounds = GetLocalBounds(); for (auto* view : children()) { - if (view->bounds() != bounds) + if (view->bounds() != bounds) { view->SetBoundsRect(GetLocalBounds()); - else if (view == &tab_container_.get()) + } else if (view == &tab_container_.get()) { view->Layout(); + } } return; } diff --git a/browser/ui/views/tabs/brave_tab_strip.h b/browser/ui/views/tabs/brave_tab_strip.h index f2aef0895a8f..2382c7a384c4 100644 --- a/browser/ui/views/tabs/brave_tab_strip.h +++ b/browser/ui/views/tabs/brave_tab_strip.h @@ -30,6 +30,8 @@ class BraveTabStrip : public TabStrip { const ui::LocatedEvent& event, const ui::ListSelectionModel& original_selection) override; void AddedToWidget() override; + absl::optional GetCustomBackgroundId( + BrowserFrameActiveState active_state) const override; private: FRIEND_TEST_ALL_PREFIXES(ColorPaletteTest, LightThemeMinimumContrast); @@ -38,9 +40,6 @@ class BraveTabStrip : public TabStrip { bool ShouldShowVerticalTabs() const; // TabStrip overrides: - SkColor GetTabBackgroundColor( - TabActive active, - BrowserFrameActiveState active_state) const override; SkColor GetTabSeparatorColor() const override; bool ShouldDrawStrokes() const override; int GetStrokeThickness() const override; diff --git a/browser/ui/views/tabs/brave_tab_style_views.inc.cc b/browser/ui/views/tabs/brave_tab_style_views.inc.cc index 38059d7add15..afecf2a599c7 100644 --- a/browser/ui/views/tabs/brave_tab_style_views.inc.cc +++ b/browser/ui/views/tabs/brave_tab_style_views.inc.cc @@ -19,7 +19,7 @@ class BraveGM2TabStyle : public GM2TabStyleViews { ~BraveGM2TabStyle() override = default; protected: - TabStyle::TabColors CalculateColors() const override; + TabStyle::TabColors CalculateTargetColors() const override; Tab* tab() { return base::to_address(tab_); } const Tab* tab() const { return base::to_address(tab_); } @@ -31,8 +31,8 @@ class BraveGM2TabStyle : public GM2TabStyleViews { BraveGM2TabStyle::BraveGM2TabStyle(Tab* tab) : GM2TabStyleViews(tab), tab_(tab) {} -TabStyle::TabColors BraveGM2TabStyle::CalculateColors() const { - auto colors = GM2TabStyleViews::CalculateColors(); +TabStyle::TabColors BraveGM2TabStyle::CalculateTargetColors() const { + auto colors = GM2TabStyleViews::CalculateTargetColors(); const SkColor inactive_non_hovered_fg_color = SkColorSetA( colors.foreground_color, gfx::Tween::IntValueBetween(0.7, SK_AlphaTRANSPARENT, SK_AlphaOPAQUE)); @@ -69,6 +69,9 @@ class BraveVerticalTabStyle : public BraveGM2TabStyle { private: bool ShouldShowVerticalTabs() const; bool IsInGroupAndNotActive() const; + SkColor GetTargetTabBackgroundColor( + TabStyle::TabSelectionState selection_state, + bool hovered) const override; }; BraveVerticalTabStyle::BraveVerticalTabStyle(Tab* tab) : BraveGM2TabStyle(tab) { @@ -171,10 +174,29 @@ void BraveVerticalTabStyle::PaintTab(gfx::Canvas* canvas) const { CHECK(widget); const SkColor tab_stroke_color = widget->GetColorProvider()->GetColor(kColorBraveVerticalTabSeparator); - PaintBackgroundStroke(canvas, TabActive::kActive, tab_stroke_color); + PaintBackgroundStroke(canvas, TabStyle::TabSelectionState::kActive, + tab_stroke_color); } } +SkColor BraveVerticalTabStyle::GetTargetTabBackgroundColor( + TabStyle::TabSelectionState selection_state, + bool hovered) const { + if (!ShouldShowVerticalTabs()) { + return BraveGM2TabStyle::GetTargetTabBackgroundColor(selection_state, + hovered); + } + + const ui::ColorProvider* cp = tab()->GetColorProvider(); + if (!cp) { + return gfx::kPlaceholderColor; + } + + return cp->GetColor(selection_state == TabStyle::TabSelectionState::kActive + ? kColorBraveVerticalTabActiveBackground + : kColorBraveVerticalTabInactiveBackground); +} + bool BraveVerticalTabStyle::ShouldShowVerticalTabs() const { return tabs::utils::ShouldShowVerticalTabs(tab()->controller()->GetBrowser()); } diff --git a/browser/ui/views/tabs/vertical_tab_utils.cc b/browser/ui/views/tabs/vertical_tab_utils.cc index 8ef5fd6bc8d6..492bb70d55b3 100644 --- a/browser/ui/views/tabs/vertical_tab_utils.cc +++ b/browser/ui/views/tabs/vertical_tab_utils.cc @@ -123,13 +123,13 @@ std::pair GetLeadingTrailingCaptionButtonWidth( // In this case, we use BrowserFrameViewWin. Native frame will be set to // the HWND and BrowserFrameViewWin will draw frame and window caption // button. - auto size = WindowFrameUtil::GetWindows10GlassCaptionButtonAreaSize(); - if (WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled( + auto size = WindowFrameUtil::GetWindowsCaptionButtonAreaSize(); + if (WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled( BrowserView::GetBrowserViewForNativeWindow(frame->GetNativeWindow()) ->browser())) { - size.set_width( - size.width() + WindowFrameUtil::kWindows10GlassCaptionButtonWidth + - WindowFrameUtil::kWindows10GlassCaptionButtonVisualSpacing); + size.set_width(size.width() + + WindowFrameUtil::kWindowsCaptionButtonWidth + + WindowFrameUtil::kWindowsCaptionButtonVisualSpacing); } return {0, size.width()}; } diff --git a/browser/ui/views/toolbar/wallet_button.cc b/browser/ui/views/toolbar/wallet_button.cc index 07dcb98ddb78..4dea5b6df857 100644 --- a/browser/ui/views/toolbar/wallet_button.cc +++ b/browser/ui/views/toolbar/wallet_button.cc @@ -27,6 +27,7 @@ #include "content/public/browser/web_contents.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/simple_menu_model.h" +#include "ui/color/color_provider_manager.h" #include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/rrect_f.h" #include "ui/gfx/paint_vector_icon.h" diff --git a/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc b/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc index 765933e15296..cce3f264a18f 100644 --- a/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc +++ b/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc @@ -483,7 +483,8 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source, {"manageExtensionsLabel", IDS_SETTINGS_MANAGE_EXTENSIONS_LABEL}, {"keyboardShortcuts", IDS_EXTENSIONS_SIDEBAR_KEYBOARD_SHORTCUTS}, {"getMoreExtensionsLabel", IDS_BRAVE_SETTINGS_GET_MORE_EXTENSIONS_LABEL}, - {"getMoreExtensionsSubLabel", IDS_EXTENSIONS_SIDEBAR_OPEN_CHROME_WEB_STORE}, + {"getMoreExtensionsSubLabel", + IDS_BRAVE_SETTINGS_GET_MORE_EXTENSIONS_SUBLABEL}, {"statsUsagePingEnabledTitle", IDS_BRAVE_STATS_USAGE_PING_SETTING}, {"statsUsagePingEnabledDesc", IDS_BRAVE_STATS_USAGE_PING_SETTING_SUBITEM}, {"p3aEnableTitle", IDS_BRAVE_P3A_ENABLE_SETTING}, diff --git a/build/android/bytecode/BUILD.gn b/build/android/bytecode/BUILD.gn index a835cc6b51eb..e73dbceb6333 100644 --- a/build/android/bytecode/BUILD.gn +++ b/build/android/bytecode/BUILD.gn @@ -88,6 +88,7 @@ java_binary("java_bytecode_rewriter") { "//brave/build/android/bytecode/java/org/brave/bytecode/BraveSiteSettingsPreferencesBaseClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveStartupPaintPreviewHelperClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveStatusMediatorClassAdapter.java", + "//brave/build/android/bytecode/java/org/brave/bytecode/BraveTabGroupModelFilterClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveTabGroupUiCoordinatorClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveTabHelpersClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveTabSwitcherModeTTCoordinatorClassAdapter.java", diff --git a/build/android/bytecode/bytecode_rewriter.gni b/build/android/bytecode/bytecode_rewriter.gni index 735732a4ccc0..13351445c4eb 100644 --- a/build/android/bytecode/bytecode_rewriter.gni +++ b/build/android/bytecode/bytecode_rewriter.gni @@ -9,6 +9,7 @@ brave_bytecode_jars = [ "obj/brave/android/features/tab_ui/java.javac.jar", "obj/brave/android/java/org/chromium/chrome/browser/search_engines/java.javac.jar", "obj/brave/browser/notifications/java.javac.jar", + "obj/brave/browser/tab_group/java.javac.jar", "obj/brave/browser/ui/android/logo/java.javac.jar", "obj/brave/browser/ui/android/omnibox/java.javac.jar", "obj/brave/browser/ui/android/theme/java.javac.jar", @@ -26,6 +27,7 @@ brave_bytecode_jars = [ "obj/chrome/browser/safe_browsing/android/java.javac.jar", "obj/chrome/browser/search_engines/android/java.javac.jar", "obj/chrome/browser/site_settings/android/java.javac.jar", + "obj/chrome/browser/tab_group/java.javac.jar", "obj/chrome/browser/ui/android/appmenu/internal/java.javac.jar", "obj/chrome/browser/ui/android/logo/java.javac.jar", "obj/chrome/browser/ui/android/omnibox/java.javac.jar", diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java index 99f7c9c3fa8d..7c7c3422e6c3 100644 --- a/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java +++ b/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java @@ -94,6 +94,7 @@ public static ClassVisitor createAdapter(ClassVisitor chain) { chain = new BraveTabUiThemeProviderClassAdapter(chain); chain = new BraveTabbedActivityClassAdapter(chain); chain = new BraveTabbedRootUiCoordinatorClassAdapter(chain); + chain = new BraveTabGroupModelFilterClassAdapter(chain); chain = new BraveThemeUtilsClassAdapter(chain); chain = new BraveTileViewClassAdapter(chain); chain = new BraveToolbarLayoutClassAdapter(chain); diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java index 6330245593fe..bae86f7c450f 100644 --- a/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java +++ b/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java @@ -21,8 +21,5 @@ public class BraveManageSyncSettingsClassAdapter extends BraveClassVisitor { deleteField(sBraveManageSyncSettingsClassName, "mSyncEncryption"); makeProtectedField(sManageSyncSettingsClassName, "mSyncEncryption"); - - deleteField(sBraveManageSyncSettingsClassName, "mSyncPaymentsIntegration"); - makeProtectedField(sManageSyncSettingsClassName, "mSyncPaymentsIntegration"); } } diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveTabGroupModelFilterClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveTabGroupModelFilterClassAdapter.java new file mode 100644 index 000000000000..b000a5d283c4 --- /dev/null +++ b/build/android/bytecode/java/org/brave/bytecode/BraveTabGroupModelFilterClassAdapter.java @@ -0,0 +1,26 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +package org.brave.bytecode; + +import org.objectweb.asm.ClassVisitor; + +public class BraveTabGroupModelFilterClassAdapter extends BraveClassVisitor { + static String sTabGroupModelFilterClassName = + "org/chromium/chrome/browser/tasks/tab_groups/TabGroupModelFilter"; + static String sBraveTabGroupModelFilterClassName = + "org/chromium/chrome/browser/tasks/tab_groups/BraveTabGroupModelFilter"; + + public BraveTabGroupModelFilterClassAdapter(ClassVisitor visitor) { + super(visitor); + + changeSuperName(sTabGroupModelFilterClassName, sBraveTabGroupModelFilterClassName); + + deleteField(sTabGroupModelFilterClassName, "mIsResetting"); + + changeMethodOwner( + sTabGroupModelFilterClassName, "getParentId", sBraveTabGroupModelFilterClassName); + } +} diff --git a/build/android/config.gni b/build/android/config.gni index 03dac8f17278..a8c936f5f4eb 100644 --- a/build/android/config.gni +++ b/build/android/config.gni @@ -24,6 +24,7 @@ brave_chrome_java_deps = [ "//brave/browser/notifications/android:brave_java", "//brave/browser/notifications/android:java", "//brave/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings:java", + "//brave/browser/tab_group:java", "//brave/browser/ui/android/logo:java", "//brave/browser/ui/android/omnibox:java", "//brave/browser/ui/android/theme:java", @@ -97,3 +98,45 @@ brave_resources_exclusion_exceptions = # Re-define play core target to use full library as we need it for seemless review processes. playcore_target = "//brave/third_party/android_deps:com_google_android_play_core_java" + +brave_jni_headers_sources = [ + "//brave/android/java/org/chromium/chrome/browser/BraveFeatureUtil.java", + "//brave/android/java/org/chromium/chrome/browser/BraveLocalState.java", + "//brave/android/java/org/chromium/chrome/browser/BraveRelaunchUtils.java", + "//brave/android/java/org/chromium/chrome/browser/BraveRewardsNativeWorker.java", + "//brave/android/java/org/chromium/chrome/browser/BraveSyncWorker.java", + "//brave/android/java/org/chromium/chrome/browser/app/BraveActivity.java", + "//brave/android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkBridge.java", + "//brave/android/java/org/chromium/chrome/browser/brave_news/BraveNewsControllerFactory.java", + "//brave/android/java/org/chromium/chrome/browser/component_updater/BraveComponentUpdater.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/AssetRatioServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/BlockchainRegistryFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/BraveWalletProviderDelegateImplHelper.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/BraveWalletServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/JsonRpcServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/KeyringServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/SwapServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/TxServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/permission/BraveDappPermissionPromptDialog.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/util/WalletDataFilesInstaller.java", + "//brave/android/java/org/chromium/chrome/browser/crypto_wallet/util/WalletNativeUtils.java", + "//brave/android/java/org/chromium/chrome/browser/informers/BraveSyncAccountDeletedInformer.java", + "//brave/android/java/org/chromium/chrome/browser/misc_metrics/PrivacyHubMetricsFactory.java", + "//brave/android/java/org/chromium/chrome/browser/notifications/BraveNotificationPlatformBridge.java", + "//brave/android/java/org/chromium/chrome/browser/notifications/BraveNotificationSettingsBridge.java", + "//brave/android/java/org/chromium/chrome/browser/ntp_background_images/NTPBackgroundImagesBridge.java", + "//brave/android/java/org/chromium/chrome/browser/playlist/PlaylistServiceFactoryAndroid.java", + "//brave/android/java/org/chromium/chrome/browser/preferences/BravePrefServiceBridge.java", + "//brave/android/java/org/chromium/chrome/browser/preferences/website/BraveShieldsContentSettings.java", + "//brave/android/java/org/chromium/chrome/browser/settings/developer/BraveQAPreferences.java", + "//brave/android/java/org/chromium/chrome/browser/shields/CookieListOptInServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/shields/FilterListServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/shields/UrlSanitizerServiceFactory.java", + "//brave/android/java/org/chromium/chrome/browser/signin/BraveSigninManager.java", + "//brave/android/java/org/chromium/chrome/browser/speedreader/BraveSpeedReaderUtils.java", + "//brave/android/java/org/chromium/chrome/browser/sync/BraveSyncDevices.java", + "//brave/android/java/org/chromium/chrome/browser/util/BraveReferrer.java", + "//brave/android/java/org/chromium/chrome/browser/vpn/BraveVpnNativeWorker.java", + "//brave/browser/brave_ads/android/java/org/chromium/chrome/browser/BraveAdsNativeHelper.java", + "//brave/components/safetynet/java/org/chromium/chrome/browser/util/SafetyNetCheck.java", +] diff --git a/build/commands/lib/config.js b/build/commands/lib/config.js index 40acfe2b575c..210d60b14e9c 100644 --- a/build/commands/lib/config.js +++ b/build/commands/lib/config.js @@ -222,6 +222,7 @@ const Config = function () { this.use_libfuzzer = false this.brave_ai_chat_endpoint = getNPMConfig(['brave_ai_chat_endpoint']) || '' this.androidAabToApk = false + this.enable_dangling_raw_ptr_checks = false if (process.env.GOMA_DIR !== undefined) { this.realGomaDir = process.env.GOMA_DIR @@ -393,6 +394,7 @@ Config.prototype.buildArgs = function () { enable_updater: this.isOfficialBuild(), enable_update_notifications: this.isOfficialBuild(), brave_ai_chat_endpoint: this.brave_ai_chat_endpoint, + enable_dangling_raw_ptr_checks: this.enable_dangling_raw_ptr_checks, ...this.extraGnArgs, } @@ -560,12 +562,6 @@ Config.prototype.buildArgs = function () { // We want it to be enabled for all configurations args.disable_android_lint = false - if (this.targetArch === 'arm64') { - // TODO: Ideally we should properly compile our rust libraries in order to - // be able to use default 'standard' flow integrity. For now just revert - // it to 'pac'. - args.arm_control_flow_integrity = 'pac' - } args.android_aab_to_apk = this.androidAabToApk // These do not exist on android @@ -674,6 +670,7 @@ Config.prototype.buildArgs = function () { delete args.v8_enable_verify_heap delete args.brave_variations_server_url delete args.brave_ai_chat_endpoint + delete args.enable_dangling_raw_ptr_checks } return args diff --git a/build/commands/lib/util.js b/build/commands/lib/util.js index 797b005f5302..e9f1cb00ed31 100644 --- a/build/commands/lib/util.js +++ b/build/commands/lib/util.js @@ -386,6 +386,14 @@ const util = { const androidComponentsStylesResDest = path.join(config.srcDir, 'components', 'browser_ui', 'styles', 'android', 'java', 'res') const androidSafeBrowsingResSource = path.join(config.braveCoreDir, 'browser', 'safe_browsing', 'android', 'java', 'res') const androidSafeBrowsingResDest = path.join(config.srcDir, 'chrome', 'browser', 'safe_browsing', 'android', 'java', 'res') + const androidDownloadInternalResSource = path.join(config.braveCoreDir, 'browser', 'download', 'internal', 'android', 'java', 'res') + const androidDownloadInternalResDest = path.join(config.srcDir, 'chrome', 'browser', 'download', 'internal', 'android', 'java', 'res') + const androidFeaturesTabUiResSource = path.join(config.braveCoreDir, 'android', 'features', 'tab_ui', 'java', 'res') + const androidFeaturesTabUiDest = path.join(config.srcDir, 'chrome', 'android', 'features', 'tab_ui', 'java', 'res') + const androidComponentsOmniboxResSource = path.join(config.braveCoreDir, 'components', 'omnibox', 'browser', 'android', 'java', 'res') + const androidComponentsOmniboxResDest = path.join(config.srcDir, 'components', 'omnibox', 'browser', 'android', 'java', 'res') + const androidBrowserUiOmniboxResSource = path.join(config.braveCoreDir, 'browser', 'ui', 'android', 'omnibox', 'java', 'brave_res') + const androidBrowserUiOmniboxResDest = path.join(config.srcDir, 'chrome', 'browser', 'ui', 'android', 'omnibox', 'java', 'res') // Mapping for copying Brave's Android resource into chromium folder. const copyAndroidResourceMapping = { @@ -399,7 +407,11 @@ const util = { [androidToolbarResSource]: [androidToolbarResDest], [androidComponentsWidgetResSource]: [androidComponentsWidgetResDest], [androidComponentsStylesResSource]: [androidComponentsStylesResDest], - [androidSafeBrowsingResSource]: [androidSafeBrowsingResDest] + [androidSafeBrowsingResSource]: [androidSafeBrowsingResDest], + [androidDownloadInternalResSource]: [androidDownloadInternalResDest], + [androidFeaturesTabUiResSource]: [androidFeaturesTabUiDest], + [androidComponentsOmniboxResSource]: [androidComponentsOmniboxResDest], + [androidBrowserUiOmniboxResSource]: [androidBrowserUiOmniboxResDest] } console.log('copy Android app icons and app resources') diff --git a/build/ios/mojom/mojom_wrappers.gni b/build/ios/mojom/mojom_wrappers.gni index e5bf3bdd516a..9c482ce76b49 100644 --- a/build/ios/mojom/mojom_wrappers.gni +++ b/build/ios/mojom/mojom_wrappers.gni @@ -99,7 +99,6 @@ template("ios_objc_mojom_wrappers") { public_deps = [] } sources = generate_wrappers_output - configs += [ "//build/config/compiler:enable_arc" ] public_configs = [ ":$type_headers_target_name" ] public_deps += [ ":$generate_wrappers_target", diff --git a/build/ios/mojom/public/base/BUILD.gn b/build/ios/mojom/public/base/BUILD.gn index 88eae5419edd..c96ddcfed3a9 100644 --- a/build/ios/mojom/public/base/BUILD.gn +++ b/build/ios/mojom/public/base/BUILD.gn @@ -4,7 +4,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. source_set("base") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "base_values+private.h", "base_values.h", diff --git a/build/mac/BUILD.gn b/build/mac/BUILD.gn index 66e69ffa5536..c5147e050389 100644 --- a/build/mac/BUILD.gn +++ b/build/mac/BUILD.gn @@ -490,11 +490,17 @@ action("notarize_dmg_pkg") { args = [ "--identity", mac_signing_identifier, - "--notary-user", - notary_user, - "--notary-password", + string_join("=", + [ + "--notary-arg", + "--apple-id", + notary_user, + ]), + "--notary-arg=--password", + "--notary-arg", notary_password, - "--notary-asc-provider", + "--notary-arg=--team-id", + "--notary-arg", chrome_mac_team_id, development_arg, "--dmg", diff --git a/build/mac/sign_app.sh b/build/mac/sign_app.sh index f22c77a7d618..a3ca0d1813e2 100755 --- a/build/mac/sign_app.sh +++ b/build/mac/sign_app.sh @@ -3,7 +3,7 @@ set -euo pipefail usage() { - echo "usage: $0 " + echo "usage: $0 " } if [[ ${#} -lt "7" ]]; then @@ -40,10 +40,10 @@ if [[ ${#} -gt "6" ]]; then exit 1 fi fi - NOTARIZE_ARGS="${NOTARIZE} --notary-user $NOTARY_USER --notary-password $NOTARY_PASSWORD" + NOTARIZE_ARGS="${NOTARIZE} --notary-arg=--apple-id=$NOTARY_USER --notary-arg=--password --notary-arg $NOTARY_PASSWORD" if [[ "${10}" != "" ]]; then - NOTARY_ASC_PROVIDER="${10}" - NOTARIZE_ARGS="$NOTARIZE_ARGS --notary-asc-provider ${NOTARY_ASC_PROVIDER}" + NOTARY_TEAM_ID="${10}" + NOTARIZE_ARGS="$NOTARIZE_ARGS --notary-arg=--team-id --notary-arg ${NOTARY_TEAM_ID}" fi else NOTARIZE="False" diff --git a/chromium_src/android_webview/common/aw_features.cc b/chromium_src/android_webview/common/aw_features.cc index 4070c7014bb5..0c798b68b7ee 100644 --- a/chromium_src/android_webview/common/aw_features.cc +++ b/chromium_src/android_webview/common/aw_features.cc @@ -16,7 +16,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kWebViewAppsPackageNamesServerSideAllowlist, base::FEATURE_DISABLED_BY_DEFAULT}, {kWebViewEnumerateDevicesCache, base::FEATURE_DISABLED_BY_DEFAULT}, - {kWebViewServerSideSampling, base::FEATURE_DISABLED_BY_DEFAULT}, + {kWebViewMetricsFiltering, base::FEATURE_DISABLED_BY_DEFAULT}, }}); } // namespace features diff --git a/chromium_src/base/feature_list.cc b/chromium_src/base/feature_list.cc index 41b6c4846225..c89a6453483b 100644 --- a/chromium_src/base/feature_list.cc +++ b/chromium_src/base/feature_list.cc @@ -22,7 +22,7 @@ using DefaultStateOverrides = using UnsortedDefaultStateOverrides = std::vector; -constexpr size_t kDefaultStateOverridesReserve = 64 * 3; +constexpr size_t kDefaultStateOverridesReserve = 64 * 4; UnsortedDefaultStateOverrides& GetUnsortedDefaultStateOverrides() { static NoDestructor diff --git a/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h b/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h index 268f01f024bf..6844fd6d2497 100644 --- a/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h +++ b/chromium_src/brave/third_party/bitcoin-core/src/src/serialize.h @@ -7,7 +7,9 @@ #define BRAVE_CHROMIUM_SRC_BRAVE_THIRD_PARTY_BITCOIN_CORE_SRC_SRC_SERIALIZE_H_ #include +#include #include +#include #include "base/check.h" diff --git a/chromium_src/chrome/browser/apps/intent_helper/intent_picker_features.cc b/chromium_src/chrome/browser/apps/intent_helper/intent_picker_features.cc new file mode 100644 index 000000000000..c3eeb2edf1f3 --- /dev/null +++ b/chromium_src/chrome/browser/apps/intent_helper/intent_picker_features.cc @@ -0,0 +1,16 @@ +// Copyright (c) 2023 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +#include "src/chrome/browser/apps/intent_helper/intent_picker_features.cc" + +#include "base/feature_override.h" + +namespace apps::features { + +OVERRIDE_FEATURE_DEFAULT_STATES({{ + {kLinkCapturingInfoBar, base::FEATURE_DISABLED_BY_DEFAULT}, +}}); + +} // namespace apps::features diff --git a/chromium_src/chrome/browser/browser_features.cc b/chromium_src/chrome/browser/browser_features.cc index da9deb786ebf..531e3dee5581 100644 --- a/chromium_src/chrome/browser/browser_features.cc +++ b/chromium_src/chrome/browser/browser_features.cc @@ -10,6 +10,9 @@ namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ + {kCertificateTransparencyAskBeforeEnabling, + base::FEATURE_ENABLED_BY_DEFAULT}, + #if BUILDFLAG(IS_WIN) {kAppBoundEncryptionMetrics, base::FEATURE_DISABLED_BY_DEFAULT}, #endif diff --git a/chromium_src/chrome/browser/content_settings/content_settings_supervised_provider.h b/chromium_src/chrome/browser/content_settings/content_settings_supervised_provider.h deleted file mode 100644 index c3dea4d15377..000000000000 --- a/chromium_src/chrome/browser/content_settings/content_settings_supervised_provider.h +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_H_ -#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_H_ - -#include "brave/browser/content_settings/brave_global_value_map.h" - -#define GlobalValueMap BraveGlobalValueMap -#include "src/chrome/browser/content_settings/content_settings_supervised_provider.h" // IWYU pragma: export -#undef GlobalValueMap - -#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_H_ diff --git a/chromium_src/chrome/browser/net/system_network_context_manager.cc b/chromium_src/chrome/browser/net/system_network_context_manager.cc index d43489ef6d6d..a3140453c46f 100644 --- a/chromium_src/chrome/browser/net/system_network_context_manager.cc +++ b/chromium_src/chrome/browser/net/system_network_context_manager.cc @@ -2,12 +2,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "build/branding_buildflags.h" #include "brave/services/network/public/cpp/system_request_handler.h" -// This is currently necessary in order to enable Certificate Transparency -// enforcement (brave-browser#22482). -#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING -#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (1) #include "src/chrome/browser/net/system_network_context_manager.cc" diff --git a/chromium_src/chrome/browser/signin/signin_features.cc b/chromium_src/chrome/browser/signin/signin_features.cc index 5e88fae84381..d5787002c758 100644 --- a/chromium_src/chrome/browser/signin/signin_features.cc +++ b/chromium_src/chrome/browser/signin/signin_features.cc @@ -7,10 +7,14 @@ #include "src/chrome/browser/signin/signin_features.cc" -#if !BUILDFLAG(IS_ANDROID) #include "base/feature_override.h" OVERRIDE_FEATURE_DEFAULT_STATES({{ +#if !BUILDFLAG(IS_ANDROID) {kForYouFre, base::FEATURE_DISABLED_BY_DEFAULT}, -}}); #endif // !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(ENABLE_MIRROR) + {kVerifyRequestInitiatorForMirrorHeaders, + base::FEATURE_DISABLED_BY_DEFAULT}, +#endif // BUILDFLAG(ENABLE_MIRROR) +}}); diff --git a/chromium_src/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc b/chromium_src/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc deleted file mode 100644 index 6ae1f757024b..000000000000 --- a/chromium_src/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2022 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#include "chrome/browser/ssl/https_only_mode_upgrade_interceptor.h" - -#include "net/base/url_util.h" - -#define IsLocalhost(URL) IsLocalhostOrOnion(URL) - -#include "src/chrome/browser/ssl/https_only_mode_upgrade_interceptor.cc" - -#undef IsLocalhost diff --git a/chromium_src/chrome/browser/ssl/https_upgrades_navigation_throttle.cc b/chromium_src/chrome/browser/ssl/https_upgrades_navigation_throttle.cc index 77996713e2f6..9b80934eabc1 100644 --- a/chromium_src/chrome/browser/ssl/https_upgrades_navigation_throttle.cc +++ b/chromium_src/chrome/browser/ssl/https_upgrades_navigation_throttle.cc @@ -67,8 +67,7 @@ HttpsUpgradesNavigationThrottle::MaybeCreateThrottleFor( security_interstitials::https_only_mode::HttpInterstitialState interstitial_state; interstitial_state.enabled_by_pref = - (base::FeatureList::IsEnabled(features::kHttpsFirstModeV2) && prefs && - prefs->GetBoolean(prefs::kHttpsOnlyModeEnabled)) || + (prefs && prefs->GetBoolean(prefs::kHttpsOnlyModeEnabled)) || (map && brave_shields::ShouldForceHttps(map, request_url)); StatefulSSLHostStateDelegate* state = @@ -81,7 +80,7 @@ HttpsUpgradesNavigationThrottle::MaybeCreateThrottleFor( HttpsFirstModeServiceFactory::GetForProfile(profile); if (hfm_service) { // Can be null in some cases, e.g. when using Ash sign-in profile. - hfm_service->MaybeEnableHttpsFirstModeForUrl(profile, handle->GetURL()); + hfm_service->MaybeEnableHttpsFirstModeForUrl(handle->GetURL()); } // StatefulSSLHostStateDelegate can be null during tests. if (state && state->IsHttpsEnforcedForHost(handle->GetURL().host(), @@ -106,5 +105,5 @@ HttpsUpgradesNavigationThrottle::MaybeCreateThrottleFor( HttpsOnlyModeTabHelper::CreateForWebContents(handle->GetWebContents()); return std::make_unique( - handle, std::move(blocking_page_factory), interstitial_state); + handle, profile, std::move(blocking_page_factory), interstitial_state); } diff --git a/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm b/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm index e39f2e67e8a2..67cab73bdf9a 100644 --- a/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm +++ b/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm @@ -8,17 +8,16 @@ #include #include "base/i18n/rtl.h" -#include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" #include "brave/browser/brave_shell_integration.h" #include "brave/browser/metrics/metrics_reporting_util.h" #include "brave/components/l10n/common/localization_util.h" #include "brave/grit/brave_generated_resources.h" -#include "chrome/browser/ui/cocoa/key_equivalent_constants.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h" #include "ui/base/l10n/l10n_util_mac.h" +#include "ui/color/color_provider_key.h" @implementation FirstRunDialogViewController { BOOL _setAsDefaultBrowser; @@ -49,14 +48,12 @@ - (void)loadView { IDS_FIRSTRUN_DLG_CANCEL_BUTTON_LABEL) target:self action:@selector(cancel:)]; - [maybeLaterButton setKeyEquivalent:kKeyEquivalentEscape]; [maybeLaterButton sizeToFit]; NSButton* makeDefaultButton = [NSButton buttonWithTitle:l10n_util::GetNSString(IDS_FIRSTRUN_DLG_OK_BUTTON_LABEL) target:self action:@selector(ok:)]; - [makeDefaultButton setKeyEquivalent:kKeyEquivalentReturn]; [makeDefaultButton sizeToFit]; // Calculate proper dialog width that can include two buttons. @@ -129,9 +126,9 @@ - (void)loadView { alpha:1.0] : [NSColor whiteColor]; - base::scoped_nsobject content_view([[NSView alloc] - initWithFrame:NSMakeRect(0, 0, dialogWidth, windowHeight)]); - self.view = content_view.get(); + NSView* content_view = [[NSView alloc] + initWithFrame:NSMakeRect(0, 0, dialogWidth, windowHeight)]; + self.view = content_view; [self.view setValue:backgroundColor forKey:@"backgroundColor"]; [self.view addSubview:headerLabel]; [self.view addSubview:contentsLabel]; diff --git a/chromium_src/chrome/browser/ui/color/chrome_color_mixer.cc b/chromium_src/chrome/browser/ui/color/chrome_color_mixer.cc index 60cb7a748110..9aedbd3ff936 100644 --- a/chromium_src/chrome/browser/ui/color/chrome_color_mixer.cc +++ b/chromium_src/chrome/browser/ui/color/chrome_color_mixer.cc @@ -14,7 +14,7 @@ namespace { void AddBraveColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { #if !BUILDFLAG(IS_ANDROID) AddBraveThemeColorMixer(provider, key); AddBravifiedChromeThemeColorMixer(provider, key); @@ -24,7 +24,7 @@ void AddBraveColorMixer(ui::ColorProvider* provider, } // namespace void AddChromeColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddChromeColorMixer_ChromiumImpl(provider, key); AddBraveColorMixer(provider, key); } diff --git a/chromium_src/chrome/browser/ui/color/omnibox_color_mixer.cc b/chromium_src/chrome/browser/ui/color/omnibox_color_mixer.cc index 606f2d6e3bf9..14d2d37556b4 100644 --- a/chromium_src/chrome/browser/ui/color/omnibox_color_mixer.cc +++ b/chromium_src/chrome/browser/ui/color/omnibox_color_mixer.cc @@ -14,12 +14,12 @@ namespace { void AddBraveOmniboxColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { // Apply brave theme when there is no custom theme. if (key.custom_theme) return; #if !BUILDFLAG(IS_ANDROID) - key.color_mode == ui::ColorProviderManager::ColorMode::kDark + key.color_mode == ui::ColorProviderKey::ColorMode::kDark ? AddBraveOmniboxDarkThemeColorMixer(provider, key) : AddBraveOmniboxLightThemeColorMixer(provider, key); #endif // #if !BUILDFLAG(IS_ANDROID) @@ -28,7 +28,7 @@ void AddBraveOmniboxColorMixer(ui::ColorProvider* provider, } // namespace void AddOmniboxColorMixer(ui::ColorProvider* provider, - const ui::ColorProviderManager::Key& key) { + const ui::ColorProviderKey& key) { AddOmniboxColorMixer_ChromiumImpl(provider, key); AddBraveOmniboxColorMixer(provider, key); } diff --git a/chromium_src/chrome/browser/ui/layout_constants.cc b/chromium_src/chrome/browser/ui/layout_constants.cc index c2b67440577a..963c564e7b22 100644 --- a/chromium_src/chrome/browser/ui/layout_constants.cc +++ b/chromium_src/chrome/browser/ui/layout_constants.cc @@ -1,26 +1,23 @@ /* Copyright (c) 2018 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#define GetLayoutConstant GetLayoutConstant_ChromiumImpl -#include "src/chrome/browser/ui/layout_constants.cc" -#undef GetLayoutConstant + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "brave/browser/ui/brave_layout_constants.h" -int GetLayoutConstant(LayoutConstant constant) { - // get brave overriden value - const absl::optional braveOption = GetBraveLayoutConstant(constant); - if (braveOption) { - return braveOption.value(); - } - switch (constant) { - case TAB_SEPARATOR_HEIGHT: - return 24; +// Forward declaration +int GetLayoutConstant_ChromiumImpl(LayoutConstant constant); - default: - // get chromium value - return GetLayoutConstant_ChromiumImpl(constant); - } -} +#define LayoutConstant LayoutConstant constant) { \ + const absl::optional braveOption = GetBraveLayoutConstant(constant); \ + if (braveOption) { \ + return braveOption.value(); \ + } \ + \ + return GetLayoutConstant_ChromiumImpl(constant); \ + } \ + \ + int GetLayoutConstant_ChromiumImpl(LayoutConstant + +#include "src/chrome/browser/ui/layout_constants.cc" +#undef LayoutConstant diff --git a/chromium_src/chrome/browser/ui/test/test_browser_ui.cc b/chromium_src/chrome/browser/ui/test/test_browser_ui.cc new file mode 100644 index 000000000000..7bc28882c500 --- /dev/null +++ b/chromium_src/chrome/browser/ui/test/test_browser_ui.cc @@ -0,0 +1,31 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "chrome/browser/ui/test/test_browser_ui.h" + +#include "testing/gtest/include/gtest/gtest.h" + +// A workaround for Brave CIs. +// TestBrowserUi don't want to run when the system is set to use dark theme on +// Windows. If dark theme is detected Chromium code calls GTEST_SKIP in +// ShowAndVerifyUi. Our CIs are set up with light theme, but occasionally tests +// derived from TestBrowserUi hit GTEST_SKIP. The only reason this could happen +// is if another test that runs in parallel switches the system to the dark +// theme, or some prior test messes up the system and leaves it in dark theme +// mode permanently. The problem is that GTEST_SKIP doesn't appear to fully +// exit the test. Instead it skips the rest of the ShowAndVerifyUi method and +// then returns and the test continues (and then typically fails because of the +// later test expectations). Upstream comment says the light theme is needed +// because "Gold files for pixel tests are for light mode", however, it doesn't +// appear that all (any?) tests that derive from TestBrowserUi actually use +// pixel tests. Those that don't care can continue running and succeed. Those +// that do care would fail, which is no worse than what we have with how +// GTEST_SKIP works. +#undef GTEST_SKIP +#define GTEST_SKIP() \ + LOG(WARNING) << "Brave: forcing test to run. Original Chromium behavior: " + +#include "src/chrome/browser/ui/test/test_browser_ui.cc" +#undef GTEST_SKIP diff --git a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc index 9fea7622cca8..e55ce2e88764 100644 --- a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc +++ b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc @@ -26,7 +26,7 @@ const char kBraveSyncedTabsUrl[] = "brave://history/syncedTabs"; stub_tab_->tab_id = SessionID::NewUnique(); \ } \ tabs_in_session[kMaxTabsPerSessionToShow] = stub_tab_.get(); \ - BuildOtherDevicesTabItem(kBraveStubSessionTag, \ + BuildOtherDevicesTabItem(this, kBraveStubSessionTag, \ *tabs_in_session[kMaxTabsPerSessionToShow]); \ } diff --git a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h index aa61e9d78350..00c38508af1d 100644 --- a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h +++ b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h @@ -8,13 +8,13 @@ #include -#define BRAVE_RECENT_TABS_SUB_MENU_MODEL_H_ \ - private: \ +#define local_tab_cancelable_task_tracker_ \ + local_tab_cancelable_task_tracker_; \ std::unique_ptr stub_tab_; \ - friend class BraveRecentTabsSubMenuModel; \ - \ - public: + friend class BraveRecentTabsSubMenuModel + #include "src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" // IWYU pragma: export -#undef BRAVE_RECENT_TABS_SUB_MENU_MODEL_H_ + +#undef local_tab_cancelable_task_tracker_ #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ diff --git a/chromium_src/chrome/browser/ui/ui_features.cc b/chromium_src/chrome/browser/ui/ui_features.cc index 5c81770c4aa6..c5cdbde485b5 100644 --- a/chromium_src/chrome/browser/ui/ui_features.cc +++ b/chromium_src/chrome/browser/ui/ui_features.cc @@ -11,6 +11,10 @@ namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ + {kChromeLabs, base::FEATURE_DISABLED_BY_DEFAULT}, +#if !BUILDFLAG(IS_ANDROID) + {kHaTSWebUI, base::FEATURE_DISABLED_BY_DEFAULT}, +#endif {kTabHoverCardImages, base::FEATURE_DISABLED_BY_DEFAULT}, {kExtensionsMenuInAppMenu, base::FEATURE_DISABLED_BY_DEFAULT}, }}); diff --git a/chromium_src/chrome/browser/ui/views/frame/browser_caption_button_container_win.cc b/chromium_src/chrome/browser/ui/views/frame/browser_caption_button_container_win.cc index 47a519214604..6b90c21e2665 100644 --- a/chromium_src/chrome/browser/ui/views/frame/browser_caption_button_container_win.cc +++ b/chromium_src/chrome/browser/ui/views/frame/browser_caption_button_container_win.cc @@ -18,7 +18,7 @@ BrowserCaptionButtonContainer::BrowserCaptionButtonContainer( BrowserFrameViewWin* frame_view) : BrowserCaptionButtonContainer_ChromiumImpl(frame_view), frame_view_(frame_view) { - if (WindowFrameUtil::IsWin10TabSearchCaptionButtonEnabled( + if (WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled( frame_view_->browser_view()->browser())) { pref_change_registrar_.Init( frame_view_->browser_view()->GetProfile()->GetPrefs()); diff --git a/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc index a59976090741..0a7f24daf2c8 100644 --- a/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -9,12 +9,13 @@ #include "brave/browser/ui/views/page_action/brave_page_action_icon_container_view.h" #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" -#define BRAVE_LAYOUT_TRAILING_DECORATIONS \ - auto right_most = GetTrailingViews(); \ - for (auto* item : base::Reversed(right_most)) { \ - if (item->GetVisible()) \ - trailing_decorations.AddDecoration(vertical_padding, location_height, \ - false, 0, 0, item); \ +#define BRAVE_LAYOUT_TRAILING_DECORATIONS \ + auto right_most = GetTrailingViews(); \ + for (auto* item : base::Reversed(right_most)) { \ + if (item->GetVisible()) \ + trailing_decorations.AddDecoration(vertical_padding, location_height, \ + false, 0, /*intra_item_padding=*/0, \ + 0, item); \ } #define OmniboxViewViews BraveOmniboxViewViews diff --git a/chromium_src/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h b/chromium_src/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h index c44a693ead93..1b6121cdf563 100644 --- a/chromium_src/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h +++ b/chromium_src/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h @@ -9,7 +9,12 @@ #define OmniboxPopupViewViewsTest \ OmniboxPopupViewViewsTest; \ friend class BraveOmniboxPopupViewViews + +#define GetTargetBounds virtual GetTargetBounds + #include "src/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h" // IWYU pragma: export + #undef OmniboxPopupViewViewsTest +#undef GetTargetBounds #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_VIEW_VIEWS_H_ diff --git a/chromium_src/chrome/browser/ui/views/omnibox/omnibox_row_view.cc b/chromium_src/chrome/browser/ui/views/omnibox/omnibox_row_view.cc new file mode 100644 index 000000000000..d71c90c6da3b --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/omnibox/omnibox_row_view.cc @@ -0,0 +1,19 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "brave/browser/ui/views/omnibox/brave_omnibox_result_view.h" +#include "chrome/browser/ui/views/omnibox/omnibox_header_view.h" +#include "chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h" +#include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" +#include "components/omnibox/browser/omnibox_controller.h" +#include "components/omnibox/browser/omnibox_edit_model.h" +#include "components/omnibox/browser/omnibox_field_trial.h" +#include "components/omnibox/browser/omnibox_popup_selection.h" + +// This substitution is being added to have OmniboxRowView adding a +// BraveOmniboxResultView instance as a child view, in the constructor code. +#define OmniboxResultView BraveOmniboxResultView +#include "src/chrome/browser/ui/views/omnibox/omnibox_row_view.cc" +#undef OmniboxResultView diff --git a/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.cc b/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.cc new file mode 100644 index 000000000000..5ef78a42e45b --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.cc @@ -0,0 +1,25 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "chrome/browser/ui/views/page_info/page_info_cookies_content_view.h" + +#define SetCookieInfo SetCookieInfo_ChromiumImpl +#include "src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.cc" +#undef SetCookieInfo + +void PageInfoCookiesContentView::SetCookieInfo( + const CookiesNewInfo& cookie_info) { + SetCookieInfo_ChromiumImpl(cookie_info); + + // Remove cookies text and link to settings. + RemoveChildView(children()[0]); + + // Hide 3P cookies toggle if shown. + if (blocking_third_party_cookies_row_) { + blocking_third_party_cookies_row_->SetVisible(false); + } + + PreferredSizeChanged(); +} diff --git a/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h b/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h new file mode 100644 index 000000000000..ad4aca006e48 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_COOKIES_CONTENT_VIEW_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_COOKIES_CONTENT_VIEW_H_ + +#include "components/page_info/page_info_ui.h" + +#define SetCookieInfo \ + SetCookieInfo_ChromiumImpl(const CookiesNewInfo& cookie_info); \ + void SetCookieInfo + +#include "src/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h" // IWYU pragma: export +#undef SetCookieInfo + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_COOKIES_CONTENT_VIEW_H_ diff --git a/chromium_src/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chromium_src/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc index 04895097e7e5..e5c571ac72b1 100644 --- a/chromium_src/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chromium_src/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc @@ -5,9 +5,11 @@ #include "brave/browser/ui/sidebar/sidebar_service_factory.h" #include "brave/browser/ui/sidebar/sidebar_utils.h" +#include "brave/browser/ui/views/side_panel/brave_side_panel.h" #include "brave/components/sidebar/sidebar_service.h" #include "brave/grit/brave_generated_resources.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/side_panel/side_panel_entry.h" #include "chrome/grit/generated_resources.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -53,7 +55,9 @@ absl::optional GetDefaultEntryId(Profile* profile) { #define IDS_TOOLTIP_SIDE_PANEL_HIDE IDS_TOOLTIP_SIDEBAR_HIDE #define IDS_TOOLTIP_SIDE_PANEL_SHOW IDS_TOOLTIP_SIDEBAR_SHOW +#define SidePanel BraveSidePanel #include "src/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc" +#undef SidePanel #undef IDS_TOOLTIP_SIDE_PANEL_HIDE #undef IDS_TOOLTIP_SIDE_PANEL_SHOW #undef BRAVE_SIDE_PANEL_COORDINATOR_CREATE_HEADER diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.cc b/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.cc index 5f5074632598..00fa7da144fd 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.cc +++ b/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.cc @@ -56,3 +56,8 @@ bool TabGroupStyle::ShouldShowVerticalTabs() const { return tabs::utils::ShouldShowVerticalTabs(tab_group_views_->GetBrowser()); } + +int ChromeRefresh2023TabGroupStyle::GetTabGroupOverlapAdjustment() { + return ChromeRefresh2023TabGroupStyle_ChromiumImpl:: + GetTabGroupOverlapAdjustment(); +} diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.h b/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.h index 9bc6e9b6929f..7b35fcf3f323 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.h +++ b/chromium_src/chrome/browser/ui/views/tabs/tab_group_style.h @@ -37,6 +37,10 @@ class TabGroupStyle : public TabGroupStyle_ChromiumImpl { class ChromeRefresh2023TabGroupStyle : public TabGroupStyle { public: using TabGroupStyle::TabGroupStyle; + + // A necessary stub to go back to the original class, as this static gets used + // by `TabGroupUnderline::GetStrokeInset`. + static int GetTabGroupOverlapAdjustment(); }; #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_GROUP_STYLE_H_ diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab_search_button.h b/chromium_src/chrome/browser/ui/views/tabs/tab_search_button.h index 30a8cd03af60..3876d0ff3e13 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab_search_button.h +++ b/chromium_src/chrome/browser/ui/views/tabs/tab_search_button.h @@ -6,15 +6,15 @@ #ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_SEARCH_BUTTON_H_ #define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_SEARCH_BUTTON_H_ -#include "chrome/browser/ui/views/tabs/new_tab_button.h" +#include "chrome/browser/ui/views/tabs/tab_strip_control_button.h" -#define FrameColorsChanged \ - FrameColorsChanged_Unused(); \ +#define GetCornerRadius \ + GetCornerRadius_Unused(); \ friend class BraveTabSearchButton; \ - void FrameColorsChanged + int GetCornerRadius #include "src/chrome/browser/ui/views/tabs/tab_search_button.h" // IWYU pragma: export -#undef FrameColorsChanged +#undef GetCornerRadius #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_SEARCH_BUTTON_H_ diff --git a/chromium_src/chrome/browser/ui/webui/help/version_updater_mac.mm b/chromium_src/chrome/browser/ui/webui/help/version_updater_mac.mm index 3c96e187c92e..74bc108f0847 100644 --- a/chromium_src/chrome/browser/ui/webui/help/version_updater_mac.mm +++ b/chromium_src/chrome/browser/ui/webui/help/version_updater_mac.mm @@ -52,8 +52,7 @@ - (id)initWithUpdater:(VersionUpdaterMac*)updater { } - (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [super dealloc]; + [NSNotificationCenter.defaultCenter removeObserver:self]; } - (void)handleStatusNotification:(NSNotification*)notification { diff --git a/chromium_src/chrome/browser/ui/webui/password_manager/password_manager_ui.cc b/chromium_src/chrome/browser/ui/webui/password_manager/password_manager_ui.cc new file mode 100644 index 000000000000..6373e06c7f3e --- /dev/null +++ b/chromium_src/chrome/browser/ui/webui/password_manager/password_manager_ui.cc @@ -0,0 +1,27 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "brave/browser/ui/webui/navigation_bar_data_provider.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/webui_util.h" +#include "content/public/browser/web_ui_data_source.h" + +namespace { + +// Called from the original password_manager_ui.cc's +// CreateAndAddPasswordsUIHTMLSource via a patch. +void BraveAddPasswordManagerResources(content::WebUIDataSource* source, + Profile* profile) { + NavigationBarDataProvider::Initialize(source, profile); +} + +} // namespace + +#define SetupChromeRefresh2023(SOURCE) \ + SetupChromeRefresh2023(SOURCE); \ + BraveAddPasswordManagerResources(source, profile); + +#include "src/chrome/browser/ui/webui/password_manager/password_manager_ui.cc" +#undef SetupChromeRefresh2023 diff --git a/chromium_src/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc b/chromium_src/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc new file mode 100644 index 000000000000..9013c1cdc5aa --- /dev/null +++ b/chromium_src/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc @@ -0,0 +1,16 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "components/content_settings/core/common/content_settings_types.h" + +// clang-format off +#define TOP_LEVEL_STORAGE_ACCESS \ + TOP_LEVEL_STORAGE_ACCESS, \ + ContentSettingsType::BRAVE_FINGERPRINTING_V2, \ + ContentSettingsType::BRAVE_HTTPS_UPGRADE +// clang-format on + +#include "src/chrome/browser/ui/webui/settings/safety_hub_handler_unittest.cc" +#undef TOP_LEVEL_STORAGE_ACCESS diff --git a/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc b/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc index caf1074b886b..8b2206160b93 100644 --- a/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc +++ b/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc @@ -19,9 +19,5 @@ class BraveAccountConsistencyModeManager { } // namespace #define AccountConsistencyModeManager BraveAccountConsistencyModeManager - -#undef IDS_DEFAULT_AVATAR_LABEL_26 -#define IDS_DEFAULT_AVATAR_LABEL_26 IDS_BRAVE_AVATAR_LABEL_PLACEHOLDER #include "src/chrome/browser/ui/webui/signin/profile_picker_ui.cc" -#undef IDS_DEFAULT_AVATAR_LABEL_26 #undef AccountConsistencyModeManager diff --git a/chromium_src/chrome/common/chrome_features.cc b/chromium_src/chrome/common/chrome_features.cc index 1769a5452e91..1670ee957663 100644 --- a/chromium_src/chrome/common/chrome_features.cc +++ b/chromium_src/chrome/common/chrome_features.cc @@ -14,13 +14,16 @@ namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ - {kHttpsFirstModeV2, base::FEATURE_ENABLED_BY_DEFAULT}, {kKAnonymityService, base::FEATURE_DISABLED_BY_DEFAULT}, - {kSCTAuditing, base::FEATURE_DISABLED_BY_DEFAULT}, +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + {kDesktopPWAsLinkCapturing, base::FEATURE_DISABLED_BY_DEFAULT}, +#endif #if BUILDFLAG(IS_ANDROID) {kPrivacyGuideAndroidPostMVP, base::FEATURE_DISABLED_BY_DEFAULT}, #endif + {kSCTAuditing, base::FEATURE_DISABLED_BY_DEFAULT}, #if !BUILDFLAG(IS_ANDROID) + {kPrivacyGuide3, base::FEATURE_DISABLED_BY_DEFAULT}, {kTrustSafetySentimentSurvey, base::FEATURE_DISABLED_BY_DEFAULT}, {kTrustSafetySentimentSurveyV2, base::FEATURE_DISABLED_BY_DEFAULT}, #endif diff --git a/chromium_src/chrome/common/pref_names.cc b/chromium_src/chrome/common/pref_names.cc deleted file mode 100644 index 8a1412302232..000000000000 --- a/chromium_src/chrome/common/pref_names.cc +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2022 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#include "chrome/common/pref_names.h" - -namespace prefs { -const char kBraveVpnDnsConfig[] = "brave.brave_vpn.dns_config"; -} // namespace prefs - -#include "src/chrome/common/pref_names.cc" diff --git a/chromium_src/chrome/common/pref_names.h b/chromium_src/chrome/common/pref_names.h index cb944c53f703..5ba47171bf89 100644 --- a/chromium_src/chrome/common/pref_names.h +++ b/chromium_src/chrome/common/pref_names.h @@ -13,7 +13,7 @@ namespace prefs { // BraveVPN is connected, otherwise this pref is empty. Final decision // about whether or not to override actual DNS state will be made in // stub_resolver_config_reader. -extern const char kBraveVpnDnsConfig[]; +inline constexpr char kBraveVpnDnsConfig[] = "brave.brave_vpn.dns_config"; } // namespace prefs #include "src/chrome/common/pref_names.h" // IWYU pragma: export diff --git a/chromium_src/chrome/common/url_constants.cc b/chromium_src/chrome/common/url_constants.cc index 0f94e9ca30d3..731d6a068d8a 100644 --- a/chromium_src/chrome/common/url_constants.cc +++ b/chromium_src/chrome/common/url_constants.cc @@ -113,12 +113,20 @@ const char kDownloadScanningLearnMoreURL[] = "https://support.brave.com/hc/en-us/articles/" "360018192491-How-do-I-fix-file-download-errors-"; +// Note: This is the same as the above URL. This is done to decouple the URLs, +// in case the support page is split apart into separate pages in the future. +const char kDownloadBlockedLearnMoreURL[] = + "https://support.brave.com/hc/en-us/articles/" + "360018192491-How-do-I-fix-file-download-errors-"; + const char kExtensionControlledSettingLearnMoreURL[] = "https://support.brave.com/hc/en-us/articles/" "360018185651-How-do-I-stop-extensions-from-changing-my-settings-"; const char kExtensionInvalidRequestURL[] = "chrome-extension://invalid/"; +const char kFamilyGroupSiteURL[] = "https://support.brave.com/"; + const char kFlashDeprecationLearnMoreURL[] = "https://blog.chromium.org/2017/07/so-long-and-thanks-for-all-flash.html"; diff --git a/chromium_src/chrome/install_static/brave_install_modes_unittest.cc b/chromium_src/chrome/install_static/brave_install_modes_unittest.cc index 5eee790f4f4a..50e3ba83648b 100644 --- a/chromium_src/chrome/install_static/brave_install_modes_unittest.cc +++ b/chromium_src/chrome/install_static/brave_install_modes_unittest.cc @@ -1,6 +1,7 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +/* Copyright (c) 2016 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "chrome/install_static/install_modes.h" @@ -82,13 +83,13 @@ TEST(InstallModes, VerifyModes) { // The ProgID prefix must not be empty, must be no greater than 11 // characters long, must contain no punctuation, and may not start with a // digit (https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx). - ASSERT_THAT(mode.prog_id_prefix, StrNe(L"")); - ASSERT_THAT(lstrlen(mode.prog_id_prefix), Le(11)); - ASSERT_THAT(mode.prog_id_prefix, Not(ContainsIllegalProgIdChar())); - ASSERT_THAT(*mode.prog_id_prefix, ResultOf(iswdigit, Eq(0))); + ASSERT_THAT(mode.browser_prog_id_prefix, StrNe(L"")); + ASSERT_THAT(lstrlen(mode.browser_prog_id_prefix), Le(11)); + ASSERT_THAT(mode.browser_prog_id_prefix, Not(ContainsIllegalProgIdChar())); + ASSERT_THAT(*mode.browser_prog_id_prefix, ResultOf(iswdigit, Eq(0))); // The ProgID description must not be empty. - ASSERT_THAT(mode.prog_id_description, StrNe(L"")); + ASSERT_THAT(mode.browser_prog_id_description, StrNe(L"")); // Every mode must have an Active Setup GUID. ASSERT_THAT(mode.active_setup_guid, StrNe(L"")); diff --git a/chromium_src/chrome/install_static/chromium_install_modes.cc b/chromium_src/chrome/install_static/chromium_install_modes.cc index f9f11bd648d0..af154d511985 100644 --- a/chromium_src/chrome/install_static/chromium_install_modes.cc +++ b/chromium_src/chrome/install_static/chromium_install_modes.cc @@ -26,7 +26,7 @@ const size_t kProductPathNameLength = _countof(kProductPathName) - 1; const char kSafeBrowsingName[] = "chromium"; #if defined(OFFICIAL_BUILD) -// Regarding to install switch, use same value in +// Regarding the install switch, use the same values that are in // chrome/installer/mini_installer/configuration.cc const InstallConstants kInstallModes[] = { // The primary install mode for stable Brave. @@ -39,10 +39,14 @@ const InstallConstants kInstallModes[] = { L"", // Empty install_suffix for the primary install mode. .logo_suffix = L"", // No logo suffix for the primary install mode. .app_guid = L"{AFE6A462-C574-4B8A-AF43-4CC60DF4563B}", - .base_app_name = L"Brave", // A distinct base_app_name. - .base_app_id = L"Brave", // A distinct base_app_id. - .prog_id_prefix = L"BraveHTML", // ProgID prefix. - .prog_id_description = L"Brave HTML Document", // ProgID description. + .base_app_name = L"Brave", // A distinct base_app_name. + .base_app_id = L"Brave", // A distinct base_app_id. + .browser_prog_id_prefix = L"BraveHTML", // Browser ProgID prefix. + .browser_prog_id_description = + L"Brave HTML Document", // Browser ProgID description. + .pdf_prog_id_prefix = L"BravePDF", // PDF ProgID prefix. + .pdf_prog_id_description = + L"Brave PDF Document", // PDF ProgID description. .active_setup_guid = L"{AFE6A462-C574-4B8A-AF43-4CC60DF4563B}", // Active Setup GUID. .legacy_command_execute_clsid = @@ -85,11 +89,14 @@ const InstallConstants kInstallModes[] = { .logo_suffix = L"Beta", // Logo suffix. .app_guid = L"{103BD053-949B-43A8-9120-2E424887DE11}", // A distinct app GUID. - .base_app_name = L"Brave Beta", // A distinct base_app_name. - .base_app_id = L"BraveBeta", // A distinct base_app_id. - .prog_id_prefix = L"BraveBHTML", // ProgID prefix. - .prog_id_description = - L"Brave Beta HTML Document", // ProgID description. + .base_app_name = L"Brave Beta", // A distinct base_app_name. + .base_app_id = L"BraveBeta", // A distinct base_app_id. + .browser_prog_id_prefix = L"BraveBHTML", // Browser ProgID prefix. + .browser_prog_id_description = + L"Brave Beta HTML Document", // Browser ProgID description. + .pdf_prog_id_prefix = L"BraveBPDF", // PDF ProgID prefix. + .pdf_prog_id_description = + L"Brave Beta PDF Document", // PDF ProgID description. .active_setup_guid = L"{103BD053-949B-43A8-9120-2E424887DE11}", // Active Setup GUID. .legacy_command_execute_clsid = L"", // CommandExecuteImpl CLSID. @@ -130,11 +137,14 @@ const InstallConstants kInstallModes[] = { .logo_suffix = L"Dev", // Logo suffix. .app_guid = L"{CB2150F2-595F-4633-891A-E39720CE0531}", // A distinct app GUID. - .base_app_name = L"Brave Dev", // A distinct base_app_name. - .base_app_id = L"BraveDev", // A distinct base_app_id. - .prog_id_prefix = L"BraveDHTML", // ProgID prefix. - .prog_id_description = - L"Brave Dev HTML Document", // ProgID description. + .base_app_name = L"Brave Dev", // A distinct base_app_name. + .base_app_id = L"BraveDev", // A distinct base_app_id. + .browser_prog_id_prefix = L"BraveDHTML", // Browser ProgID prefix. + .browser_prog_id_description = + L"Brave Dev HTML Document", // Browser ProgID description. + .pdf_prog_id_prefix = L"BraveDPDF", // PDF ProgID prefix. + .pdf_prog_id_description = + L"Brave Dev PDF Document", // PDF ProgID description. .active_setup_guid = L"{CB2150F2-595F-4633-891A-E39720CE0531}", // Active Setup GUID. .legacy_command_execute_clsid = L"", // CommandExecuteImpl CLSID. @@ -176,11 +186,14 @@ const InstallConstants kInstallModes[] = { .logo_suffix = L"Canary", // Logo suffix. .app_guid = L"{C6CB981E-DB30-4876-8639-109F8933582C}", // A distinct app GUID. - .base_app_name = L"Brave Nightly", // A distinct base_app_name. - .base_app_id = L"BraveNightly", // A distinct base_app_id. - .prog_id_prefix = L"BraveSSHTM", // ProgID prefix. - .prog_id_description = - L"Brave Nightly HTML Document", // ProgID description. + .base_app_name = L"Brave Nightly", // A distinct base_app_name. + .base_app_id = L"BraveNightly", // A distinct base_app_id. + .browser_prog_id_prefix = L"BraveSSHTM", // Browser ProgID prefix. + .browser_prog_id_description = + L"Brave Nightly HTML Document", // Browser ProgID description. + .pdf_prog_id_prefix = L"BraveSSPDF", // PDF ProgID prefix. + .pdf_prog_id_description = + L"Brave Nightly PDF Document", // PDF ProgID description. .active_setup_guid = L"{C6CB981E-DB30-4876-8639-109F8933582C}", // Active Setup GUID. .legacy_command_execute_clsid = @@ -228,11 +241,14 @@ const InstallConstants kInstallModes[] = { .logo_suffix = L"", // No logo suffix for the primary install mode. .app_guid = L"", // Empty app_guid since no integraion with Brave Update. - .base_app_name = L"Brave Development", // A distinct base_app_name. - .base_app_id = L"BraveDevelopment", // A distinct base_app_id. - .prog_id_prefix = L"BraveDevHTM", // ProgID prefix. - .prog_id_description = - L"Brave Development HTML Document", // ProgID description. + .base_app_name = L"Brave Development", // A distinct base_app_name. + .base_app_id = L"BraveDevelopment", // A distinct base_app_id. + .browser_prog_id_prefix = L"BraveDevHTM", // Browser ProgID prefix. + .browser_prog_id_description = + L"Brave Development HTML Document", // Browser ProgID description. + .pdf_prog_id_prefix = L"BraveDevPDF", // PDF ProgID prefix. + .pdf_prog_id_description = + L"Brave Development PDF Document", // PDF ProgID description. .active_setup_guid = L"{D6527C63-5CDD-4EF3-9299-1504E17CBD18}", // Active Setup GUID. .legacy_command_execute_clsid = diff --git a/chromium_src/components/autofill/core/browser/autofill_experiments.cc b/chromium_src/components/autofill/core/browser/autofill_experiments.cc index 350db4aaa992..469dedf35b5c 100644 --- a/chromium_src/components/autofill/core/browser/autofill_experiments.cc +++ b/chromium_src/components/autofill/core/browser/autofill_experiments.cc @@ -15,8 +15,7 @@ class SyncService; namespace autofill { class LogManager; class PersonalDataManager; -bool IsCreditCardUploadEnabled(const PrefService* pref_service, - const syncer::SyncService* sync_service, +bool IsCreditCardUploadEnabled(const syncer::SyncService* sync_service, const std::string& user_email, const std::string& user_country, const AutofillSyncSigninState sync_state, @@ -24,7 +23,6 @@ bool IsCreditCardUploadEnabled(const PrefService* pref_service, return false; } bool IsCreditCardMigrationEnabled(PersonalDataManager* personal_data_manager, - PrefService* pref_service, syncer::SyncService* sync_service, bool is_test_mode, LogManager* log_manager) { diff --git a/chromium_src/components/autofill/core/browser/autofill_experiments_unittest.cc b/chromium_src/components/autofill/core/browser/autofill_experiments_unittest.cc index 25fd0f0d7f97..5f01415f04b9 100644 --- a/chromium_src/components/autofill/core/browser/autofill_experiments_unittest.cc +++ b/chromium_src/components/autofill/core/browser/autofill_experiments_unittest.cc @@ -12,6 +12,7 @@ #include "components/autofill/core/common/autofill_prefs.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/testing_pref_service.h" +#include "components/sync/base/pref_names.h" #include "components/sync/test/test_sync_service.h" #include "testing/gtest/include/gtest/gtest.h" @@ -24,7 +25,7 @@ class AutofillExperimentsTest : public testing::Test { protected: void SetUp() override { pref_service_.registry()->RegisterBooleanPref( - prefs::kAutofillWalletImportEnabled, true); + syncer::prefs::internal::kSyncPayments, true); log_manager_ = LogManager::Create(nullptr, base::RepeatingClosure()); } @@ -40,9 +41,9 @@ class AutofillExperimentsTest : public testing::Test { bool IsCreditCardUploadEnabled(const std::string& user_email, const std::string& user_country, const AutofillSyncSigninState sync_state) { - return autofill::IsCreditCardUploadEnabled(&pref_service_, &sync_service_, - user_email, user_country, - sync_state, log_manager_.get()); + return autofill::IsCreditCardUploadEnabled(&sync_service_, user_email, + user_country, sync_state, + log_manager_.get()); } base::test::ScopedFeatureList scoped_feature_list_; diff --git a/chromium_src/components/content_settings/core/browser/content_settings_uma_util.cc b/chromium_src/components/content_settings/core/browser/content_settings_uma_util.cc index 2481d617ecf7..7053925a4795 100644 --- a/chromium_src/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/chromium_src/components/content_settings/core/browser/content_settings_uma_util.cc @@ -28,7 +28,7 @@ static_assert(static_cast(ContentSettingsType::NUM_TYPES) < "the ones used by Brave."); // clang-format off -#define BRAVE_HISTOGRAM_VALUE_LIST , \ +#define BRAVE_HISTOGRAM_VALUE_LIST \ {ContentSettingsType::BRAVE_ADS, brave_value(0)}, \ {ContentSettingsType::BRAVE_COSMETIC_FILTERING, brave_value(1)}, \ {ContentSettingsType::BRAVE_TRACKERS, brave_value(2)}, \ diff --git a/chromium_src/components/content_settings/core/browser/content_settings_utils.cc b/chromium_src/components/content_settings/core/browser/content_settings_utils.cc index 70067a20f1b1..eb497030153d 100644 --- a/chromium_src/components/content_settings/core/browser/content_settings_utils.cc +++ b/chromium_src/components/content_settings/core/browser/content_settings_utils.cc @@ -8,7 +8,23 @@ #define GetRendererContentSettingRules \ GetRendererContentSettingRules_ChromiumImpl +// Brave's ContentSettingsType::BRAVE_COSMETIC_FILTERING, +// ContentSettingsType::BRAVE_SPEEDREADER, and +// ContentSettingsType::BRAVE_COOKIES types use +// CONTENT_SETTING_DEFAULT as the initial default value, which is not a valid +// initial default value according to CanTrackLastVisit and +// ParseContentSettingValue: Note that |CONTENT_SETTING_DEFAULT| is encoded as a +// NULL value, so it is not allowed as an integer value. Also, see +// https://github.com/brave/brave-browser/issues/25733 +#define BRAVE_CAN_TRACK_LAST_VISIT \ + if (type == ContentSettingsType::BRAVE_COOKIES || \ + type == ContentSettingsType::BRAVE_COSMETIC_FILTERING || \ + type == ContentSettingsType::BRAVE_SPEEDREADER) { \ + return false; \ + } + #include "src/components/content_settings/core/browser/content_settings_utils.cc" +#undef PROTOCOL_HANDLERS #undef GetRendererContentSettingRules namespace content_settings { @@ -27,7 +43,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, for (const auto& setting : settings) { DCHECK( RendererContentSettingRules::IsRendererContentSetting(setting.first)); - map->GetSettingsForOneType(setting.first, setting.second); + *setting.second = map->GetSettingsForOneType(setting.first); } } diff --git a/chromium_src/components/content_settings/core/browser/cookie_settings.cc b/chromium_src/components/content_settings/core/browser/cookie_settings.cc index b0d12882d479..2f7ec97688c6 100644 --- a/chromium_src/components/content_settings/core/browser/cookie_settings.cc +++ b/chromium_src/components/content_settings/core/browser/cookie_settings.cc @@ -8,33 +8,11 @@ #include "net/base/features.h" #include "net/base/url_util.h" -// Determines whether a 3p cookies block should be applied if a requesting URL -// uses an explicit 1PES setting (CONTENT_SETTING_SESSION_ONLY). By default -// Chromimum allows all 3p cookies if applied CookieSettingsPatterns for the URL -// were explicit. We use explicit setting to enable 1PES mode, but in this mode -// we still want to block 3p frames as usual and not fallback to "allow -// everything" path. -#define BRAVE_COOKIE_SETTINGS_GET_COOKIES_SETTINGS_INTERNAL \ - if (!block && is_third_party_request) { \ - block = ShouldBlockThirdPartyIfSettingIsExplicit( \ - ShouldBlockThirdPartyCookies(), setting, IsExplicitSetting(info), \ - first_party_url.SchemeIs(extension_scheme_)); \ - } \ - /* Store patterns information to determine if Shields are disabled. */ \ - if (auto* setting_with_brave_metadata = \ - GetCurrentCookieSettingWithBraveMetadata()) { \ - setting_with_brave_metadata->primary_pattern_matches_all_hosts = \ - info.primary_pattern.MatchesAllHosts(); \ - setting_with_brave_metadata->secondary_pattern_matches_all_hosts = \ - info.secondary_pattern.MatchesAllHosts(); \ - } - #define ShutdownOnUIThread ShutdownOnUIThread_ChromiumImpl #include "src/components/content_settings/core/browser/cookie_settings.cc" #undef ShutdownOnUIThread -#undef BRAVE_COOKIE_SETTINGS_GET_COOKIES_SETTINGS_INTERNAL namespace content_settings { diff --git a/chromium_src/components/content_settings/core/common/cookie_settings_base.cc b/chromium_src/components/content_settings/core/common/cookie_settings_base.cc index 8d7cbaed7f15..415f805fc6fb 100644 --- a/chromium_src/components/content_settings/core/common/cookie_settings_base.cc +++ b/chromium_src/components/content_settings/core/common/cookie_settings_base.cc @@ -283,6 +283,29 @@ CookieSettingsBase::GetCurrentCookieSettingWithBraveMetadata() { } // namespace content_settings +// Determines whether a 3p cookies block should be applied if a requesting URL +// uses an explicit 1PES setting (CONTENT_SETTING_SESSION_ONLY). By default +// Chromimum allows all 3p cookies if applied CookieSettingsPatterns for the URL +// were explicit. We use explicit setting to enable 1PES mode, but in this mode +// we still want to block 3p frames as usual and not fallback to "allow +// everything" path. +#define BRAVE_COOKIE_SETTINGS_BASE_GET_COOKIES_SETTINGS_INTERNAL \ + if (!block_third && is_third_party_request) { \ + block_third = ShouldBlockThirdPartyIfSettingIsExplicit( \ + ShouldBlockThirdPartyCookies(), setting, \ + IsExplicitSetting(setting_info), \ + IsThirdPartyCookiesAllowedScheme(first_party_url.scheme())); \ + } \ + /* Store patterns information to determine if Shields are disabled. */ \ + if (auto* setting_with_brave_metadata = \ + GetCurrentCookieSettingWithBraveMetadata()) { \ + setting_with_brave_metadata->primary_pattern_matches_all_hosts = \ + setting_info.primary_pattern.MatchesAllHosts(); \ + setting_with_brave_metadata->secondary_pattern_matches_all_hosts = \ + setting_info.secondary_pattern.MatchesAllHosts(); \ + } + #define IsFullCookieAccessAllowed IsChromiumFullCookieAccessAllowed #include "src/components/content_settings/core/common/cookie_settings_base.cc" #undef IsFullCookieAccessAllowed +#undef BRAVE_COOKIE_SETTINGS_BASE_GET_COOKIES_SETTINGS_INTERNAL diff --git a/chromium_src/components/network_session_configurator/browser/network_session_configurator.cc b/chromium_src/components/network_session_configurator/browser/network_session_configurator.cc deleted file mode 100644 index d936e5b4f1c5..000000000000 --- a/chromium_src/components/network_session_configurator/browser/network_session_configurator.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#define ParseCommandLineAndFieldTrials \ - ParseCommandLineAndFieldTrials_ChromiumImpl -#include "src/components/network_session_configurator/browser/network_session_configurator.cc" -#undef ParseCommandLineAndFieldTrials - -namespace network_session_configurator { - -// Never send QUIC user agent. -void ParseCommandLineAndFieldTrials(const base::CommandLine& command_line, - bool is_quic_force_disabled, - const std::string& quic_user_agent_id, - net::HttpNetworkSessionParams* params, - net::QuicParams* quic_params) { - ParseCommandLineAndFieldTrials_ChromiumImpl( - command_line, - is_quic_force_disabled, - "" /* quic_user_agent_id */, - params, - quic_params); -} - -} // namespace network_session_configurator diff --git a/chromium_src/components/omnibox/browser/autocomplete_controller.cc b/chromium_src/components/omnibox/browser/autocomplete_controller.cc index 32c78b6b42ad..6e41d474e321 100644 --- a/chromium_src/components/omnibox/browser/autocomplete_controller.cc +++ b/chromium_src/components/omnibox/browser/autocomplete_controller.cc @@ -23,6 +23,7 @@ #include "components/omnibox/browser/autocomplete_controller.h" #include "components/omnibox/browser/autocomplete_input.h" #include "components/omnibox/browser/autocomplete_match.h" +#include "components/omnibox/browser/calculator_provider.h" #include "components/omnibox/browser/clipboard_provider.h" #include "components/omnibox/browser/history_cluster_provider.h" #include "components/omnibox/browser/history_fuzzy_provider.h" diff --git a/chromium_src/components/omnibox/browser/autocomplete_controller.h b/chromium_src/components/omnibox/browser/autocomplete_controller.h index e6df102b277d..3847850a8489 100644 --- a/chromium_src/components/omnibox/browser/autocomplete_controller.h +++ b/chromium_src/components/omnibox/browser/autocomplete_controller.h @@ -6,12 +6,12 @@ #ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ #define BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ -#define AutocompleteProviderTest \ - OmniboxPromotionTest; \ - friend class AutocompleteProviderTest +#define AutocompleteControllerTest \ + OmniboxPromotionTest; \ + friend class AutocompleteControllerTest #include "src/components/omnibox/browser/autocomplete_controller.h" // IWYU pragma: export -#undef AutocompleteProviderTest +#undef AutocompleteControllerTest #endif // BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ diff --git a/chromium_src/components/omnibox/browser/omnibox_controller.cc b/chromium_src/components/omnibox/browser/omnibox_controller.cc new file mode 100644 index 000000000000..5fb20fbf789d --- /dev/null +++ b/chromium_src/components/omnibox/browser/omnibox_controller.cc @@ -0,0 +1,23 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "components/omnibox/browser/omnibox_controller.h" + +#include "brave/components/omnibox/browser/brave_omnibox_client.h" + +#define StartAutocomplete StartAutocomplete_ChromiumImpl +#include "src/components/omnibox/browser/omnibox_controller.cc" +#undef StartAutocomplete + +void OmniboxController::StartAutocomplete( + const AutocompleteInput& input) const { + auto* client = static_cast(client_.get()); + if (!client->IsAutocompleteEnabled()) { + ClearPopupKeywordMode(); + return; + } + + StartAutocomplete_ChromiumImpl(input); +} diff --git a/chromium_src/components/omnibox/browser/omnibox_controller.h b/chromium_src/components/omnibox/browser/omnibox_controller.h index d2d2f0cbc65c..3f2bbf2bfab2 100644 --- a/chromium_src/components/omnibox/browser/omnibox_controller.h +++ b/chromium_src/components/omnibox/browser/omnibox_controller.h @@ -1,18 +1,19 @@ /* Copyright (c) 2019 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ #define BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ -#define StartAutocomplete virtual StartAutocomplete -#define SetRichSuggestionBitmap \ - SetRichSuggestionBitmapUnused(); \ - friend class BraveOmniboxController; \ - void SetRichSuggestionBitmap +// Also has StartAutocomplete member +#include "components/omnibox/browser/omnibox_edit_model.h" + +#define StartAutocomplete \ + StartAutocomplete_ChromiumImpl(const AutocompleteInput& input) const; \ + void StartAutocomplete + #include "src/components/omnibox/browser/omnibox_controller.h" // IWYU pragma: export #undef StartAutocomplete -#undef SetRichSuggestionBitmap #endif // BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ diff --git a/chromium_src/components/omnibox/browser/omnibox_edit_model.cc b/chromium_src/components/omnibox/browser/omnibox_edit_model.cc index 1842ea1c5551..9a7694480d23 100644 --- a/chromium_src/components/omnibox/browser/omnibox_edit_model.cc +++ b/chromium_src/components/omnibox/browser/omnibox_edit_model.cc @@ -60,7 +60,7 @@ void OmniboxEditModel::PasteAndGo(const std::u16string& text, GURL alternate_nav_url; ClassifyString(text, &match, &alternate_nav_url); - client()->OnInputAccepted(match); + controller_->client()->OnInputAccepted(match); PasteAndGo_Chromium(text, match_selection_timestamp); } diff --git a/chromium_src/components/omnibox/browser/omnibox_view.cc b/chromium_src/components/omnibox/browser/omnibox_view.cc deleted file mode 100644 index 08a2a84f4fe4..000000000000 --- a/chromium_src/components/omnibox/browser/omnibox_view.cc +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2023 The Brave Authors. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this file, -// You can obtain one at https://mozilla.org/MPL/2.0/. - -#include "brave/components/omnibox/browser/brave_omnibox_client.h" - -#include "components/omnibox/browser/omnibox_controller.h" - -class BraveOmniboxController : public OmniboxController { - public: - BraveOmniboxController(OmniboxView* view, - std::unique_ptr client) - : OmniboxController(view, std::move(client)) {} - BraveOmniboxController(const BraveOmniboxController&) = delete; - BraveOmniboxController& operator=(const BraveOmniboxController&) = delete; - ~BraveOmniboxController() override = default; - - // OmniboxController overrides: - void StartAutocomplete(const AutocompleteInput& input) const override { - auto* client = static_cast(client_.get()); - if (!client->IsAutocompleteEnabled()) { - return; - } - - OmniboxController::StartAutocomplete(input); - } -}; - -#define OmniboxController BraveOmniboxController - -#include "src/components/omnibox/browser/omnibox_view.cc" - -#undef OmniboxController diff --git a/chromium_src/components/omnibox/browser/shortcuts_provider.h b/chromium_src/components/omnibox/browser/shortcuts_provider.h index a90f10845c67..277e2c710abb 100644 --- a/chromium_src/components/omnibox/browser/shortcuts_provider.h +++ b/chromium_src/components/omnibox/browser/shortcuts_provider.h @@ -6,13 +6,13 @@ #ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ #define BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ -#define GetMatches \ - GetMatchesUnused(); \ +#define DoAutocomplete \ + DoAutocompleteUnused(); \ friend class BraveShortcutsProvider; \ - void GetMatches + void DoAutocomplete #include "src/components/omnibox/browser/shortcuts_provider.h" // IWYU pragma: export -#undef GetMatches +#undef DoAutocomplete #endif // BRAVE_CHROMIUM_SRC_COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ diff --git a/chromium_src/components/omnibox/common/omnibox_features.cc b/chromium_src/components/omnibox/common/omnibox_features.cc index a0cba745b6ae..d1587729a99b 100644 --- a/chromium_src/components/omnibox/common/omnibox_features.cc +++ b/chromium_src/components/omnibox/common/omnibox_features.cc @@ -11,6 +11,9 @@ namespace omnibox { OVERRIDE_FEATURE_DEFAULT_STATES({{ {kInspireMe, base::FEATURE_DISABLED_BY_DEFAULT}, + {kDocumentProviderNoSetting, base::FEATURE_DISABLED_BY_DEFAULT}, + {kDocumentProviderNoSyncRequirement, base::FEATURE_DISABLED_BY_DEFAULT}, + {kOmniboxMostVisitedTilesOnSrp, base::FEATURE_DISABLED_BY_DEFAULT}, {kOmniboxSteadyStateHeight, base::FEATURE_DISABLED_BY_DEFAULT}, {kRichAutocompletion, base::FEATURE_DISABLED_BY_DEFAULT}, }}); diff --git a/chromium_src/components/page_info/core/features.cc b/chromium_src/components/page_info/core/features.cc index 89183dbe8621..b643e1783309 100644 --- a/chromium_src/components/page_info/core/features.cc +++ b/chromium_src/components/page_info/core/features.cc @@ -10,10 +10,4 @@ namespace page_info { -OVERRIDE_FEATURE_DEFAULT_STATES({{ -#if !BUILDFLAG(IS_ANDROID) - {kPageInfoCookiesSubpage, base::FEATURE_DISABLED_BY_DEFAULT}, -#endif -}}); - } // namespace page_info diff --git a/chromium_src/components/permissions/permission_request.cc b/chromium_src/components/permissions/permission_request.cc index 148d0ef160ea..ad05ebeae250 100644 --- a/chromium_src/components/permissions/permission_request.cc +++ b/chromium_src/components/permissions/permission_request.cc @@ -102,8 +102,6 @@ bool PermissionRequest::SupportsLifetime() const { RequestType::kProtectedMediaIdentifier, #else RequestType::kRegisterProtocolHandler, - RequestType::kSecurityAttestation, - RequestType::kU2fApiRequest, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(ENABLE_WIDEVINE) RequestType::kWidevine diff --git a/chromium_src/components/privacy_sandbox/DEPS b/chromium_src/components/privacy_sandbox/DEPS index c507aa4b1747..c9231f01b531 100644 --- a/chromium_src/components/privacy_sandbox/DEPS +++ b/chromium_src/components/privacy_sandbox/DEPS @@ -2,5 +2,6 @@ specific_include_rules = { "privacy_sandbox_settings_unittest.cc": [ "+brave/components/privacy_sandbox", "+chrome/test/base/testing_profile.h", + "+content/public/browser/content_browser_client.h" ], } diff --git a/chromium_src/components/privacy_sandbox/privacy_sandbox_settings_unittest.cc b/chromium_src/components/privacy_sandbox/privacy_sandbox_settings_unittest.cc index d7a3fa5cdff3..3f69faf31aa1 100644 --- a/chromium_src/components/privacy_sandbox/privacy_sandbox_settings_unittest.cc +++ b/chromium_src/components/privacy_sandbox/privacy_sandbox_settings_unittest.cc @@ -17,6 +17,7 @@ #include "components/privacy_sandbox/privacy_sandbox_prefs.h" #include "components/privacy_sandbox/privacy_sandbox_test_util.h" #include "components/sync_preferences/testing_pref_service_syncable.h" +#include "content/public/browser/content_browser_client.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/origin.h" @@ -122,7 +123,8 @@ TEST_F(PrivacySandboxSettingsTest, PreferenceOverridesDefaultContentSetting) { url::Origin::Create(GURL("https://embedded.com")))); EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // An allow exception should not override the preference value. privacy_sandbox_test_util::SetupTestState( @@ -154,7 +156,8 @@ TEST_F(PrivacySandboxSettingsTest, PreferenceOverridesDefaultContentSetting) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); } TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { @@ -187,7 +190,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // User created exceptions should not apply if a managed default coookie // setting exists. What the managed default setting actually is should *not* @@ -221,7 +225,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { url::Origin::Create(GURL("https://embedded.com")))); EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // Managed content setting exceptions. privacy_sandbox_test_util::SetupTestState( @@ -265,7 +270,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // A less specific block exception. privacy_sandbox_test_util::SetupTestState( @@ -292,7 +298,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // Exceptions which specify a top frame origin. privacy_sandbox_test_util::SetupTestState( @@ -322,7 +329,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://another-test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // Exceptions which specify a wildcard top frame origin. privacy_sandbox_test_util::SetupTestState( @@ -352,7 +360,8 @@ TEST_F(PrivacySandboxSettingsTest, CookieBlockExceptionsNeverApply) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); } TEST_F(PrivacySandboxSettingsTest, IsFledgeAllowed) { @@ -368,7 +377,8 @@ TEST_F(PrivacySandboxSettingsTest, IsFledgeAllowed) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // FLEDGE should be disabled if all cookies are blocked. privacy_sandbox_test_util::SetupTestState( @@ -382,7 +392,8 @@ TEST_F(PrivacySandboxSettingsTest, IsFledgeAllowed) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // FLEDGE should be disabled if the privacy sandbox is disabled, regardless // of other cookie settings. @@ -401,7 +412,8 @@ TEST_F(PrivacySandboxSettingsTest, IsFledgeAllowed) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); // The managed cookie content setting should not override a disabled privacy // sandbox setting. @@ -416,7 +428,8 @@ TEST_F(PrivacySandboxSettingsTest, IsFledgeAllowed) { EXPECT_FALSE(privacy_sandbox_settings()->IsFledgeAllowed( url::Origin::Create(GURL("https://test.com")), - url::Origin::Create(GURL("https://embedded.com")))); + url::Origin::Create(GURL("https://embedded.com")), + content::InterestGroupApiOperation::kJoin)); } TEST_F(PrivacySandboxSettingsTest, IsPrivacySandboxEnabled) { diff --git a/chromium_src/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/chromium_src/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm index 52d8a51b79fc..6abe280216e8 100644 --- a/chromium_src/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/chromium_src/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm @@ -21,9 +21,9 @@ // Sometimes title is not visible until window is resized. In order to avoid // this, reset title to force it to be visible. if (visible) { - NSString* title = window_.get().title; - window_.get().title = @""; - window_.get().title = title; + NSString* title = window_.title; + window_.title = @""; + window_.title = title; } } @@ -43,13 +43,13 @@ // // If this behavior is broken, we should run `class-dump` by ourselves and // find out what can be used instead of this. - NSView* frameView = window_.get().contentView.superview; + NSView* frameView = window_.contentView.superview; DCHECK([frameView isKindOfClass:[NSThemeFrame class]]); - SEL selector = @selector(_resetTitleBarButtons); - if ([frameView respondsToSelector:selector]) - [frameView performSelector:selector]; - else + if ([frameView respondsToSelector:@selector(_resetTitleBarButtons)]) { + [frameView performSelector:@selector(_resetTitleBarButtons)]; + } else { LOG(ERROR) << "Failed to find selector for resetting window controls"; + } } } // namespace remote_cocoa diff --git a/chromium_src/components/shared_highlighting/core/common/shared_highlighting_features.cc b/chromium_src/components/shared_highlighting/core/common/shared_highlighting_features.cc index 5791f448ff62..50dbce8c3399 100644 --- a/chromium_src/components/shared_highlighting/core/common/shared_highlighting_features.cc +++ b/chromium_src/components/shared_highlighting/core/common/shared_highlighting_features.cc @@ -11,7 +11,6 @@ namespace shared_highlighting { OVERRIDE_FEATURE_DEFAULT_STATES({{ {kIOSSharedHighlightingV2, base::FEATURE_DISABLED_BY_DEFAULT}, - {kSharedHighlightingAmp, base::FEATURE_DISABLED_BY_DEFAULT}, {kSharedHighlightingManager, base::FEATURE_DISABLED_BY_DEFAULT}, }}); diff --git a/chromium_src/components/supervised_user/core/browser/DEPS b/chromium_src/components/supervised_user/core/browser/DEPS new file mode 100644 index 000000000000..9232aba0153a --- /dev/null +++ b/chromium_src/components/supervised_user/core/browser/DEPS @@ -0,0 +1,5 @@ +specific_include_rules = { + "supervised_user_content_settings_provider.h": [ + "+brave/components/content_settings/core/browser/brave_global_value_map.h", + ], +} diff --git a/chromium_src/components/supervised_user/core/browser/supervised_user_content_settings_provider.h b/chromium_src/components/supervised_user/core/browser/supervised_user_content_settings_provider.h new file mode 100644 index 000000000000..1b95607836e3 --- /dev/null +++ b/chromium_src/components/supervised_user/core/browser/supervised_user_content_settings_provider.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CONTENT_SETTINGS_PROVIDER_H_ +#define BRAVE_CHROMIUM_SRC_COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CONTENT_SETTINGS_PROVIDER_H_ + +#include "build/build_config.h" + +#if !BUILDFLAG(IS_IOS) +#include "brave/components/content_settings/core/browser/brave_global_value_map.h" + +#define GlobalValueMap BraveGlobalValueMap +#endif + +#include "src/components/supervised_user/core/browser/supervised_user_content_settings_provider.h" // IWYU pragma: export +#if !BUILDFLAG(IS_IOS) +#undef GlobalValueMap +#endif + +#endif // BRAVE_CHROMIUM_SRC_COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CONTENT_SETTINGS_PROVIDER_H_ diff --git a/chromium_src/components/sync/base/model_type_unittest.cc b/chromium_src/components/sync/base/model_type_unittest.cc index 58f9d3255d3b..c7f0557550da 100644 --- a/chromium_src/components/sync/base/model_type_unittest.cc +++ b/chromium_src/components/sync/base/model_type_unittest.cc @@ -14,7 +14,7 @@ TEST_F(ModelTypeTest, EncryptableUserTypes) { // This test is supposed to fail when sync types are increased/decreased TEST_F(ModelTypeTest, ModelTypeCounts) { - EXPECT_EQ(static_cast(ModelTypeForHistograms::kMaxValue), 60); + EXPECT_EQ(static_cast(ModelTypeForHistograms::kMaxValue), 61); } } // namespace diff --git a/chromium_src/components/sync/service/sync_session_durations_metrics_recorder.cc b/chromium_src/components/sync/service/sync_session_durations_metrics_recorder.cc index 1fe66841b882..01f59b74d90f 100644 --- a/chromium_src/components/sync/service/sync_session_durations_metrics_recorder.cc +++ b/chromium_src/components/sync/service/sync_session_durations_metrics_recorder.cc @@ -10,7 +10,9 @@ namespace syncer { SyncSessionDurationsMetricsRecorder::SyncSessionDurationsMetricsRecorder( SyncService* sync_service, signin::IdentityManager* identity_manager) - : sync_service_(sync_service), identity_manager_(identity_manager) {} + : sync_service_(sync_service), + identity_manager_(identity_manager), + history_sync_recorder_(sync_service) {} SyncSessionDurationsMetricsRecorder::~SyncSessionDurationsMetricsRecorder() {} diff --git a/chromium_src/content/browser/dom_storage/dom_storage_context_wrapper.cc b/chromium_src/content/browser/dom_storage/dom_storage_context_wrapper.cc index 17e11aea339b..7f09572e9357 100644 --- a/chromium_src/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/chromium_src/content/browser/dom_storage/dom_storage_context_wrapper.cc @@ -5,11 +5,11 @@ // Brave uses opaque origins to access ephemeral localStorage areas. This block // allows these origins to be treated as valid ones. -#define BRAVE_DOM_STORAGE_CONTEXT_WRAPPER_IS_REQUEST_VALID \ - if (host_storage_key_did_not_match && storage_key.origin().opaque() && \ - host->storage_key().origin().GetTupleOrPrecursorTupleIfOpaque() == \ - storage_key.origin().GetTupleOrPrecursorTupleIfOpaque()) { \ - host_storage_key_did_not_match = false; \ +#define BRAVE_DOM_STORAGE_CONTEXT_WRAPPER_IS_REQUEST_VALID \ + if (host_storage_key_did_not_match && storage_key.origin().opaque() && \ + host->GetStorageKey().origin().GetTupleOrPrecursorTupleIfOpaque() == \ + storage_key.origin().GetTupleOrPrecursorTupleIfOpaque()) { \ + host_storage_key_did_not_match = false; \ } #include "src/content/browser/dom_storage/dom_storage_context_wrapper.cc" diff --git a/chromium_src/content/public/common/content_features.cc b/chromium_src/content/public/common/content_features.cc index 70ead106ed9b..ce5e1d1b040c 100644 --- a/chromium_src/content/public/common/content_features.cc +++ b/chromium_src/content/public/common/content_features.cc @@ -14,8 +14,6 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kAttributionFencedFrameReportingBeacon, base::FEATURE_DISABLED_BY_DEFAULT}, {kDigitalGoodsApi, base::FEATURE_DISABLED_BY_DEFAULT}, {kFedCm, base::FEATURE_DISABLED_BY_DEFAULT}, - {kFedCmIframeSupport, base::FEATURE_DISABLED_BY_DEFAULT}, - {kFedCmUserInfo, base::FEATURE_DISABLED_BY_DEFAULT}, {kFirstPartySets, base::FEATURE_DISABLED_BY_DEFAULT}, {kIdleDetection, base::FEATURE_DISABLED_BY_DEFAULT}, {kNotificationTriggers, base::FEATURE_DISABLED_BY_DEFAULT}, @@ -23,7 +21,6 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kSignedExchangeReportingForDistributors, base::FEATURE_DISABLED_BY_DEFAULT}, {kSignedHTTPExchange, base::FEATURE_DISABLED_BY_DEFAULT}, - {kWebEnvironmentIntegrity, base::FEATURE_DISABLED_BY_DEFAULT}, #if BUILDFLAG(IS_ANDROID) {kWebNfc, base::FEATURE_DISABLED_BY_DEFAULT}, #endif diff --git a/chromium_src/extensions/browser/api/web_request/extension_web_request_event_router.cc b/chromium_src/extensions/browser/api/web_request/extension_web_request_event_router.cc new file mode 100644 index 000000000000..89e0ec25a1c2 --- /dev/null +++ b/chromium_src/extensions/browser/api/web_request/extension_web_request_event_router.cc @@ -0,0 +1,13 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#define BRAVE_EXTENSION_WEB_REQUEST_EVENT_ROUTER_ON_AUTH_REQUIRED \ + ClearSignaled(request->id, kOnBeforeSendHeaders); \ + ClearSignaled(request->id, kOnSendHeaders); \ + ClearSignaled(request->id, kOnHeadersReceived); + +#include "src/extensions/browser/api/web_request/extension_web_request_event_router.cc" + +#undef BRAVE_EXTENSION_WEB_REQUEST_EVENT_ROUTER_ON_AUTH_REQUIRED diff --git a/chromium_src/ios/chrome/browser/application_context/application_context_impl.mm b/chromium_src/ios/chrome/browser/application_context/application_context_impl.mm index f633427a77e1..479f63e3f8c1 100644 --- a/chromium_src/ios/chrome/browser/application_context/application_context_impl.mm +++ b/chromium_src/ios/chrome/browser/application_context/application_context_impl.mm @@ -39,7 +39,6 @@ #include "ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h" #include "ios/chrome/browser/policy/browser_policy_connector_ios.h" #include "ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h" -#import "ios/chrome/browser/promos_manager/promos_manager.h" #include "ios/chrome/browser/push_notification/push_notification_service.h" #include "ios/chrome/browser/segmentation_platform/otr_web_state_observer.h" #include "ios/chrome/browser/shared/model/application_context/application_context.h" @@ -47,7 +46,6 @@ #include "ios/chrome/browser/shared/model/paths/paths.h" #include "ios/chrome/browser/shared/model/prefs/browser_prefs.h" #include "ios/chrome/browser/shared/model/prefs/pref_names.h" -#include "ios/chrome/browser/signin/system_identity_manager.h" #import "ios/components/security_interstitials/safe_browsing/safe_browsing_service.h" #include "ios/public/provider/chrome/browser/app_distribution/app_distribution_api.h" #include "ios/public/provider/chrome/browser/push_notification/push_notification_api.h" diff --git a/chromium_src/ios/web/web_state/ui/crw_web_controller.h b/chromium_src/ios/web/web_state/ui/crw_web_controller.h new file mode 100644 index 000000000000..2fcf14e37de4 --- /dev/null +++ b/chromium_src/ios/web/web_state/ui/crw_web_controller.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ +#define BRAVE_CHROMIUM_SRC_IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ + +#define webViewNavigationProxy \ + webViewNavigationProxy_ChromiumImpl; \ + @property(weak, nonatomic, readonly) id \ + webViewNavigationProxy + +#include "src/ios/web/web_state/ui/crw_web_controller.h" // IWYU pragma: export + +#undef webViewNavigationProxy + +#endif // BRAVE_CHROMIUM_SRC_IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ diff --git a/chromium_src/ios/web/web_state/ui/crw_web_controller.mm b/chromium_src/ios/web/web_state/ui/crw_web_controller.mm new file mode 100644 index 000000000000..b19d909f907f --- /dev/null +++ b/chromium_src/ios/web/web_state/ui/crw_web_controller.mm @@ -0,0 +1,92 @@ +/* Copyright (c) 2023 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "ios/web/web_state/ui/crw_web_controller.h" +#include "net/base/mac/url_conversions.h" +#include "url/gurl.h" + +#include + +#define webViewNavigationProxy webViewNavigationProxy_ChromiumImpl +#include "src/ios/web/web_state/ui/crw_web_controller.mm" +#undef webViewNavigationProxy + +#pragma mark - BackForwardList + +// Back Forward List for use in Navigation Manager +@interface BackForwardList : NSObject +@property(nonatomic, readonly, copy) WKBackForwardListItem* currentItem; +@property(nonatomic, readonly, copy) NSArray* backList; +@property(nonatomic, readonly, copy) + NSArray* forwardList; +@end + +@implementation BackForwardList +@synthesize currentItem; +@synthesize backList; +@synthesize forwardList; + +- (instancetype)init { + self = [super init]; + return self; +} + +- (WKBackForwardListItem*)itemAtIndex:(NSInteger)index { + if (index == 0) { + return currentItem; + } + + if (index > 0 && forwardList.count) { + return forwardList[index - 1]; + } + + if (backList.count) { + return backList[backList.count + index]; + } + + return nullptr; +} + +- (WKBackForwardListItem*)backItem { + return backList.lastObject; +} + +- (WKBackForwardListItem*)forwardItem { + return forwardList.firstObject; +} +@end + +#pragma mark - NavigationProxy + +@interface NavigationProxy : NSObject +@end + +@implementation NavigationProxy +- (instancetype)init { + if ((self = [super init])) { + } + return self; +} + +- (NSURL*)URL { + return net::NSURLWithGURL(GURL(url::kAboutBlankURL)); +} + +- (WKBackForwardList*)backForwardList { + return (WKBackForwardList*)[[BackForwardList alloc] init]; +} +@end + +#pragma mark - CRWWebController + +@implementation CRWWebController (Brave) +- (id)webViewNavigationProxy { + if (self.webView) { + return [self webViewNavigationProxy_ChromiumImpl]; + } + + return [[NavigationProxy alloc] init]; +} +@end diff --git a/chromium_src/net/base/features.cc b/chromium_src/net/base/features.cc index 36f0b26d435b..b6b470fd1a91 100644 --- a/chromium_src/net/base/features.cc +++ b/chromium_src/net/base/features.cc @@ -11,6 +11,7 @@ namespace net { namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ + {kEnableWebTransportDraft07, base::FEATURE_DISABLED_BY_DEFAULT}, {kNoncedPartitionedCookies, base::FEATURE_DISABLED_BY_DEFAULT}, // Enable NIK-partitioning by default. {kPartitionConnectionsByNetworkIsolationKey, @@ -20,7 +21,6 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ base::FEATURE_ENABLED_BY_DEFAULT}, {kPartitionSSLSessionsByNetworkIsolationKey, base::FEATURE_ENABLED_BY_DEFAULT}, - {kSamePartyAttributeEnabled, base::FEATURE_DISABLED_BY_DEFAULT}, {kSplitHostCacheByNetworkIsolationKey, base::FEATURE_ENABLED_BY_DEFAULT}, // It is necessary yet to make chromium storage partitioning compatible with // Brave ephemeral storage. For reference: diff --git a/chromium_src/net/url_request/url_request_http_job.cc b/chromium_src/net/url_request/url_request_http_job.cc index 4be5cf39bb3f..2285346b652b 100644 --- a/chromium_src/net/url_request/url_request_http_job.cc +++ b/chromium_src/net/url_request/url_request_http_job.cc @@ -1,7 +1,7 @@ -/* Copyright 2021 The Brave Authors. All rights reserved. +/* Copyright (c) 2021 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "net/url_request/url_request_http_job.h" @@ -25,16 +25,11 @@ namespace net { CookieOptions URLRequestHttpJob::CreateCookieOptions( - CookieOptions::SameSiteCookieContext same_site_context, - SamePartyContext same_party_context, - const IsolationInfo& isolation_info, - bool is_in_nontrivial_first_party_set) const { - CookieOptions cookie_options = - ::CreateCookieOptions(same_site_context, same_party_context, - isolation_info, is_in_nontrivial_first_party_set); + CookieOptions::SameSiteCookieContext same_site_context) const { + CookieOptions cookie_options = ::CreateCookieOptions(same_site_context); FillEphemeralStorageParams( request_->url(), request_->site_for_cookies(), - isolation_info.top_frame_origin(), + request_->isolation_info().top_frame_origin(), request_->context()->cookie_store()->cookie_access_delegate(), &cookie_options); return cookie_options; diff --git a/chromium_src/net/url_request/url_request_http_job.h b/chromium_src/net/url_request/url_request_http_job.h index 8dde773ac61f..2f9ebf9f7023 100644 --- a/chromium_src/net/url_request/url_request_http_job.h +++ b/chromium_src/net/url_request/url_request_http_job.h @@ -1,7 +1,7 @@ -/* Copyright 2021 The Brave Authors. All rights reserved. +/* Copyright (c) 2021 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef BRAVE_CHROMIUM_SRC_NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ #define BRAVE_CHROMIUM_SRC_NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ @@ -9,15 +9,11 @@ #include "net/base/isolation_info.h" #include "net/base/request_priority.h" #include "net/cookies/cookie_options.h" -#include "net/first_party_sets/same_party_context.h" -#define NotifyBeforeStartTransactionCallback \ - NotUsed() const {} \ - CookieOptions CreateCookieOptions( \ - CookieOptions::SameSiteCookieContext same_site_context, \ - SamePartyContext same_party_context, \ - const IsolationInfo& isolation_info, \ - bool is_in_nontrivial_first_party_set) const; \ +#define NotifyBeforeStartTransactionCallback \ + NotUsed() const {} \ + CookieOptions CreateCookieOptions( \ + CookieOptions::SameSiteCookieContext same_site_context) const; \ void NotifyBeforeStartTransactionCallback #include "src/net/url_request/url_request_http_job.h" // IWYU pragma: export diff --git a/chromium_src/services/network/cookie_settings.cc b/chromium_src/services/network/cookie_settings.cc index 2d17ceba30fb..fc8b8a10809a 100644 --- a/chromium_src/services/network/cookie_settings.cc +++ b/chromium_src/services/network/cookie_settings.cc @@ -8,36 +8,8 @@ #include "net/base/features.h" #include "url/origin.h" -// Determines whether a 3p cookies block should be applied if a requesting URL -// uses an explicit 1PES setting (CONTENT_SETTING_SESSION_ONLY). By default -// Chromimum allows all 3p cookies if applied CookieSettingsPatterns for the URL -// were explicit. We use explicit setting to enable 1PES mode, but in this mode -// we still want to block 3p frames as usual and not fall back to "allow -// everything" path. -#define BRAVE_COOKIE_SETTINGS_GET_COOKIE_SETTINGS_INTERNAL \ - DCHECK(third_party_blocking_scope == absl::nullopt); \ - if (is_third_party_request && \ - ShouldBlockThirdPartyIfSettingIsExplicit( \ - block_third_party_cookies_, cookie_setting, found_explicit_setting, \ - base::Contains(third_party_cookies_allowed_schemes_, \ - first_party_url.scheme()))) { \ - third_party_blocking_scope = \ - ThirdPartyBlockingScope::kUnpartitionedAndPartitioned; \ - cookie_setting = CONTENT_SETTING_BLOCK; \ - } \ - /* Store patterns information to determine if Shields are disabled. */ \ - if (auto* setting_with_brave_metadata = \ - GetCurrentCookieSettingWithBraveMetadata()) { \ - setting_with_brave_metadata->primary_pattern_matches_all_hosts = \ - match->primary_pattern.MatchesAllHosts(); \ - setting_with_brave_metadata->secondary_pattern_matches_all_hosts = \ - match->secondary_pattern.MatchesAllHosts(); \ - } - #include "src/services/network/cookie_settings.cc" -#undef BRAVE_COOKIE_SETTINGS_GET_COOKIE_SETTINGS_INTERNAL - namespace network { bool CookieSettings::IsEphemeralCookieAccessible( @@ -45,7 +17,8 @@ bool CookieSettings::IsEphemeralCookieAccessible( const GURL& url, const net::SiteForCookies& site_for_cookies, const absl::optional& top_frame_origin, - net::CookieSettingOverrides overrides) const { + net::CookieSettingOverrides overrides, + net::CookieInclusionStatus* cookie_inclusion_status) const { // Upstream now do single cookie-specific checks in some places to determine // whether cookie access should be granted. However, when ephemeral storage is // enabled, Brave doesn't care about whether access is being requested for a @@ -57,7 +30,7 @@ bool CookieSettings::IsEphemeralCookieAccessible( } return IsCookieAccessible(cookie, url, site_for_cookies, top_frame_origin, - overrides); + overrides, cookie_inclusion_status); } net::NetworkDelegate::PrivacySetting diff --git a/chromium_src/services/network/cookie_settings.h b/chromium_src/services/network/cookie_settings.h index 01993f1697d8..1f1032a665a1 100644 --- a/chromium_src/services/network/cookie_settings.h +++ b/chromium_src/services/network/cookie_settings.h @@ -12,7 +12,8 @@ const net::CanonicalCookie& cookie, const GURL& url, \ const net::SiteForCookies& site_for_cookies, \ const absl::optional& top_frame_origin, \ - net::CookieSettingOverrides overrides) const; \ + net::CookieSettingOverrides overrides, \ + net::CookieInclusionStatus* cookie_inclusion_status) const; \ net::NetworkDelegate::PrivacySetting IsEphemeralPrivacyModeEnabled( \ const GURL& url, const net::SiteForCookies& site_for_cookies, \ const absl::optional& top_frame_origin, \ diff --git a/chromium_src/services/network/restricted_cookie_manager.cc b/chromium_src/services/network/restricted_cookie_manager.cc index 0d6635748b97..52a61c38f90b 100644 --- a/chromium_src/services/network/restricted_cookie_manager.cc +++ b/chromium_src/services/network/restricted_cookie_manager.cc @@ -59,12 +59,9 @@ net::CookieOptions RestrictedCookieManager::MakeOptionsForSet( mojom::RestrictedCookieManagerRole role, const GURL& url, const net::SiteForCookies& site_for_cookies, - const net::IsolationInfo& isolation_info, - const CookieSettings& cookie_settings, - const net::FirstPartySetMetadata& first_party_set_metadata) const { - net::CookieOptions cookie_options = - ::network::MakeOptionsForSet(role, url, site_for_cookies, isolation_info, - cookie_settings, first_party_set_metadata); + const CookieSettings& cookie_settings) const { + net::CookieOptions cookie_options = ::network::MakeOptionsForSet( + role, url, site_for_cookies, cookie_settings); net::FillEphemeralStorageParams(url, site_for_cookies, BoundTopFrameOrigin(), cookie_store_->cookie_access_delegate(), &cookie_options); @@ -75,12 +72,9 @@ net::CookieOptions RestrictedCookieManager::MakeOptionsForGet( mojom::RestrictedCookieManagerRole role, const GURL& url, const net::SiteForCookies& site_for_cookies, - const net::IsolationInfo& isolation_info, - const CookieSettings& cookie_settings, - const net::FirstPartySetMetadata& first_party_set_metadata) const { - net::CookieOptions cookie_options = - ::network::MakeOptionsForGet(role, url, site_for_cookies, isolation_info, - cookie_settings, first_party_set_metadata); + const CookieSettings& cookie_settings) const { + net::CookieOptions cookie_options = ::network::MakeOptionsForGet( + role, url, site_for_cookies, cookie_settings); net::FillEphemeralStorageParams(url, site_for_cookies, BoundTopFrameOrigin(), cookie_store_->cookie_access_delegate(), &cookie_options); diff --git a/chromium_src/services/network/restricted_cookie_manager.h b/chromium_src/services/network/restricted_cookie_manager.h index 2b269a74e86b..4972d8ab732b 100644 --- a/chromium_src/services/network/restricted_cookie_manager.h +++ b/chromium_src/services/network/restricted_cookie_manager.h @@ -1,7 +1,7 @@ -/* Copyright 2021 The Brave Authors. All rights reserved. +/* Copyright (c) 2021 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef BRAVE_CHROMIUM_SRC_SERVICES_NETWORK_RESTRICTED_COOKIE_MANAGER_H_ #define BRAVE_CHROMIUM_SRC_SERVICES_NETWORK_RESTRICTED_COOKIE_MANAGER_H_ @@ -12,22 +12,18 @@ #include "net/cookies/site_for_cookies.h" #include "services/network/public/mojom/restricted_cookie_manager.mojom.h" -#define RemoveChangeListener \ - NotUsed() const {} \ - base::Time ModifyExpiration(const base::Time& expiry_date, \ - const base::Time& creation_date) const; \ - net::CookieOptions MakeOptionsForSet( \ - mojom::RestrictedCookieManagerRole role, const GURL& url, \ - const net::SiteForCookies& site_for_cookies, \ - const net::IsolationInfo& isolation_info, \ - const CookieSettings& cookie_settings, \ - const net::FirstPartySetMetadata& first_party_set_metadata) const; \ - net::CookieOptions MakeOptionsForGet( \ - mojom::RestrictedCookieManagerRole role, const GURL& url, \ - const net::SiteForCookies& site_for_cookies, \ - const net::IsolationInfo& isolation_info, \ - const CookieSettings& cookie_settings, \ - const net::FirstPartySetMetadata& first_party_set_metadata) const; \ +#define RemoveChangeListener \ + NotUsed() const {} \ + base::Time ModifyExpiration(const base::Time& expiry_date, \ + const base::Time& creation_date) const; \ + net::CookieOptions MakeOptionsForSet( \ + mojom::RestrictedCookieManagerRole role, const GURL& url, \ + const net::SiteForCookies& site_for_cookies, \ + const CookieSettings& cookie_settings) const; \ + net::CookieOptions MakeOptionsForGet( \ + mojom::RestrictedCookieManagerRole role, const GURL& url, \ + const net::SiteForCookies& site_for_cookies, \ + const CookieSettings& cookie_settings) const; \ void RemoveChangeListener #include "src/services/network/restricted_cookie_manager.h" // IWYU pragma: export diff --git a/chromium_src/third_party/blink/common/features.cc b/chromium_src/third_party/blink/common/features.cc index 2201844253da..2610b2f16c2f 100644 --- a/chromium_src/third_party/blink/common/features.cc +++ b/chromium_src/third_party/blink/common/features.cc @@ -15,17 +15,22 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kMixedContentAutoupgrade, base::FEATURE_ENABLED_BY_DEFAULT}, {kPrefetchPrivacyChanges, base::FEATURE_ENABLED_BY_DEFAULT}, {kReducedReferrerGranularity, base::FEATURE_ENABLED_BY_DEFAULT}, + {kUACHOverrideBlank, base::FEATURE_ENABLED_BY_DEFAULT}, + {kAdAuctionReportingWithMacroApi, base::FEATURE_DISABLED_BY_DEFAULT}, {kAdInterestGroupAPI, base::FEATURE_DISABLED_BY_DEFAULT}, {kAllowURNsInIframes, base::FEATURE_DISABLED_BY_DEFAULT}, {kBackgroundResourceFetch, base::FEATURE_DISABLED_BY_DEFAULT}, {kBiddingAndScoringDebugReportingAPI, base::FEATURE_DISABLED_BY_DEFAULT}, {kBrowsingTopics, base::FEATURE_DISABLED_BY_DEFAULT}, {kBrowsingTopicsXHR, base::FEATURE_DISABLED_BY_DEFAULT}, + {kClientHintsFormFactor, base::FEATURE_DISABLED_BY_DEFAULT}, {kClientHintsMetaEquivDelegateCH, base::FEATURE_DISABLED_BY_DEFAULT}, {kComputePressure, base::FEATURE_DISABLED_BY_DEFAULT}, {kConversionMeasurement, base::FEATURE_DISABLED_BY_DEFAULT}, {kCssSelectorFragmentAnchor, base::FEATURE_DISABLED_BY_DEFAULT}, + {kEventTimingReportAllEarlyEntriesOnPaintedPresentation, + base::FEATURE_DISABLED_BY_DEFAULT}, {kFencedFrames, base::FEATURE_DISABLED_BY_DEFAULT}, {kFledge, base::FEATURE_DISABLED_BY_DEFAULT}, {kFledgeBiddingAndAuctionServer, base::FEATURE_DISABLED_BY_DEFAULT}, @@ -44,6 +49,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kSpeculationRulesPrefetchFuture, base::FEATURE_DISABLED_BY_DEFAULT}, {kSpeculationRulesPrefetchProxy, base::FEATURE_DISABLED_BY_DEFAULT}, {kTextFragmentAnchor, base::FEATURE_DISABLED_BY_DEFAULT}, + {kWebEnvironmentIntegrity, base::FEATURE_DISABLED_BY_DEFAULT}, }}); // Allow certain client hints in request header. diff --git a/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.cc b/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.cc index 77e31a946eac..86f701b9578a 100644 --- a/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.cc +++ b/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.cc @@ -15,18 +15,19 @@ bool EventListenerMap::AddListenerToVector( EventListenerVector* vector, EventListener* listener, const AddEventListenerOptionsResolved* options, - RegisteredEventListener* registered_listener) { + RegisteredEventListener** registered_listener) { const bool result = ::blink::AddListenerToVector(vector, listener, options, registered_listener); if (result && CoreProbeSink::HasAgentsGlobal(CoreProbeSink::kPageGraph)) { DCHECK(registered_listener); + DCHECK(*registered_listener); DCHECK(vector && !vector->empty()); DCHECK(*registered_listener == vector->back()); const int id = RegisteredEventListener::GenerateId(); // Set id to the returned object. - registered_listener->SetId(id); + (*registered_listener)->SetId(id); // Set id to the vector-stored object (it's a copy). - vector->back().SetId(id); + vector->back()->SetId(id); } return result; } diff --git a/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.h b/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.h index fdf407becdac..360e39b4f444 100644 --- a/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.h +++ b/chromium_src/third_party/blink/renderer/core/dom/events/event_listener_map.h @@ -14,7 +14,7 @@ static bool AddListenerToVector( \ EventListenerVector* vector, EventListener* listener, \ const AddEventListenerOptionsResolved* options, \ - RegisteredEventListener* registered_listener); \ + RegisteredEventListener** registered_listener); \ void CopyEventListenersNotCreatedFromMarkupToTarget #endif // BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH) diff --git a/chromium_src/third_party/blink/renderer/core/dom/events/event_target.cc b/chromium_src/third_party/blink/renderer/core/dom/events/event_target.cc index 4b019f14e5d4..f15257038ece 100644 --- a/chromium_src/third_party/blink/renderer/core/dom/events/event_target.cc +++ b/chromium_src/third_party/blink/renderer/core/dom/events/event_target.cc @@ -7,16 +7,16 @@ #include "brave/components/brave_page_graph/common/buildflags.h" #include "third_party/blink/renderer/core/probe/core_probes.h" -#define BRAVE_EVENT_TARGET_ADD_EVENT_LISTENER_INTERNAL \ - IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ - probe::RegisterPageGraphEventListenerAdd(this, event_type, \ - ®istered_listener); \ +#define BRAVE_EVENT_TARGET_ADD_EVENT_LISTENER_INTERNAL \ + IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ + probe::RegisterPageGraphEventListenerAdd(this, event_type, \ + registered_listener); \ }) -#define BRAVE_EVENT_TARGET_REMOVE_EVENT_LISTENER_INTERNAL \ - IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ - probe::RegisterPageGraphEventListenerRemove(this, event_type, \ - ®istered_listener); \ +#define BRAVE_EVENT_TARGET_REMOVE_EVENT_LISTENER_INTERNAL \ + IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ + probe::RegisterPageGraphEventListenerRemove(this, event_type, \ + registered_listener); \ }) #define SetAttributeEventListener SetAttributeEventListener_ChromiumImpl diff --git a/chromium_src/third_party/blink/renderer/core/frame/local_frame.cc b/chromium_src/third_party/blink/renderer/core/frame/local_frame.cc index 70ebb002c8c5..fc32e82cdeec 100644 --- a/chromium_src/third_party/blink/renderer/core/frame/local_frame.cc +++ b/chromium_src/third_party/blink/renderer/core/frame/local_frame.cc @@ -7,6 +7,7 @@ #include "brave/components/brave_page_graph/common/buildflags.h" #include "skia/ext/skia_utils_base.h" +#include "third_party/blink/renderer/core/core_probe_sink.h" #include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h" #include "third_party/blink/renderer/core/layout/layout_image.h" #include "third_party/blink/renderer/core/probe/core_probes.h" @@ -16,17 +17,18 @@ #include "brave/third_party/blink/renderer/core/brave_page_graph/page_graph.h" #endif // BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH) -#define FrameAttachedToParent(frame, ad_script_on_stack) \ - FrameAttachedToParent(frame, ad_script_on_stack); \ - IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ - if (IsLocalRoot()) { \ - /* InstallSupplements call is too late, do it here instead. */ \ - PageGraph::ProvideTo(*this); \ - } \ +#define AddInspectorTraceEvents(...) \ + AddInspectorTraceEvents(__VA_ARGS__); \ + IF_BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH, { \ + DCHECK(IsLocalRoot()); \ + /* InstallSupplements call is too late, do it here instead. */ \ + PageGraph::ProvideTo(*this); \ }) #include "src/third_party/blink/renderer/core/frame/local_frame.cc" +#undef AddInspectorTraceEvents + namespace blink { namespace { @@ -107,5 +109,3 @@ SkBitmap LocalFrame::GetImageAtViewportPoint(const gfx::Point& viewport_point) { } } // namespace blink - -#undef FrameAttachedToParent diff --git a/chromium_src/third_party/blink/renderer/modules/battery/battery_manager.cc b/chromium_src/third_party/blink/renderer/modules/battery/battery_manager.cc index 1ad13fa863e8..aaec768fe6f6 100644 --- a/chromium_src/third_party/blink/renderer/modules/battery/battery_manager.cc +++ b/chromium_src/third_party/blink/renderer/modules/battery/battery_manager.cc @@ -103,7 +103,7 @@ void BatteryManager::Trace(blink::Visitor* visitor) const { visitor->Trace(battery_dispatcher_); Supplement::Trace(visitor); PlatformEventController::Trace(visitor); - EventTargetWithInlineData::Trace(visitor); + EventTarget::Trace(visitor); ExecutionContextLifecycleStateObserver::Trace(visitor); } diff --git a/chromium_src/tools/clang/pylib/clang/compile_db.py b/chromium_src/tools/clang/pylib/clang/compile_db.py index c7a437d7c10b..48f799aacb3a 100644 --- a/chromium_src/tools/clang/pylib/clang/compile_db.py +++ b/chromium_src/tools/clang/pylib/clang/compile_db.py @@ -11,9 +11,10 @@ GOMACC_PATTERN_TO_REPLACE = (r'gomacc(\.exe)', r'(gomacc|redirect_cc)(\.exe)') # pylint: disable=used-before-assignment -assert GOMACC_PATTERN_TO_REPLACE[0] in _GOMA_CMD_LINE_RE.pattern -_GOMA_CMD_LINE_RE = re.compile( - _GOMA_CMD_LINE_RE.pattern.replace(*GOMACC_PATTERN_TO_REPLACE)) +assert GOMACC_PATTERN_TO_REPLACE[0] in _CLANG_WRAPPER_CMD_LINE_RE.pattern +_CLANG_WRAPPER_CMD_LINE_RE = re.compile( + _CLANG_WRAPPER_CMD_LINE_RE.pattern.replace(*GOMACC_PATTERN_TO_REPLACE), + re.VERBOSE) @override_utils.override_function(globals()) diff --git a/chromium_src/ui/base/webui/web_ui_util.cc b/chromium_src/ui/base/webui/web_ui_util.cc deleted file mode 100644 index 0e187883b634..000000000000 --- a/chromium_src/ui/base/webui/web_ui_util.cc +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#include "ui/base/webui/web_ui_util.h" - -#include "build/build_config.h" -#include "ui/resources/grit/webui_resources.h" - -#if !BUILDFLAG(IS_IOS) -// Replace text_defaults_md.css with brave's text_defaults_md.css -// which is defined in brave_webui_resources.grd. -#undef IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS -#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS \ - IDR_BRAVE_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS -#endif - -#include "src/ui/base/webui/web_ui_util.cc" - -#if !BUILDFLAG(IS_IOS) -#undef IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS -#endif diff --git a/chromium_src/ui/color/core_default_color_mixer.cc b/chromium_src/ui/color/core_default_color_mixer.cc index 37996f5bcc26..54106ba7ef1b 100644 --- a/chromium_src/ui/color/core_default_color_mixer.cc +++ b/chromium_src/ui/color/core_default_color_mixer.cc @@ -10,11 +10,10 @@ namespace ui { void AddBraveCoreDefaultColorMixer(ColorProvider* provider, - const ColorProviderManager::Key& key) { + const ColorProviderKey& key) { ColorMixer& mixer = provider->AddMixer(); - const bool dark_mode = - key.color_mode == ColorProviderManager::ColorMode::kDark; + const bool dark_mode = key.color_mode == ColorProviderKey::ColorMode::kDark; mixer[kColorAlertMediumSeverityIcon] = { dark_mode ? SkColorSetRGB(0xBB, 0x88, 0x00) @@ -22,7 +21,7 @@ void AddBraveCoreDefaultColorMixer(ColorProvider* provider, } void AddCoreDefaultColorMixer(ColorProvider* provider, - const ColorProviderManager::Key& key) { + const ColorProviderKey& key) { AddCoreDefaultColorMixer_Chromium(provider, key); AddBraveCoreDefaultColorMixer(provider, key); } diff --git a/chromium_src/ui/color/mac/native_color_mixers_mac.mm b/chromium_src/ui/color/mac/native_color_mixers_mac.mm index 545c1dc6fb0b..567069a13079 100644 --- a/chromium_src/ui/color/mac/native_color_mixers_mac.mm +++ b/chromium_src/ui/color/mac/native_color_mixers_mac.mm @@ -10,14 +10,14 @@ namespace ui { void AddNativeUiColorMixer(ColorProvider* provider, - const ColorProviderManager::Key& key) { + const ColorProviderKey& key) { if (@available(macOS 10.14, *)) { AddNativeUiColorMixer_Chromium(provider, key); return; } const bool high_contrast = - key.contrast_mode == ColorProviderManager::ContrastMode::kHigh; + key.contrast_mode == ColorProviderKey::ContrastMode::kHigh; if (high_contrast) { AddNativeUiColorMixer_Chromium(provider, key); return; diff --git a/chromium_src/ui/color/ui_color_mixer.cc b/chromium_src/ui/color/ui_color_mixer.cc index 4345edc55ad6..e01adbd4e7f2 100644 --- a/chromium_src/ui/color/ui_color_mixer.cc +++ b/chromium_src/ui/color/ui_color_mixer.cc @@ -10,11 +10,10 @@ namespace ui { void AddBraveUiColorMixer(ColorProvider* provider, - const ColorProviderManager::Key& key) { + const ColorProviderKey& key) { ColorMixer& mixer = provider->AddMixer(); - const bool dark_mode = - key.color_mode == ColorProviderManager::ColorMode::kDark; + const bool dark_mode = key.color_mode == ColorProviderKey::ColorMode::kDark; // -------------------------------------------------------------------------- // Border colors @@ -78,8 +77,7 @@ void AddBraveUiColorMixer(ColorProvider* provider, : gfx::kGoogleBlue200}; } -void AddUiColorMixer(ColorProvider* provider, - const ColorProviderManager::Key& key) { +void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { AddUiColorMixer_Chromium(provider, key); AddBraveUiColorMixer(provider, key); } diff --git a/chromium_src/v8/src/builtins/builtins-utils.h b/chromium_src/v8/src/builtins/builtins-utils.h index e7af3ff31106..5c9728532ab8 100644 --- a/chromium_src/v8/src/builtins/builtins-utils.h +++ b/chromium_src/v8/src/builtins/builtins-utils.h @@ -1,6 +1,7 @@ -// Copyright 2016 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +/* Copyright (c) 2016 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef BRAVE_CHROMIUM_SRC_V8_SRC_BUILTINS_BUILTINS_UTILS_H_ #define BRAVE_CHROMIUM_SRC_V8_SRC_BUILTINS_BUILTINS_UTILS_H_ @@ -32,23 +33,23 @@ constexpr bool IsBuiltinTrackedInPageGraph(const char* name) { static_assert(false, "BUILTIN macro is expected to be defined"); #endif #undef BUILTIN -#define BUILTIN(name) \ - V8_WARN_UNUSED_RESULT static Object Builtin_Impl_##name( \ - BuiltinArguments args, Isolate* isolate); \ - \ - V8_WARN_UNUSED_RESULT Address Builtin_##name( \ - int args_length, Address* args_object, Isolate* isolate) { \ - DCHECK(isolate->context().is_null() || isolate->context().IsContext()); \ - BuiltinArguments args(args_length, args_object); \ - Object result = Builtin_Impl_##name(args, isolate); \ - if (V8_UNLIKELY(IsBuiltinTrackedInPageGraph(#name)) && \ - V8_UNLIKELY(isolate->page_graph_delegate())) { \ - ReportBuiltinCallAndResponse(isolate, #name, args, result); \ - } \ - return BUILTIN_CONVERT_RESULT(result); \ - } \ - \ - V8_WARN_UNUSED_RESULT static Object Builtin_Impl_##name( \ +#define BUILTIN(name) \ + V8_WARN_UNUSED_RESULT static Object Builtin_Impl_##name( \ + BuiltinArguments args, Isolate* isolate); \ + \ + V8_WARN_UNUSED_RESULT Address Builtin_##name( \ + int args_length, Address* args_object, Isolate* isolate) { \ + DCHECK(isolate->context().is_null() || IsContext(isolate->context())); \ + BuiltinArguments args(args_length, args_object); \ + Object result = Builtin_Impl_##name(args, isolate); \ + if (V8_UNLIKELY(IsBuiltinTrackedInPageGraph(#name)) && \ + V8_UNLIKELY(isolate->page_graph_delegate())) { \ + ReportBuiltinCallAndResponse(isolate, #name, args, result); \ + } \ + return BUILTIN_CONVERT_RESULT(result); \ + } \ + \ + V8_WARN_UNUSED_RESULT static Object Builtin_Impl_##name( \ BuiltinArguments args, Isolate* isolate) #endif // BUILDFLAG(ENABLE_BRAVE_PAGE_GRAPH_WEBAPI_PROBES) diff --git a/chromium_src/v8/src/builtins/builtins.cc b/chromium_src/v8/src/builtins/builtins.cc index 6fd28d7da7f1..628f4dabacbb 100644 --- a/chromium_src/v8/src/builtins/builtins.cc +++ b/chromium_src/v8/src/builtins/builtins.cc @@ -16,7 +16,7 @@ namespace internal { static std::string ToPageGraphArg(Isolate* isolate, Handle object) { #ifdef OBJECT_PRINT // Enabled with v8_enable_object_print=true gn arg. std::ostringstream stream; - object->Print(stream); + Print(*object, stream); return stream.str(); #else // OBJECT_PRINT return Object::NoSideEffectsToString(isolate, object)->ToCString().get(); diff --git a/chromium_src/v8/src/codegen/compiler.cc b/chromium_src/v8/src/codegen/compiler.cc index 8b0728a44ce2..e25b9f8f1267 100644 --- a/chromium_src/v8/src/codegen/compiler.cc +++ b/chromium_src/v8/src/codegen/compiler.cc @@ -10,7 +10,7 @@ auto* page_graph_delegate = isolate->page_graph_delegate(); \ if (V8_UNLIKELY(page_graph_delegate)) { \ Object maybe_script = result->shared().script(); \ - if (maybe_script.IsScript()) { \ + if (IsScript(maybe_script)) { \ const int script_id = Script::cast(maybe_script).id(); \ page_graph_delegate->OnEvalScriptCompiled( \ reinterpret_cast(isolate), script_id, \ diff --git a/chromium_src/v8/src/execution/isolate.cc b/chromium_src/v8/src/execution/isolate.cc index ceb4c00879ca..c25d1450c733 100644 --- a/chromium_src/v8/src/execution/isolate.cc +++ b/chromium_src/v8/src/execution/isolate.cc @@ -21,7 +21,7 @@ GetExecutingScriptsImpl(Isolate* isolate, bool all, bool include_position) { frame->GetFunctions(&functions); for (const auto& shared : functions) { Object maybe_script = shared.script(); - if (!maybe_script.IsScript()) { + if (!IsScript(maybe_script)) { continue; } diff --git a/components/autofill_payments_strings.grdp b/components/autofill_payments_strings.grdp index 705c608a2813..fc61fab0778c 100644 --- a/components/autofill_payments_strings.grdp +++ b/components/autofill_payments_strings.grdp @@ -116,6 +116,12 @@ Save card? + + Save security code? + + + For faster checkout, save the CVC for this card to your device + Save card @@ -149,6 +155,9 @@ Card saved + + CVC saved + Done @@ -337,7 +346,10 @@ Enter your security code for $1Visa - 5679 - + + Verifying... + + Verify it's you @@ -727,11 +739,20 @@ Virtual card turned on + + Use CVC for this virtual card + + + Fill in CVC for this virtual card + + + CVC for virtual card + Choose how you'll verify it's you - + Your bank wants to make sure it's you @@ -758,7 +779,7 @@ This is the $13-digit code on the $2back of your card - + Enter code @@ -846,14 +867,11 @@ - - Enter Verification Code - - Can't find your code? <link>Get new code</link> + Didn\u2019t receive your code? <link>Get new code</link> - Enter %1$s6-digit code + Enter %1$s6-digit verification code Confirm @@ -900,7 +918,7 @@ Always verify when using autofill - + When turned off, you may be asked occasionally to verify for security purposes @@ -912,4 +930,23 @@ + + + + Save security codes + + + Checkout faster when your CVCs are saved + + + + Checkout faster when your CVCs are saved. <a href="#">Delete saved security codes</a> + + + Delete saved security codes? + + + All security codes saved on your device and in Brave sync chain will be deleted + + diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp index 5507b405ac0a..d555748aca46 100644 --- a/components/autofill_strings.grdp +++ b/components/autofill_strings.grdp @@ -13,6 +13,17 @@ + + + Undo autofill + + + + + Undo Autofill + + + Clear copy @@ -99,11 +110,37 @@ The form was filled in + + + The delete address option was selected + The autofilled info was cleared from the form + + + The fill address fields option was selected + + + + Fill address + + + + The fill full name option was selected + + + + Fill full name + + + + + The fill everything option was selected + + Hide suggestions @@ -112,6 +149,14 @@ Manage... + + Delete address + + + + Fill everything + + Manage addresses... @@ -315,16 +360,34 @@ + + + + Default + + + + Use other providers + + + + Use Brave Password Manager and Brave Autofill to save and fill passwords, passkeys, payment methods, and addresses + + + + Use password managers and autofill services that are turned on in Android Settings + + - + Payment methods, offers, and addresses using Google Pay - + Payment Methods, Offers, and Addresses Using Google Pay diff --git a/components/brave_federated/brave_federated_service.cc b/components/brave_federated/brave_federated_service.cc index dc71d022927d..5a38a516dc38 100644 --- a/components/brave_federated/brave_federated_service.cc +++ b/components/brave_federated/brave_federated_service.cc @@ -30,9 +30,8 @@ BraveFederatedService::BraveFederatedService( scoped_refptr url_loader_factory) : prefs_(prefs), local_state_(local_state), - browser_context_path_(browser_context_path), url_loader_factory_(url_loader_factory) { - Init(); + Init(browser_context_path); } BraveFederatedService::~BraveFederatedService() = default; @@ -48,7 +47,7 @@ DataStoreService* BraveFederatedService::GetDataStoreService() const { /////////////////////////////////////////////////////////////////////////////// -void BraveFederatedService::Init() { +void BraveFederatedService::Init(const base::FilePath& browser_context_path) { VLOG(1) << "Initialising federated service"; local_state_change_registrar_.Init(local_state_); @@ -57,8 +56,7 @@ void BraveFederatedService::Init() { base::BindRepeating(&BraveFederatedService::OnPreferenceChanged, base::Unretained(this))); - base::FilePath db_path( - browser_context_path_.AppendASCII("data_store.sqlite")); + base::FilePath db_path(browser_context_path.AppendASCII("data_store.sqlite")); data_store_service_ = std::make_unique(db_path); data_store_service_->Init(); diff --git a/components/brave_federated/brave_federated_service.h b/components/brave_federated/brave_federated_service.h index 7ef8e476fc54..9e5a2ac210a2 100644 --- a/components/brave_federated/brave_federated_service.h +++ b/components/brave_federated/brave_federated_service.h @@ -10,6 +10,7 @@ #include #include "base/files/file_path.h" +#include "base/memory/raw_ref.h" #include "components/keyed_service/core/keyed_service.h" #include "components/prefs/pref_change_registrar.h" @@ -49,7 +50,7 @@ class BraveFederatedService : public KeyedService { DataStoreService* GetDataStoreService() const; private: - void Init(); + void Init(const base::FilePath& browser_context_path); void OnPreferenceChanged(const std::string& key); @@ -65,7 +66,6 @@ class BraveFederatedService : public KeyedService { raw_ptr prefs_ = nullptr; raw_ptr local_state_ = nullptr; PrefChangeRegistrar local_state_change_registrar_; - const base::FilePath& browser_context_path_; scoped_refptr url_loader_factory_; std::unique_ptr operational_patterns_; diff --git a/components/brave_rewards/core/database/database_activity_info.cc b/components/brave_rewards/core/database/database_activity_info.cc index c4c89858cb90..2355147f973e 100644 --- a/components/brave_rewards/core/database/database_activity_info.cc +++ b/components/brave_rewards/core/database/database_activity_info.cc @@ -8,6 +8,7 @@ #include #include "base/strings/stringprintf.h" +#include "base/types/cxx23_to_underlying.h" #include "brave/components/brave_rewards/core/database/database_activity_info.h" #include "brave/components/brave_rewards/core/database/database_util.h" #include "brave/components/brave_rewards/core/rewards_engine_impl.h" @@ -59,9 +60,9 @@ std::string GenerateActivityFilterQuery(const int start, } if (!filter->non_verified) { - const std::string status = - base::StringPrintf(" AND spi.status != %1d AND spi.address != ''", - mojom::PublisherStatus::NOT_VERIFIED); + const std::string status = base::StringPrintf( + " AND spi.status != %1d AND spi.address != ''", + base::to_underlying(mojom::PublisherStatus::NOT_VERIFIED)); query += status; } diff --git a/components/brave_rewards/core/database/database_balance_report.cc b/components/brave_rewards/core/database/database_balance_report.cc index 06e6f0ef3c6f..f3eb722d76b9 100644 --- a/components/brave_rewards/core/database/database_balance_report.cc +++ b/components/brave_rewards/core/database/database_balance_report.cc @@ -7,6 +7,7 @@ #include #include "base/strings/stringprintf.h" +#include "base/types/cxx23_to_underlying.h" #include "brave/components/brave_rewards/core/database/database_balance_report.h" #include "brave/components/brave_rewards/core/database/database_util.h" #include "brave/components/brave_rewards/core/global_constants.h" @@ -21,7 +22,7 @@ namespace { const char kTableName[] = "balance_report_info"; std::string GetBalanceReportId(mojom::ActivityMonth month, int year) { - return base::StringPrintf("%u_%u", year, month); + return base::StringPrintf("%u_%u", year, base::to_underlying(month)); } std::string GetTypeColumn(mojom::ReportType type) { diff --git a/components/brave_rewards/core/database/database_contribution_info.cc b/components/brave_rewards/core/database/database_contribution_info.cc index 2571a4720c4d..f2b2aa4ec3b8 100644 --- a/components/brave_rewards/core/database/database_contribution_info.cc +++ b/components/brave_rewards/core/database/database_contribution_info.cc @@ -8,6 +8,7 @@ #include #include "base/strings/stringprintf.h" +#include "base/types/cxx23_to_underlying.h" #include "brave/components/brave_rewards/core/common/time_util.h" #include "brave/components/brave_rewards/core/database/database_contribution_info.h" #include "brave/components/brave_rewards/core/database/database_util.h" @@ -236,7 +237,8 @@ void DatabaseContributionInfo::GetOneTimeTips(const mojom::ActivityMonth month, command->type = mojom::DBCommand::Type::READ; command->command = query; - const std::string formatted_month = base::StringPrintf("%02d", month); + const std::string formatted_month = + base::StringPrintf("%02d", base::to_underlying(month)); BindString(command.get(), 0, formatted_month); BindString(command.get(), 1, std::to_string(year)); @@ -317,7 +319,8 @@ void DatabaseContributionInfo::GetContributionReport( command->type = mojom::DBCommand::Type::READ; command->command = query; - const std::string formatted_month = base::StringPrintf("%02d", month); + const std::string formatted_month = + base::StringPrintf("%02d", base::to_underlying(month)); BindString(command.get(), 0, formatted_month); BindString(command.get(), 1, std::to_string(year)); diff --git a/components/brave_shields/browser/ad_block_regional_service_manager.cc b/components/brave_shields/browser/ad_block_regional_service_manager.cc index 93be9dcd8c23..4c807d93a006 100644 --- a/components/brave_shields/browser/ad_block_regional_service_manager.cc +++ b/components/brave_shields/browser/ad_block_regional_service_manager.cc @@ -10,6 +10,7 @@ #include #include "base/feature_list.h" +#include "base/memory/raw_ref.h" #include "base/metrics/histogram_macros.h" #include "base/values.h" #include "brave/components/brave_shields/browser/ad_block_component_filters_provider.h" @@ -29,18 +30,19 @@ namespace brave_shields { namespace { typedef struct ListDefaultOverrideConstants { - const base::Feature& feature; + const raw_ref feature; const char* local_override_pref; const char* list_uuid; } ListDefaultOverrideConstants; const ListDefaultOverrideConstants kCookieListConstants{ - .feature = kBraveAdblockCookieListDefault, + .feature = raw_ref(kBraveAdblockCookieListDefault), .local_override_pref = prefs::kAdBlockCookieListSettingTouched, .list_uuid = kCookieListUuid}; const ListDefaultOverrideConstants kMobileNotificationsListConstants{ - .feature = kBraveAdblockMobileNotificationsListDefault, + .feature = raw_ref( + kBraveAdblockMobileNotificationsListDefault), .local_override_pref = prefs::kAdBlockMobileNotificationsListSettingTouched, .list_uuid = kMobileNotificationsListUuid}; @@ -132,7 +134,7 @@ void AdBlockRegionalServiceManager::StartRegionalServices() { const bool list_touched = local_state_->GetBoolean(constants.local_override_pref); - if (base::FeatureList::IsEnabled(constants.feature) && !list_touched) { + if (base::FeatureList::IsEnabled(*constants.feature) && !list_touched) { base::Value::Dict list_entry; list_entry.Set("enabled", true); regional_filters_dict_with_overrides.Set(constants.list_uuid, @@ -210,7 +212,7 @@ bool AdBlockRegionalServiceManager::IsFilterListEnabled( for (const auto& constants : kOverrideConstants) { if (uuid == constants.list_uuid && - base::FeatureList::IsEnabled(constants.feature) && + base::FeatureList::IsEnabled(*constants.feature) && !local_state_->GetBoolean(constants.local_override_pref)) { return true; } diff --git a/components/brave_shields/browser/adblock_stub_response_unittest.cc b/components/brave_shields/browser/adblock_stub_response_unittest.cc index 69f32518d513..b345ec9807f8 100644 --- a/components/brave_shields/browser/adblock_stub_response_unittest.cc +++ b/components/brave_shields/browser/adblock_stub_response_unittest.cc @@ -13,7 +13,13 @@ TEST(AdBlockStubResponse, ScriptDataURL) { "data:application/script,"; std::string data; auto resource_response = network::mojom::URLResponseHead::New(); - brave_shields::MakeStubResponse(data_url, {}, &resource_response, &data); +#if BUILDFLAG(IS_ANDROID) + const base::Location& location = FROM_HERE; + network::ResourceRequest request(location); +#else + network::ResourceRequest request; +#endif + brave_shields::MakeStubResponse(data_url, request, &resource_response, &data); ASSERT_EQ(data, ""); ASSERT_EQ(resource_response->mime_type, "application/script"); } @@ -22,7 +28,13 @@ TEST(AdBlockStubResponse, HTMLDataURL) { std::string data_url = "data:text/html,π"; std::string data; auto resource_response = network::mojom::URLResponseHead::New(); - brave_shields::MakeStubResponse(data_url, {}, &resource_response, &data); +#if BUILDFLAG(IS_ANDROID) + const base::Location& location = FROM_HERE; + network::ResourceRequest request(location); +#else + network::ResourceRequest request; +#endif + brave_shields::MakeStubResponse(data_url, request, &resource_response, &data); ASSERT_EQ(data, "π"); ASSERT_EQ(resource_response->mime_type, "text/html"); } diff --git a/components/brave_shields/browser/brave_shields_util.cc b/components/brave_shields/browser/brave_shields_util.cc index f9e6a669fe83..9c1be51452b2 100644 --- a/components/brave_shields/browser/brave_shields_util.cc +++ b/components/brave_shields/browser/brave_shields_util.cc @@ -552,9 +552,8 @@ void SetFingerprintingControlType(HostContentSettingsMap* map, ControlType GetFingerprintingControlType(HostContentSettingsMap* map, const GURL& url) { - ContentSettingsForOneType fingerprinting_rules; - map->GetSettingsForOneType(ContentSettingsType::BRAVE_FINGERPRINTING_V2, - &fingerprinting_rules); + ContentSettingsForOneType fingerprinting_rules = + map->GetSettingsForOneType(ContentSettingsType::BRAVE_FINGERPRINTING_V2); ContentSetting fp_setting = GetBraveFPContentSettingFromRules(fingerprinting_rules, url); @@ -814,16 +813,14 @@ bool MaybeChangeReferrer(bool allow_referrers, } ShieldsSettingCounts GetFPSettingCount(HostContentSettingsMap* map) { - ContentSettingsForOneType fp_rules; - map->GetSettingsForOneType(ContentSettingsType::BRAVE_FINGERPRINTING_V2, - &fp_rules); + ContentSettingsForOneType fp_rules = + map->GetSettingsForOneType(ContentSettingsType::BRAVE_FINGERPRINTING_V2); return GetFPSettingCountFromRules(fp_rules); } ShieldsSettingCounts GetAdsSettingCount(HostContentSettingsMap* map) { - ContentSettingsForOneType cosmetic_rules; - map->GetSettingsForOneType(ContentSettingsType::BRAVE_COSMETIC_FILTERING, - &cosmetic_rules); + ContentSettingsForOneType cosmetic_rules = + map->GetSettingsForOneType(ContentSettingsType::BRAVE_COSMETIC_FILTERING); return GetAdsSettingCountFromRules(cosmetic_rules); } diff --git a/components/brave_vpn/browser/connection/ikev2/mac/BUILD.gn b/components/brave_vpn/browser/connection/ikev2/mac/BUILD.gn index 16f3053e7006..a406920af42e 100644 --- a/components/brave_vpn/browser/connection/ikev2/mac/BUILD.gn +++ b/components/brave_vpn/browser/connection/ikev2/mac/BUILD.gn @@ -29,5 +29,4 @@ source_set("mac") { "NetworkExtension.framework", "Foundation.framework", ] - configs += [ "//build/config/compiler:enable_arc" ] } diff --git a/components/brave_wallet/browser/eth_data_builder_unittest.cc b/components/brave_wallet/browser/eth_data_builder_unittest.cc index a8acae626b63..10fbb3a3664f 100644 --- a/components/brave_wallet/browser/eth_data_builder_unittest.cc +++ b/components/brave_wallet/browser/eth_data_builder_unittest.cc @@ -40,7 +40,7 @@ TEST(EthCallDataBuilderTest, Transfer) { "0f0000000000000000000000000000000000000000000000000de0b6b3a7640000"); } -TEST(EthCallDataBuilderTest, BalanceOf) { +TEST(EthCallDataBuilderTest, BalanceOf_erc20) { std::string data; BalanceOf("0x4e02f254184E904300e0775E4b8eeCB1", &data); ASSERT_EQ(data, @@ -139,7 +139,7 @@ TEST(EthCallDataBuilderTest, SafeTransferFrom) { "0000000000000000000000000000000000000000000000000000000000000000"); } -TEST(EthCallDataBuilderTest, BalanceOf) { +TEST(EthCallDataBuilderTest, BalanceOf_erc1155) { std::string data; uint256_t token_id; ASSERT_TRUE(HexValueToUint256("0x1", &token_id)); diff --git a/components/brave_wallet/browser/test_utils.cc b/components/brave_wallet/browser/test_utils.cc index 90d38bc03604..92ae7bb70cfb 100644 --- a/components/brave_wallet/browser/test_utils.cc +++ b/components/brave_wallet/browser/test_utils.cc @@ -6,6 +6,7 @@ #include "brave/components/brave_wallet/browser/test_utils.h" #include "base/files/scoped_temp_dir.h" +#include "base/memory/raw_ref.h" #include "base/run_loop.h" #include "base/scoped_observation.h" #include "base/task/sequenced_task_runner.h" @@ -24,12 +25,12 @@ void WaitForTxStorageDelegateInitialized(TxStorageDelegate* delegate) { observation_.Observe(delegate); } - void OnStorageInitialized() override { run_loop_.Quit(); } + void OnStorageInitialized() override { run_loop_->Quit(); } private: base::ScopedObservation observation_{this}; - base::RunLoop& run_loop_; + raw_ref run_loop_; } observer(delegate, run_loop); run_loop.Run(); } diff --git a/components/commerce_strings.grdp b/components/commerce_strings.grdp index 300e488d25c9..8f3376224862 100644 --- a/components/commerce_strings.grdp +++ b/components/commerce_strings.grdp @@ -76,6 +76,23 @@ Cancel + + + Get emails sent to $1example@example.com when the price drops on any site. + + + Want emails when the price drops? + + + Learn more about price tracking + + + No thanks + + + Yes, I'm in + + Tracking price @@ -108,9 +125,10 @@ Get email alerts if the price drops on any site - Track prices across multiple sites + View price drops in the side panel + Tracked products @@ -297,6 +315,33 @@ Something went wrong. Your change wasn't saved + + + + Use this code at checkout. + + + Valid until $12023-01-01. + + + Copy + + + + Terms and Conditions + + + Discount Found + + + + + Terms and conditions + + + Discount found + + @@ -353,4 +398,7 @@ Untrack price + + Shopping collection + diff --git a/components/components_strings.grd b/components/components_strings.grd index 143b17996dd0..fdd890c559f2 100644 --- a/components/components_strings.grd +++ b/components/components_strings.grd @@ -444,14 +444,26 @@ + + Recent tabs + Recently closed + + Your devices + + + Recent Tabs + Recently Closed + + Your Devices + Choose @@ -525,9 +537,6 @@ CSV Password Parser Service - - Password Strength Calculator - Unzip Service diff --git a/browser/content_settings/brave_global_value_map.cc b/components/content_settings/core/browser/brave_global_value_map.cc similarity index 89% rename from browser/content_settings/brave_global_value_map.cc rename to components/content_settings/core/browser/brave_global_value_map.cc index a02257a1200b..256428e8f7e2 100644 --- a/browser/content_settings/brave_global_value_map.cc +++ b/components/content_settings/core/browser/brave_global_value_map.cc @@ -1,9 +1,9 @@ /* Copyright (c) 2020 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "brave/browser/content_settings/brave_global_value_map.h" +#include "brave/components/content_settings/core/browser/brave_global_value_map.h" #include @@ -19,8 +19,9 @@ BraveGlobalValueMap::~BraveGlobalValueMap() = default; std::unique_ptr BraveGlobalValueMap::GetRuleIterator( ContentSettingsType content_type) const { - if (content_settings::IsShieldsContentSettingsType(content_type)) + if (content_settings::IsShieldsContentSettingsType(content_type)) { return nullptr; + } return GlobalValueMap::GetRuleIterator(content_type); } diff --git a/browser/content_settings/brave_global_value_map.h b/components/content_settings/core/browser/brave_global_value_map.h similarity index 79% rename from browser/content_settings/brave_global_value_map.h rename to components/content_settings/core/browser/brave_global_value_map.h index 0b0367d41d85..ca775ea96513 100644 --- a/browser/content_settings/brave_global_value_map.h +++ b/components/content_settings/core/browser/brave_global_value_map.h @@ -1,10 +1,10 @@ /* Copyright (c) 2020 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ + * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#ifndef BRAVE_BROWSER_CONTENT_SETTINGS_BRAVE_GLOBAL_VALUE_MAP_H_ -#define BRAVE_BROWSER_CONTENT_SETTINGS_BRAVE_GLOBAL_VALUE_MAP_H_ +#ifndef BRAVE_COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_BRAVE_GLOBAL_VALUE_MAP_H_ +#define BRAVE_COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_BRAVE_GLOBAL_VALUE_MAP_H_ #include @@ -33,4 +33,4 @@ class BraveGlobalValueMap : public GlobalValueMap { } // namespace content_settings -#endif // BRAVE_BROWSER_CONTENT_SETTINGS_BRAVE_GLOBAL_VALUE_MAP_H_ +#endif // BRAVE_COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_BRAVE_GLOBAL_VALUE_MAP_H_ diff --git a/components/content_settings/core/browser/sources.gni b/components/content_settings/core/browser/sources.gni index 63f1aceee957..a2a8fd296cee 100644 --- a/components/content_settings/core/browser/sources.gni +++ b/components/content_settings/core/browser/sources.gni @@ -12,6 +12,8 @@ if (!is_ios) { "//brave/components/content_settings/core/browser/brave_content_settings_pref_provider.h", "//brave/components/content_settings/core/browser/brave_content_settings_utils.cc", "//brave/components/content_settings/core/browser/brave_content_settings_utils.h", + "//brave/components/content_settings/core/browser/brave_global_value_map.cc", + "//brave/components/content_settings/core/browser/brave_global_value_map.h", ] brave_components_content_settings_core_browser_deps += [ diff --git a/components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc b/components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc index 5efaedfc2561..2c4264eb1f99 100644 --- a/components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc +++ b/components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc @@ -221,9 +221,9 @@ class BraveContentSettingsAgentImplBrowserTest : public InProcessBrowserTest { content_settings()->SetContentSettingCustomScope( top_level_page_pattern(), ContentSettingsPattern::Wildcard(), ContentSettingsType::BRAVE_REFERRERS, CONTENT_SETTING_BLOCK); - ContentSettingsForOneType settings; - content_settings()->GetSettingsForOneType( - ContentSettingsType::BRAVE_REFERRERS, &settings); + ContentSettingsForOneType settings = + content_settings()->GetSettingsForOneType( + ContentSettingsType::BRAVE_REFERRERS); // default plus new setting EXPECT_EQ(settings.size(), 2u); } @@ -232,9 +232,9 @@ class BraveContentSettingsAgentImplBrowserTest : public InProcessBrowserTest { content_settings()->SetContentSettingCustomScope( top_level_page_pattern(), ContentSettingsPattern::Wildcard(), ContentSettingsType::BRAVE_REFERRERS, CONTENT_SETTING_ALLOW); - ContentSettingsForOneType settings; - content_settings()->GetSettingsForOneType( - ContentSettingsType::BRAVE_REFERRERS, &settings); + ContentSettingsForOneType settings = + content_settings()->GetSettingsForOneType( + ContentSettingsType::BRAVE_REFERRERS); // default plus new setting EXPECT_EQ(settings.size(), 2u); } @@ -562,9 +562,9 @@ IN_PROC_BROWSER_TEST_F(BraveContentSettingsAgentImplV2BrowserTest, // TODO(iefremov): We should reduce the copy-paste amount in these tests. IN_PROC_BROWSER_TEST_F(BraveContentSettingsAgentImplBrowserTest, BlockReferrerByDefault) { - ContentSettingsForOneType settings; - content_settings()->GetSettingsForOneType( - ContentSettingsType::BRAVE_REFERRERS, &settings); + ContentSettingsForOneType settings = + content_settings()->GetSettingsForOneType( + ContentSettingsType::BRAVE_REFERRERS); // default setting EXPECT_EQ(settings.size(), 1u) << "There should not be any visible referrer rules."; @@ -622,9 +622,9 @@ IN_PROC_BROWSER_TEST_F(BraveContentSettingsAgentImplBrowserTest, IN_PROC_BROWSER_TEST_F(BraveContentSettingsAgentImplBrowserTest, BlockReferrerByDefaultRedirects) { - ContentSettingsForOneType settings; - content_settings()->GetSettingsForOneType( - ContentSettingsType::BRAVE_REFERRERS, &settings); + ContentSettingsForOneType settings = + content_settings()->GetSettingsForOneType( + ContentSettingsType::BRAVE_REFERRERS); // default setting EXPECT_EQ(settings.size(), 1u) << "There should not be any visible referrer rules."; diff --git a/components/de_amp/browser/test/de_amp_browsertest.cc b/components/de_amp/browser/test/de_amp_browsertest.cc index 96d9376a4b09..a67e267e2a31 100644 --- a/components/de_amp/browser/test/de_amp_browsertest.cc +++ b/components/de_amp/browser/test/de_amp_browsertest.cc @@ -23,6 +23,7 @@ #include "components/keep_alive_registry/keep_alive_types.h" #include "components/keep_alive_registry/scoped_keep_alive.h" #include "components/prefs/pref_service.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/reload_type.h" #include "content/public/test/browser_test.h" #include "content/public/test/content_mock_cert_verifier.h" diff --git a/components/embedder_support/user_agent_utils_unittest.cc b/components/embedder_support/user_agent_utils_unittest.cc index 767b3ae3de9a..3945235eb329 100644 --- a/components/embedder_support/user_agent_utils_unittest.cc +++ b/components/embedder_support/user_agent_utils_unittest.cc @@ -92,6 +92,8 @@ TEST(UserAgentUtilsTest, UserAgentFromCommandLine) { feature_list.InitWithFeatures( {blink::features::kAllowCertainClientHints}, {blink::features::kClampPlatformVersionClientHint}); + ASSERT_TRUE( + base::FeatureList::IsEnabled(blink::features::kUACHOverrideBlank)); const auto brave_metadata = GetUserAgentMetadata(nullptr); const blink::UserAgentMetadata empty_metadata; diff --git a/components/ephemeral_storage/ephemeral_storage_service.cc b/components/ephemeral_storage/ephemeral_storage_service.cc index 1af875d024f2..61d765f4a79b 100644 --- a/components/ephemeral_storage/ephemeral_storage_service.cc +++ b/components/ephemeral_storage/ephemeral_storage_service.cc @@ -132,9 +132,9 @@ void EphemeralStorageService::OnCanEnable1PESForUrl( } bool EphemeralStorageService::IsDefaultCookieSetting(const GURL& url) const { - ContentSettingsForOneType settings; - host_content_settings_map_->GetSettingsForOneType( - ContentSettingsType::COOKIES, &settings); + ContentSettingsForOneType settings = + host_content_settings_map_->GetSettingsForOneType( + ContentSettingsType::COOKIES); for (const auto& setting : settings) { if (setting.primary_pattern.Matches(url) && diff --git a/components/management_strings.grdp b/components/management_strings.grdp index 80a5946f23f0..05664423bca1 100644 --- a/components/management_strings.grdp +++ b/components/management_strings.grdp @@ -36,7 +36,7 @@ - Your browser is managed + Your browser is managed by your organization Your browser is managed by $1example.com @@ -47,8 +47,11 @@ Your browser is managed by $1foo.com and your profile is managed by $2bar.com + + Your browser is managed by your organization and your profile is managed by $1bar.com + - Your profile and browser are managed by $1google.com + Your browser and profile are managed by $1google.com Your profile is managed by $1google.com @@ -212,6 +215,25 @@ Permissions + + + Applications + + + The administrator of this device has installed applications for additional functions. Applications have access to some of your data. + + + $1example.com has installed applications for additional functions. Applications have access to some of your data. + + + Name + + + Permissions + + Auto-start on your device + + Websites with info from your organization diff --git a/components/media_message_center_strings.grdp b/components/media_message_center_strings.grdp index c9dbde283327..ac9b67f41abe 100644 --- a/components/media_message_center_strings.grdp +++ b/components/media_message_center_strings.grdp @@ -34,6 +34,12 @@ Start casting + + Stop casting + + + Time scrubber + Media Controls diff --git a/components/new_or_sad_tab_strings.grdp b/components/new_or_sad_tab_strings.grdp index 28bda38497db..737386c0f784 100644 --- a/components/new_or_sad_tab_strings.grdp +++ b/components/new_or_sad_tab_strings.grdp @@ -208,7 +208,7 @@ - When you close all Brave Private tabs, your activity in those tabs is cleared from this device: + When you close all Brave Private tabs, your activity in those tabs is removed from this device: <ul> <li>Browsing activity</li> <li>Search history</li> @@ -218,7 +218,7 @@ - When you close all Brave Private tabs, your activity in those tabs is cleared from this device: + When you close all Brave Private tabs, your activity in those tabs is removed from this device: <ul> <li>Browsing activity</li> <li>Search history</li> diff --git a/components/new_or_sad_tab_strings_override.grdp b/components/new_or_sad_tab_strings_override.grdp index e39750ab14c1..47ff7ab5c6bf 100644 --- a/components/new_or_sad_tab_strings_override.grdp +++ b/components/new_or_sad_tab_strings_override.grdp @@ -86,7 +86,7 @@ - When you close all Brave Private tabs, your activity in those tabs is cleared from this device: + When you close all Brave Private tabs, your activity in those tabs is removed from this device: <ul> <li>Browsing activity</li> <li>Search history</li> @@ -96,7 +96,7 @@ - When you close all Brave Private tabs, your activity in those tabs is cleared from this device: + When you close all Brave Private tabs, your activity in those tabs is removed from this device: <ul> <li>Browsing activity</li> <li>Search history</li> diff --git a/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml b/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml new file mode 100644 index 000000000000..10e2f9ee8b2d --- /dev/null +++ b/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/components/page_info_strings.grdp b/components/page_info_strings.grdp index 8f68e1b29586..d84c1ee03638 100644 --- a/components/page_info_strings.grdp +++ b/components/page_info_strings.grdp @@ -68,9 +68,6 @@ Your information (for example, passwords or credit card numbers) is private when it is sent to this site. - - The site's connection is secure unless Brave tells you otherwise. - You have accessed content using an administrator-provided certificate. Data you provide to $1www.google.com can be intercepted by your administrator. @@ -436,8 +433,8 @@ USB device allowed by your administrator - - Revoke access + + Revoke access for $1USB Keyboard Serial port @@ -445,14 +442,14 @@ Serial port allowed by your administrator - - Revoke access + + Revoke access for $1COM1 Bluetooth device - - Revoke access + + Revoke access for $1Pixel Buds Pro HID device @@ -460,8 +457,8 @@ HID device allowed by your administrator - - Revoke access + + Revoke access for $1Stadia Controller @@ -514,6 +511,16 @@ + + + Using now + + + Recently used + + + Last used $12 minutes ago + @@ -792,4 +799,45 @@ Manage ad privacy + + + Site not working? + + + Try temporarily allowing third-party cookies, which means less protection but site features are more likely to work + + + Try allowing third-party cookies, which means less protection but site features are more likely to work + + + Third-party cookies + + + {COUNT, plural, + =0 {Brave will block cookies again today} + =1 {Brave will block cookies again tomorrow} + other {# days until Brave blocks cookies again}} + + + You allowed this site to use third-party cookies. This means that most site features should work, but you have less protection. + + + You allowed third-party cookies for this site + + + This means that most site features should work, but you have less protection + + + {NUM_COOKIES, plural, + =0 {Third-party cookies, No sites allowed} + =1 {Third-party cookies, 1 site allowed} + other {Third-party cookies, # sites allowed}} + + + {NUM_COOKIES, plural, + =0 {Third-party cookies, No sites blocked} + =1 {Third-party cookies, 1 site blocked} + other {Third-party cookies, # sites blocked}} + + diff --git a/components/password_manager_strings.grdp b/components/password_manager_strings.grdp index 33c5db2023e3..386e7e1cb434 100644 --- a/components/password_manager_strings.grdp +++ b/components/password_manager_strings.grdp @@ -55,6 +55,10 @@ Brave periodically checks your passwords against lists that have been published online. When doing this, your passwords and usernames are encrypted, so they can’t be read by anyone, including Brave. + + + When you use a password, Brave warns you if it has been published online. When doing this, your passwords and usernames are encrypted, so they can’t be read by anyone, including Brave. + Signing in as $1chef@google.com diff --git a/components/payments_strings.grdp b/components/payments_strings.grdp index 373b91508fd2..7ae63c1cd8be 100644 --- a/components/payments_strings.grdp +++ b/components/payments_strings.grdp @@ -297,15 +297,6 @@ * Field is required - - Enter a name - - - Enter a valid expiration year - - - Enter a valid expiration month - This card is expired @@ -321,9 +312,6 @@ Enter a valid card number - - Enter a valid expiration date - Enter a valid address diff --git a/components/pdf_strings.grdp b/components/pdf_strings.grdp index d4a392eb731a..ded9ab1d804f 100644 --- a/components/pdf_strings.grdp +++ b/components/pdf_strings.grdp @@ -162,9 +162,18 @@ Document outline + + Attachments + + + Download the attachment + Page number + + Files over 100MB are not available for download + {COUNT, plural, =1 {Page 1} diff --git a/components/permissions/contexts/brave_wallet_permission_context.cc b/components/permissions/contexts/brave_wallet_permission_context.cc index dc3f4456fc13..634be949c911 100644 --- a/components/permissions/contexts/brave_wallet_permission_context.cc +++ b/components/permissions/contexts/brave_wallet_permission_context.cc @@ -373,8 +373,8 @@ BraveWalletPermissionContext::GetWebSitesWithPermission( HostContentSettingsMap* map = PermissionsClient::Get()->GetSettingsMap(context); - ContentSettingsForOneType settings; - map->GetSettingsForOneType(content_settings_type, &settings); + ContentSettingsForOneType settings = + map->GetSettingsForOneType(content_settings_type); std::vector result; for (const auto& setting : settings) { diff --git a/components/permissions/permission_expirations.cc b/components/permissions/permission_expirations.cc index ab4eab098999..9c46e94df501 100644 --- a/components/permissions/permission_expirations.cc +++ b/components/permissions/permission_expirations.cc @@ -31,6 +31,11 @@ constexpr base::StringPiece kRequestingOriginKey = "ro"; constexpr base::StringPiece kEmbeddingOriginKey = "eo"; constexpr base::StringPiece kContentSettingKey = "cs"; +template +typename Container::iterator ConstCastIterator(Container& c, ConstIterator it) { + return c.erase(it, it); +} + } // namespace // static @@ -163,9 +168,9 @@ PermissionExpirations::RemoveExpiredPermissionsImpl( std::vector expiration_keys_to_clear_prefs; auto iterator_pair = predicate.Run(key_expirations_map); auto key_expirations_begin_it = - base::ConstCastIterator(key_expirations_map, iterator_pair.first); + ConstCastIterator(key_expirations_map, iterator_pair.first); auto key_expirations_end_it = - base::ConstCastIterator(key_expirations_map, iterator_pair.second); + ConstCastIterator(key_expirations_map, iterator_pair.second); for (auto key_expirations_it = key_expirations_begin_it; key_expirations_it != key_expirations_end_it; ++key_expirations_it) { const auto& expiration_key = key_expirations_it->first; diff --git a/components/permissions_strings.grdp b/components/permissions_strings.grdp index 09dffc196ccc..00deac4a806f 100644 --- a/components/permissions_strings.grdp +++ b/components/permissions_strings.grdp @@ -116,8 +116,8 @@ Create a 3D map of your surroundings and track camera position - - Allow $1news.site to use info they've saved about you to display content? + + $1google.com wants to use info they've saved about you Access cookies and site data. @@ -127,11 +127,11 @@ Do you want to allow $1news.site to use co This will otherwise be blocked by your privacy settings. This will allow the content you interacted with to work correctly, but may allow $1news.site to track your activity. - - $1news.site will know that you visited $2content_domain.site. $3More about embedded content. + + $1google.com will know that you visited $2top-level-site.com. $3Learn more about embedded content. - - More about embedded content + + Learn more about embedded content Manage windows on all your displays @@ -145,15 +145,6 @@ This will otherwise be blocked by your privacy settings. This will allow the con Download multiple files - - See the make and model of your Security Key - - - Use your Security Key - - - This site won't be able to use the U2F API after February 2022. If you own this site, you should change it to use the Web Authentication API. - Allow diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index 51d4304792ce..4e189cbb41d8 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp @@ -741,10 +741,52 @@ Additional details: Refresh Logs - + Policy Tests + + Restart and apply policies + + + Apply policies + + + Import from JSON + + + You cannot use this page from a managed acount on this unmanaged device. All managed accounts will be locked if you use this page, except accounts managed by the same entity as this device (affiliated accounts). + + + Revert applied policies + + + Scope + + + Add policy + + + Select policy name + + + Preset + + + Test policies have been applied. Review and reset them at chrome://policy/test. Admin policies will not be applied. + + + Custom + + + Local machine + + + Cloud account + + + User affiliated + @@ -887,6 +929,24 @@ Additional details: =1 {Open confidential file?} other {Open confidential files?}} + + Review is required before downloading + + + Review is required before transferring + + + Review is required before uploading + + + Review is required before moving + + + Review is required before copying + + + Review is required before opening + {0, plural, =1 {Administrator policy doesn’t recommend downloading this file to $1External storage} @@ -917,6 +977,11 @@ Additional details: =1 {Administrator policy doesn’t recommend opening this file in $1External storage} other {Administrator policy doesn’t recommend opening these files in $1External storage}} + + {0, plural, + =1 {$1Example.txt may contain sensitive content} + other {$15 files may contain sensitive content}} + Download anyway @@ -938,6 +1003,15 @@ Additional details: Removable storage + + Review + + + Dismiss + + + OK + Cancel @@ -966,6 +1040,85 @@ Additional details: =1 {Opening this file is blocked by administrator policy} other {Opening # files is blocked by administrator policy}} + + {0, plural, + =1 {File blocked from downloading} + other {$15 files blocked from downloading}} + + + {0, plural, + =1 {File blocked from transferring} + other {$15 files blocked from transferring}} + + + {0, plural, + =1 {File blocked from uploading} + other {$15 files blocked from uploading}} + + + {0, plural, + =1 {File blocked from moving} + other {$15 files blocked from moving}} + + + {0, plural, + =1 {File blocked from copying} + other {$15 files blocked from copying}} + + + {0, plural, + =1 {File blocked from opening} + other {$15 files blocked from opening}} + + + {0, plural, + =1 {$1Example.txt was blocked because of policy} + other {$15 files were blocked because of policy}} + + + {0, plural, + =1 {$1Example.txt was blocked because of content} + other {$15 files were blocked because of content}} + + + Review for further details + + + Downloading timed out + + + Transferring timed out + + + Uploading timed out + + + Moving timed out + + + Copying timed out + + + Opening timed out + + + Try downloading your files again + + + Try transferring your files again + + + Try uploading your files again + + + Try moving your files again + + + Try copying your files again + + + Try opening your files again + Device will restart very soon diff --git a/components/printing_component_strings.grdp b/components/printing_component_strings.grdp index c318c8275c85..7a66096d36da 100644 --- a/components/printing_component_strings.grdp +++ b/components/printing_component_strings.grdp @@ -74,6 +74,9 @@ Input Tray + + Paper type + Multiple documents handling @@ -843,4 +846,379 @@ Tray 20 + + + + Aluminum + + + Automatic + + + Back Print Film + + + Cardboard + + + Card Stock + + + Compact Disc + + + Continuous + + + Continuous (Long) + + + Continuous (Short) + + + Cardboard + + + Optical Disc + + + Optical Disc (Glossy) + + + Optical Disc (High-Gloss) + + + Optical Disc (Matte) + + + Optical Disc (Satin) + + + Optical Disc (Semi-Gloss) + + + Cardboard (Double Wall) + + + Dry Film + + + Digital Versatile Disc + + + Embossing Foil + + + Cardboard (End) + + + Envelope + + + Envelope (Archival) + + + Envelope (Bond) + + + Envelope (Coated) + + + Envelope (Cotton) + + + Envelope (Fine) + + + Envelope (Heavyweight) + + + Envelope (Inkjet) + + + Envelope (Lightweight) + + + Envelope (Plain) + + + Envelope (Preprinted) + + + Envelope (Window) + + + Fabric + + + Fabric (Archival) + + + Fabric (Glossy) + + + Fabric (High-Gloss) + + + Fabric (Matte) + + + Fabric (Semi-Gloss) + + + Fabric (Waterproof) + + + Film + + + Flexo Base + + + Flexo Photopolymer + + + Flute + + + Foil + + + Full Cut Tabs + + + Glass + + + Glass (Colored) + + + Glass (Opaque) + + + Glass (Surfaced) + + + Glass (Textured) + + + Gravure Cylinder + + + Image Setter Paper + + + Imaging Cylinder + + + Labels + + + Labels (Colored) + + + Labels (Glossy) + + + Labels (High-Gloss) + + + Labels (Inkjet) + + + Labels (Matte) + + + Labels (Permanent) + + + Labels (Satin) + + + Labels (Security) + + + Labels (Semi-Gloss) + + + Laminating Foil + + + Stationery (Letterhead) + + + Metal + + + Metal (Glossy) + + + Metal (High-Gloss) + + + Metal (Matte) + + + Metal (Satin) + + + Metal (Semi-Gloss) + + + Mounting Tape + + + Multi-Layer + + + Multi-Part Form + + + Other + + + Stationery + + + Photo + + + Photo (Archival) + + + Photo (Film) + + + Photo (Glossy) + + + Photo (High-Gloss) + + + Photo (Matte) + + + Photo (Satin) + + + Photo (Semi-Gloss) + + + Plastic + + + Plastic (Archival) + + + Plastic (Colored) + + + Plastic (Glossy) + + + Plastic (High Gloss) + + + Plastic (Matte) + + + Plastic (Satin) + + + Plastic (Semi-Gloss) + + + Plate + + + Polyester + + + Pre-Cut Tabs + + + Roll + + + Screen + + + Screen (Paged) + + + Self-Adhesive Paper + + + Self-Adhesive Film + + + Shrink Foil + + + Single Face + + + Cardboard (Single Wall) + + + Sleeve + + + Paper (Plain) + + + Paper (Archival) + + + Paper (Bond) + + + Paper (Coated) + + + Paper (Cotton) + + + Paper (Vellum) + + + Paper (Heavyweight) + + + Paper (Heavyweight Coated) + + + Paper (Inkjet) + + + Paper (Letterhead) + + + Paper (Lightweight) + + + Paper (Preprinted) + + + Paper (Prepunched) + + + Tab Stock + + + Tractor Feed + + + Transfer + + + Transparency + + + Cardboard (Triple Wall) + + + Wet Film + + diff --git a/components/security_interstitials_strings.grdp b/components/security_interstitials_strings.grdp index 8119cd0b41f8..77db25040c33 100644 --- a/components/security_interstitials_strings.grdp +++ b/components/security_interstitials_strings.grdp @@ -537,9 +537,13 @@ You are seeing this warning because this site does not support HTTPS and you are under Brave's Advanced Protection Program. <a href="#" id="learn-more-link">Learn more</a> - + You usually connect to this site securely, but Brave couldn't use a secure connection this time. An attacker might be trying to eavesdrop or modify your network connection. <a href="#" id="learn-more-link">Learn more</a> + + You usually connect to sites securely, but Brave couldn't use a secure connection this time. An attacker might be trying to eavesdrop or modify your network connection. <a href="#" id="learn-more-link">Learn more</a> + + Go back diff --git a/components/site_settings_strings.grdp b/components/site_settings_strings.grdp index e87aba58d891..2b3cb6ccad8e 100644 --- a/components/site_settings_strings.grdp +++ b/components/site_settings_strings.grdp @@ -221,11 +221,10 @@ window management - - + Embedded content - + embedded content diff --git a/components/skus/browser/rs/cxx/src/errors.rs b/components/skus/browser/rs/cxx/src/errors.rs index bb0a7386745a..6d426643b02f 100644 --- a/components/skus/browser/rs/cxx/src/errors.rs +++ b/components/skus/browser/rs/cxx/src/errors.rs @@ -33,7 +33,9 @@ impl From<&skus::errors::InternalError> for ffi::SkusResult { skus::errors::InternalError::OrderLocationMismatch => { ffi::SkusResult::OrderLocationMismatch } - skus::errors::InternalError::OrderMisconfiguration => ffi::SkusResult::OrderMisconfiguration, + skus::errors::InternalError::OrderMisconfiguration => { + ffi::SkusResult::OrderMisconfiguration + } skus::errors::InternalError::ItemCredentialsMissing => { ffi::SkusResult::ItemCredentialsMissing } @@ -110,7 +112,9 @@ impl From for skus::errors::InternalError { ffi::SkusResult::OrderLocationMismatch => { skus::errors::InternalError::OrderLocationMismatch } - ffi::SkusResult::OrderMisconfiguration => skus::errors::InternalError::OrderMisconfiguration, + ffi::SkusResult::OrderMisconfiguration => { + skus::errors::InternalError::OrderMisconfiguration + } ffi::SkusResult::ItemCredentialsMissing => { skus::errors::InternalError::ItemCredentialsMissing } diff --git a/components/skus/browser/rs/cxx/src/httpclient.rs b/components/skus/browser/rs/cxx/src/httpclient.rs index 6a32fd6b758b..a0f7db621418 100644 --- a/components/skus/browser/rs/cxx/src/httpclient.rs +++ b/components/skus/browser/rs/cxx/src/httpclient.rs @@ -35,21 +35,14 @@ impl TryFrom>> for ffi::HttpRequest { let mut headers: Vec = Vec::new(); for (key, value) in req.headers().iter() { - let value = value - .to_str() - .map_err(|_| InternalError::UnhandledVariant)?; + let value = value.to_str().map_err(|_| InternalError::UnhandledVariant)?; let header = format!("{}: {}", key.as_str(), value); headers.push(header); } let body = req.body().to_vec(); - Ok(ffi::HttpRequest { - url, - method, - headers, - body, - }) + Ok(ffi::HttpRequest { url, method, headers, body }) } } @@ -96,17 +89,10 @@ impl NativeClient { req: ffi::HttpRequest, ) -> Result>, InternalError> { let (tx, rx) = oneshot::channel(); - let context = Box::new(HttpRoundtripContext { - tx, - client: self.clone(), - }); + let context = Box::new(HttpRoundtripContext { tx, client: self.clone() }); let fetcher = ffi::shim_executeRequest( - &self - .ctx - .try_borrow() - .map_err(|_| InternalError::BorrowFailed)? - .ctx, + &self.ctx.try_borrow().map_err(|_| InternalError::BorrowFailed)?.ctx, &req, |context, resp| { let _ = context.tx.send(resp.into()); @@ -144,9 +130,7 @@ impl HTTPClient for NativeClient { debug!("woke up!"); context.client.try_run_until_stalled(); }, - Box::new(WakeupContext { - client: self.clone(), - }), + Box::new(WakeupContext { client: self.clone() }), ) } diff --git a/components/skus/browser/rs/cxx/src/lib.rs b/components/skus/browser/rs/cxx/src/lib.rs index efc2109049b0..740ea88011e9 100644 --- a/components/skus/browser/rs/cxx/src/lib.rs +++ b/components/skus/browser/rs/cxx/src/lib.rs @@ -364,6 +364,7 @@ impl CppSDK { } } +#[allow(improper_ctypes_definitions)] #[repr(transparent)] pub struct RefreshOrderCallback( pub extern "C" fn( @@ -420,6 +421,7 @@ async fn fetch_order_credentials_task( } } +#[allow(improper_ctypes_definitions)] #[repr(transparent)] pub struct PrepareCredentialsPresentationCallback( pub extern "C" fn( @@ -450,9 +452,10 @@ async fn prepare_credentials_presentation_task( } } +#[allow(improper_ctypes_definitions)] #[repr(transparent)] pub struct CredentialSummaryCallback( - pub extern "C" fn( + pub extern "C" fn( callback_state: *mut ffi::CredentialSummaryCallbackState, result: ffi::SkusResult, summary: &str, @@ -479,7 +482,7 @@ async fn credential_summary_task( .map_err(|e| e.into()) { Ok(Some(summary)) => callback.0(callback_state.into_raw(), ffi::SkusResult::Ok, &summary), - Ok(None) => callback.0(callback_state.into_raw(), ffi::SkusResult::Ok, "{}"), // none, empty + Ok(None) => callback.0(callback_state.into_raw(), ffi::SkusResult::Ok, "{}"), /* none, empty */ Err(e) => callback.0(callback_state.into_raw(), e, "{}"), // none, empty } } diff --git a/components/skus/browser/rs/cxx/src/storage.rs b/components/skus/browser/rs/cxx/src/storage.rs index e68951c453fe..75e8ced8684b 100644 --- a/components/skus/browser/rs/cxx/src/storage.rs +++ b/components/skus/browser/rs/cxx/src/storage.rs @@ -8,9 +8,7 @@ impl KVClient for NativeClient { #[allow(clippy::needless_lifetimes)] fn get_store<'a>(&'a self) -> Result, errors::InternalError> { - self.ctx - .try_borrow_mut() - .or(Err(errors::InternalError::BorrowFailed)) + self.ctx.try_borrow_mut().or(Err(errors::InternalError::BorrowFailed)) } } diff --git a/components/skus/browser/rs/lib/src/sdk/credentials/fetch.rs b/components/skus/browser/rs/lib/src/sdk/credentials/fetch.rs index f7ebf62b274f..044cc5dd7391 100644 --- a/components/skus/browser/rs/lib/src/sdk/credentials/fetch.rs +++ b/components/skus/browser/rs/lib/src/sdk/credentials/fetch.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2021 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + use core::iter; use std::collections::HashMap; @@ -11,7 +16,7 @@ use serde_json::Value; use sha2::Sha512; use crate::errors::{InternalError, SkusError}; -use crate::http::{HttpHandler, delay_from_response}; +use crate::http::{delay_from_response, HttpHandler}; use crate::models::*; use crate::sdk::SDK; use crate::{HTTPClient, StorageClient}; @@ -134,8 +139,8 @@ where match item_creds.state { CredentialState::GeneratedCredentials | CredentialState::SubmittedCredentials => { - // we have generated, or performed submission, reuse the creds - // we created for signing. + // we have generated, or performed submission, reuse the + // creds we created for signing. creds } CredentialState::ActiveCredentials @@ -194,7 +199,8 @@ where ); request_with_retries.await?; } - // length of the blinded tokens is less than 1, no credentials for signing + // length of the blinded tokens is less than 1, no + // credentials for signing } CredentialType::SingleUse => { let blinded_creds: Vec = @@ -255,7 +261,8 @@ where ); request_with_retries.await?; } - CredentialType::TimeLimited => (), // Time limited credentials do not require a submission step + CredentialType::TimeLimited => (), /* Time limited credentials do not require a + * submission step */ } } Ok(()) @@ -297,7 +304,9 @@ where match resp.status() { http::StatusCode::OK => Ok(resp), - http::StatusCode::ACCEPTED => Err(InternalError::RetryLater(delay_from_response(&resp))), + http::StatusCode::ACCEPTED => { + Err(InternalError::RetryLater(delay_from_response(&resp))) + } http::StatusCode::NOT_FOUND => Err(InternalError::NotFound), _ => Err(resp.into()), } @@ -355,7 +364,8 @@ where // so we can clear out the used tokens at the end of the loop time_limited_v2_creds.push(item_id.to_string()); - // Rederive blinded creds so that the proof will fail if different creds were signed + // Rederive blinded creds so that the proof will fail if different creds + // were signed let my_blinded_creds: Vec = item_creds.creds.iter().map(|t| t.blind()).collect(); @@ -373,12 +383,13 @@ where // for batch verification if bc.encode_base64() == sbc.encode_base64() { bucket_blinded_creds.push(*bc); - for t in &item_creds.creds{ + for t in &item_creds.creds { // find the original token from our list of creds // that matches up with this blinded token so we can // add to our bucket creds for verification - if t.blind().encode_base64() == bc.encode_base64(){ - bucket_creds.push(Token::from_bytes(&t.to_bytes()).unwrap()); + if t.blind().encode_base64() == bc.encode_base64() { + bucket_creds + .push(Token::from_bytes(&t.to_bytes()).unwrap()); } } } @@ -390,10 +401,10 @@ where // are the unblinded form of the bucket_blinded_creds let unblinded_creds = batch_proof .verify_and_unblind::( - &bucket_creds, // just the creds server says it signed + &bucket_creds, // just the creds server says it signed &bucket_blinded_creds, // the blinded creds - &signed_creds, // the signed creds from server - &public_key, // the server's public key + &signed_creds, // the signed creds from server + &public_key, // the server's public key ) .or(Err(InternalError::InvalidProof))?; @@ -420,7 +431,8 @@ where if let Some(item_creds) = self.client.get_single_use_item_creds(&item_id).await? { - // Rederive blinded creds so that the proof will fail if different creds were signed + // Rederive blinded creds so that the proof will fail if different creds + // were signed let blinded_creds: Vec = item_creds.creds.iter().map(|t| t.blind()).collect(); @@ -454,7 +466,7 @@ where ) })? .and_hms_opt(0, 0, 0) - .unwrap(), // guaranteed to succeed because of (0, 0, 0) + .unwrap(), // guaranteed to succeed because of (0, 0, 0) expires_at: NaiveDate::parse_from_str(&expires_at, "%Y-%m-%d") .map_err(|_| { InternalError::InvalidResponse( @@ -462,7 +474,7 @@ where ) })? .and_hms_opt(0, 0, 0) - .unwrap(), // guaranteed to succeed because of (0, 0, 0) + .unwrap(), // guaranteed to succeed because of (0, 0, 0) token, }; if let Some(item_creds) = time_limited_creds.get_mut(&item_id) { diff --git a/components/speedreader/rust/ffi/speedreader.rs b/components/speedreader/rust/ffi/speedreader.rs index 4508feb9a1df..cf6f467d98e0 100644 --- a/components/speedreader/rust/ffi/speedreader.rs +++ b/components/speedreader/rust/ffi/speedreader.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2020 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + use super::*; use libc::{c_void, strlen}; use std::panic::{self, AssertUnwindSafe}; @@ -78,19 +83,13 @@ pub extern "C" fn rewriter_new( /// Set up minimal length of the output content. #[no_mangle] -pub extern "C" fn rewriter_set_min_out_length( - rewriter: *mut CRewriter, - min_out_length: i32 -) { +pub extern "C" fn rewriter_set_min_out_length(rewriter: *mut CRewriter, min_out_length: i32) { let rewriter: &mut Box = leak_void_to_box!(rewriter); rewriter.set_min_out_length(min_out_length); } #[no_mangle] -pub extern "C" fn rewriter_set_theme( - rewriter: *mut CRewriter, - theme: *const c_char, -) { +pub extern "C" fn rewriter_set_theme(rewriter: *mut CRewriter, theme: *const c_char) { let rewriter: &mut Box = leak_void_to_box!(rewriter); let the_theme = unsafe { let c_s = theme; @@ -100,10 +99,7 @@ pub extern "C" fn rewriter_set_theme( } #[no_mangle] -pub extern "C" fn rewriter_set_font_family( - rewriter: *mut CRewriter, - font: *const c_char, -) { +pub extern "C" fn rewriter_set_font_family(rewriter: *mut CRewriter, font: *const c_char) { let rewriter: &mut Box = leak_void_to_box!(rewriter); let the_font = unsafe { let c_s = font; @@ -113,10 +109,7 @@ pub extern "C" fn rewriter_set_font_family( } #[no_mangle] -pub extern "C" fn rewriter_set_font_size( - rewriter: *mut CRewriter, - size: *const c_char, -) { +pub extern "C" fn rewriter_set_font_size(rewriter: *mut CRewriter, size: *const c_char) { let rewriter: &mut Box = leak_void_to_box!(rewriter); let the_size = unsafe { let c_s = size; @@ -126,10 +119,7 @@ pub extern "C" fn rewriter_set_font_size( } #[no_mangle] -pub extern "C" fn rewriter_set_content_style( - rewriter: *mut CRewriter, - style: *const c_char, -) { +pub extern "C" fn rewriter_set_content_style(rewriter: *mut CRewriter, style: *const c_char) { let rewriter: &mut Box = leak_void_to_box!(rewriter); let the_style = unsafe { let c_s = style; @@ -179,5 +169,5 @@ pub extern "C" fn rewriter_end(rewriter: *mut CRewriter) -> c_int { pub extern "C" fn rewriter_free(rewriter: *mut CRewriter) { // Clean up the memory by converting the pointer back // into a Box and letting the Box be dropped. - void_to_box!(rewriter); + drop(void_to_box!(rewriter)); } diff --git a/components/speedreader/rust/lib/src/readability/BUILD.gn b/components/speedreader/rust/lib/src/readability/BUILD.gn index 882f49a4a629..bb216a125173 100644 --- a/components/speedreader/rust/lib/src/readability/BUILD.gn +++ b/components/speedreader/rust/lib/src/readability/BUILD.gn @@ -15,8 +15,10 @@ rust_static_library("lib") { "src/extractor.rs", "src/lib.rs", "src/lib.rs", + "src/nlp.rs", "src/scorer.rs", "src/statistics.rs", + "src/util.rs", ] deps = [ diff --git a/components/supervised_user_strings.grdp b/components/supervised_user_strings.grdp index 052077574e0e..b3777557ca05 100644 --- a/components/supervised_user_strings.grdp +++ b/components/supervised_user_strings.grdp @@ -14,15 +14,9 @@ Please start and sign in to Brave before using this app. - - You need permission to visit this site - A parent or guardian has to say that it's OK for you to visit this website - - Go back - OK @@ -35,15 +29,6 @@ Ask in a message - - Ask permission - - - You asked your parent if it's OK to visit this site - - - You asked your parents if it's OK to visit this site - Waiting for permission... @@ -59,9 +44,6 @@ We could not reach your parents at the moment. Please try again. - - Was this result unexpected? <a href="#" id="feedback-link">Send feedback</a> - Details diff --git a/components/sync/service/brave_sync_service_impl.cc b/components/sync/service/brave_sync_service_impl.cc index c8e986f302c3..31ae686e88f4 100644 --- a/components/sync/service/brave_sync_service_impl.cc +++ b/components/sync/service/brave_sync_service_impl.cc @@ -337,8 +337,10 @@ void BraveSyncServiceImpl::OnGotEntityCounts( brave_sync::p3a::RecordSyncedObjectsCount(total_entities); } -void BraveSyncServiceImpl::OnPreferredDataTypesPrefChange() { - SyncServiceImpl::OnPreferredDataTypesPrefChange(); +void BraveSyncServiceImpl::OnPreferredDataTypesPrefChange( + bool payments_integration_enabled_changed) { + SyncServiceImpl::OnPreferredDataTypesPrefChange( + payments_integration_enabled_changed); brave_sync::p3a::RecordEnabledTypes( GetUserSettings()->IsSyncEverythingEnabled(), diff --git a/components/sync/service/brave_sync_service_impl.h b/components/sync/service/brave_sync_service_impl.h index 99071e550760..75a1c0fbcb2a 100644 --- a/components/sync/service/brave_sync_service_impl.h +++ b/components/sync/service/brave_sync_service_impl.h @@ -42,7 +42,8 @@ class BraveSyncServiceImpl : public SyncServiceImpl { void OnSyncCycleCompleted(const SyncCycleSnapshot& snapshot) override; // SyncPrefObserver implementation. - void OnPreferredDataTypesPrefChange() override; + void OnPreferredDataTypesPrefChange( + bool payments_integration_enabled_changed) override; std::string GetOrCreateSyncCode(); bool SetSyncCode(const std::string& sync_code); diff --git a/components/sync_ui_strings.grdp b/components/sync_ui_strings.grdp index 4a1067984424..d8ca40b6c3c9 100644 --- a/components/sync_ui_strings.grdp +++ b/components/sync_ui_strings.grdp @@ -23,6 +23,9 @@ History + + History and Tabs + Reading List diff --git a/components/text_recognition/browser/BUILD.gn b/components/text_recognition/browser/BUILD.gn index 792eb4de57c9..fd5a776da132 100644 --- a/components/text_recognition/browser/BUILD.gn +++ b/components/text_recognition/browser/BUILD.gn @@ -40,7 +40,5 @@ component("browser") { "Foundation.framework", "Vision.framework", ] - - configs += [ "//build/config/compiler:enable_arc" ] } } diff --git a/components/translate_strings.grdp b/components/translate_strings.grdp index 61920d45c783..9d407f21497c 100644 --- a/components/translate_strings.grdp +++ b/components/translate_strings.grdp @@ -77,6 +77,9 @@ Don‘t offer to translate pages in %1$sFrench + + Enabled + More languages diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn index ce5294d39390..4cfe7bf23190 100644 --- a/extensions/BUILD.gn +++ b/extensions/BUILD.gn @@ -1,3 +1,8 @@ +# Copyright (c) 2018 The Brave Authors. All rights reserved. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at https://mozilla.org/MPL/2.0/. + import("//extensions/buildflags/buildflags.gni") if (is_android || is_ios) { @@ -17,6 +22,7 @@ if (is_android || is_ios) { deps = [ "//base", "//components/url_pattern_index", + "//device/vr/buildflags", "//extensions/buildflags", "//net:net", "//url", diff --git a/ios/BUILD.gn b/ios/BUILD.gn index c9ea62128485..9c2f6504fa9b 100644 --- a/ios/BUILD.gn +++ b/ios/BUILD.gn @@ -108,10 +108,7 @@ ios_framework_bundle("brave_core_ios_framework") { info_plist = "Info.plist" - configs += [ - ":internal_config", - "//build/config/compiler:enable_arc", - ] + configs += [ ":internal_config" ] deps = [ ":brave_core_umbrella_header", diff --git a/ios/app/BUILD.gn b/ios/app/BUILD.gn index 8e217a490b87..b841860b82e6 100644 --- a/ios/app/BUILD.gn +++ b/ios/app/BUILD.gn @@ -11,7 +11,6 @@ source_set("app") { configs += [ "//brave/ios/browser/api/brave_wallet:mojom_header_config", "//brave/ios/browser/api/skus:mojom_header_config", - "//build/config/compiler:enable_arc", ] sources = [ diff --git a/ios/browser/BUILD.gn b/ios/browser/BUILD.gn index 7cf2b9752950..de2b74a35c12 100644 --- a/ios/browser/BUILD.gn +++ b/ios/browser/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("browser") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_web_client.h", "brave_web_client.mm", diff --git a/ios/browser/api/ads/BUILD.gn b/ios/browser/api/ads/BUILD.gn index 6b6002a65f05..761395f7d29a 100644 --- a/ios/browser/api/ads/BUILD.gn +++ b/ios/browser/api/ads/BUILD.gn @@ -12,10 +12,7 @@ config("external_config") { } source_set("ads") { - configs += [ - ":external_config", - "//build/config/compiler:enable_arc", - ] + configs += [ ":external_config" ] sources = [ "ads_client_bridge.h", diff --git a/ios/browser/api/bookmarks/BUILD.gn b/ios/browser/api/bookmarks/BUILD.gn index 8024b420da37..c121211a1de7 100644 --- a/ios/browser/api/bookmarks/BUILD.gn +++ b/ios/browser/api/bookmarks/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("bookmarks") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "bookmark_model_listener_ios.h", "bookmark_model_listener_ios.mm", diff --git a/ios/browser/api/bookmarks/brave_bookmarks_api.mm b/ios/browser/api/bookmarks/brave_bookmarks_api.mm index b822e3f022b8..1cf1a705b125 100644 --- a/ios/browser/api/bookmarks/brave_bookmarks_api.mm +++ b/ios/browser/api/bookmarks/brave_bookmarks_api.mm @@ -17,6 +17,7 @@ #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_node.h" #include "components/bookmarks/browser/bookmark_utils.h" +#include "components/bookmarks/browser/bookmark_uuids.h" #include "components/bookmarks/common/bookmark_pref_names.h" #include "components/prefs/pref_service.h" #include "components/undo/bookmark_undo_service.h" @@ -130,25 +131,23 @@ - (void)dealloc { } + (NSString*)rootNodeGuid { - return base::SysUTF8ToNSString(bookmarks::BookmarkNode::kRootNodeUuid); + return base::SysUTF8ToNSString(bookmarks::kRootNodeUuid); } + (NSString*)bookmarkBarNodeGuid { - return base::SysUTF8ToNSString(bookmarks::BookmarkNode::kBookmarkBarNodeUuid); + return base::SysUTF8ToNSString(bookmarks::kBookmarkBarNodeUuid); } + (NSString*)otherBookmarksNodeGuid { - return base::SysUTF8ToNSString( - bookmarks::BookmarkNode::kOtherBookmarksNodeUuid); + return base::SysUTF8ToNSString(bookmarks::kOtherBookmarksNodeUuid); } + (NSString*)mobileBookmarksNodeGuid { - return base::SysUTF8ToNSString( - bookmarks::BookmarkNode::kMobileBookmarksNodeUuid); + return base::SysUTF8ToNSString(bookmarks::kMobileBookmarksNodeUuid); } + (NSString*)managedNodeGuid { - return base::SysUTF8ToNSString(bookmarks::BookmarkNode::kManagedNodeUuid); + return base::SysUTF8ToNSString(bookmarks::kManagedNodeUuid); } - (bool)isPermanentNode { diff --git a/ios/browser/api/bookmarks/exporter/BUILD.gn b/ios/browser/api/bookmarks/exporter/BUILD.gn index 5e2414187920..d1a4cac4039e 100644 --- a/ios/browser/api/bookmarks/exporter/BUILD.gn +++ b/ios/browser/api/bookmarks/exporter/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("exporter") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "bookmark_html_writer.cc", "bookmark_html_writer.h", diff --git a/ios/browser/api/bookmarks/exporter/brave_bookmarks_exporter.mm b/ios/browser/api/bookmarks/exporter/brave_bookmarks_exporter.mm index 0a5a8bcd0f76..1d36cd3e5207 100644 --- a/ios/browser/api/bookmarks/exporter/brave_bookmarks_exporter.mm +++ b/ios/browser/api/bookmarks/exporter/brave_bookmarks_exporter.mm @@ -25,6 +25,7 @@ #include "brave/ios/browser/api/bookmarks/exporter/bookmark_html_writer.h" #include "brave/ios/browser/api/bookmarks/exporter/bookmarks_encoder.h" #include "components/bookmarks/browser/bookmark_node.h" +#include "components/bookmarks/browser/bookmark_uuids.h" #include "components/strings/grit/components_strings.h" #include "ios/chrome/browser/shared/model/application_context/application_context.h" #include "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" @@ -178,15 +179,12 @@ - (void)exportToFile:(NSString*)filePath - (std::unique_ptr)getRootNode { return std::make_unique( - /*id=*/0, - base::Uuid::ParseLowercase(bookmarks::BookmarkNode::kRootNodeUuid), - GURL()); + /*id=*/0, base::Uuid::ParseLowercase(bookmarks::kRootNodeUuid), GURL()); } - (std::unique_ptr)getBookmarksBarNode { auto node = std::make_unique( - /*id=*/1, - base::Uuid::ParseLowercase(bookmarks::BookmarkNode::kBookmarkBarNodeUuid), + /*id=*/1, base::Uuid::ParseLowercase(bookmarks::kBookmarkBarNodeUuid), GURL()); node->SetTitle(brave_l10n::GetLocalizedResourceUTF16String( IDS_BOOKMARK_BAR_FOLDER_NAME)); @@ -195,9 +193,7 @@ - (void)exportToFile:(NSString*)filePath - (std::unique_ptr)getOtherBookmarksNode { auto node = std::make_unique( - /*id=*/2, - base::Uuid::ParseLowercase( - bookmarks::BookmarkNode::kOtherBookmarksNodeUuid), + /*id=*/2, base::Uuid::ParseLowercase(bookmarks::kOtherBookmarksNodeUuid), GURL()); node->SetTitle(brave_l10n::GetLocalizedResourceUTF16String( IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME)); @@ -206,9 +202,7 @@ - (void)exportToFile:(NSString*)filePath - (std::unique_ptr)getMobileBookmarksNode { auto node = std::make_unique( - /*id=*/3, - base::Uuid::ParseLowercase( - bookmarks::BookmarkNode::kMobileBookmarksNodeUuid), + /*id=*/3, base::Uuid::ParseLowercase(bookmarks::kMobileBookmarksNodeUuid), GURL()); node->SetTitle(brave_l10n::GetLocalizedResourceUTF16String( IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME)); diff --git a/ios/browser/api/bookmarks/importer/BUILD.gn b/ios/browser/api/bookmarks/importer/BUILD.gn index 3df31abe8633..7dd3169b7059 100644 --- a/ios/browser/api/bookmarks/importer/BUILD.gn +++ b/ios/browser/api/bookmarks/importer/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("importer") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "bookmark_html_reader.cc", "bookmark_html_reader.h", diff --git a/ios/browser/api/brave_rewards/BUILD.gn b/ios/browser/api/brave_rewards/BUILD.gn index 2447201efca5..b7c15f84e412 100644 --- a/ios/browser/api/brave_rewards/BUILD.gn +++ b/ios/browser/api/brave_rewards/BUILD.gn @@ -13,10 +13,7 @@ config("external_config") { } source_set("brave_rewards") { - configs += [ - ":external_config", - "//build/config/compiler:enable_arc", - ] + configs += [ ":external_config" ] sources = [ "brave_rewards_api.h", diff --git a/ios/browser/api/brave_rewards/brave_rewards_api.mm b/ios/browser/api/brave_rewards/brave_rewards_api.mm index 6d3590cf1bb1..d3d2f6609a50 100644 --- a/ios/browser/api/brave_rewards/brave_rewards_api.mm +++ b/ios/browser/api/brave_rewards/brave_rewards_api.mm @@ -17,6 +17,7 @@ #include "base/task/thread_pool.h" #include "base/threading/sequence_bound.h" #include "base/time/time.h" +#include "base/types/cxx23_to_underlying.h" #include "base/values.h" #include "brave/build/ios/mojom/cpp_transformations.h" #include "brave/components/brave_rewards/common/rewards_flags.h" @@ -272,7 +273,8 @@ - (void)initializeRewardsService:(nullable void (^)())completion { [self getRewardsParameters:nil]; [self fetchBalance:nil]; } else { - LLOG(0, @"Rewards Initialization Failed with error: %d", result); + LLOG(0, @"Rewards Initialization Failed with error: %d", + base::to_underlying(result)); } self.initializationResult = static_cast(result); if (completion) { diff --git a/ios/browser/api/brave_shields/BUILD.gn b/ios/browser/api/brave_shields/BUILD.gn index e4cb5dbc73aa..0c9b9158c376 100644 --- a/ios/browser/api/brave_shields/BUILD.gn +++ b/ios/browser/api/brave_shields/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("brave_shields") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "adblock_engine.h", "adblock_engine.mm", diff --git a/ios/browser/api/brave_stats/BUILD.gn b/ios/browser/api/brave_stats/BUILD.gn index ee287786bd3b..88d9752a8956 100644 --- a/ios/browser/api/brave_stats/BUILD.gn +++ b/ios/browser/api/brave_stats/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("brave_stats") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "brave_stats+private.h", "brave_stats.h", diff --git a/ios/browser/api/brave_wallet/BUILD.gn b/ios/browser/api/brave_wallet/BUILD.gn index 07eaa22cd1e7..454b7cfc075b 100644 --- a/ios/browser/api/brave_wallet/BUILD.gn +++ b/ios/browser/api/brave_wallet/BUILD.gn @@ -16,10 +16,7 @@ config("mojom_header_config") { } source_set("brave_wallet") { - configs += [ - ":mojom_header_config", - "//build/config/compiler:enable_arc", - ] + configs += [ ":mojom_header_config" ] sources = [ "brave_wallet_api+private.h", "brave_wallet_api.h", diff --git a/ios/browser/api/certificate/BUILD.gn b/ios/browser/api/certificate/BUILD.gn index b667199b2d4d..6bfb68342ce6 100644 --- a/ios/browser/api/certificate/BUILD.gn +++ b/ios/browser/api/certificate/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("certificate") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_certificate.h", "brave_certificate.mm", diff --git a/ios/browser/api/certificate/models/BUILD.gn b/ios/browser/api/certificate/models/BUILD.gn index ce8d0f30ba27..4685b6e6f073 100644 --- a/ios/browser/api/certificate/models/BUILD.gn +++ b/ios/browser/api/certificate/models/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("models") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_certificate_enums.h", "brave_certificate_fingerprint.h", diff --git a/ios/browser/api/certificate/utils/BUILD.gn b/ios/browser/api/certificate/utils/BUILD.gn index 2f699cfe57a1..acdb8f1f2399 100644 --- a/ios/browser/api/certificate/utils/BUILD.gn +++ b/ios/browser/api/certificate/utils/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("utils") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_certificate_utils.h", "brave_certificate_utils.mm", diff --git a/ios/browser/api/common/BUILD.gn b/ios/browser/api/common/BUILD.gn index 2edaa46a5240..25de5d9da47c 100644 --- a/ios/browser/api/common/BUILD.gn +++ b/ios/browser/api/common/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("common") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "common_operations.h", "common_operations.mm", diff --git a/ios/browser/api/favicon/BUILD.gn b/ios/browser/api/favicon/BUILD.gn index 0fd254625751..459259d54edd 100644 --- a/ios/browser/api/favicon/BUILD.gn +++ b/ios/browser/api/favicon/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("favicon") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "favicon_driver.h", "favicon_driver.mm", diff --git a/ios/browser/api/history/BUILD.gn b/ios/browser/api/history/BUILD.gn index 9751cf227c30..491347897e0f 100644 --- a/ios/browser/api/history/BUILD.gn +++ b/ios/browser/api/history/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("history") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_history_api+private.h", "brave_history_api.h", diff --git a/ios/browser/api/history/brave_history_api.mm b/ios/browser/api/history/brave_history_api.mm index 80ec0e9e7980..3c924bddae75 100644 --- a/ios/browser/api/history/brave_history_api.mm +++ b/ios/browser/api/history/brave_history_api.mm @@ -146,7 +146,8 @@ - (void)addHistory:(IOSHistoryNode*)history isURLTyped:(BOOL)isURLTyped { /*url*/ net::GURLWithNSURL(history.url), /*time*/ base::Time::FromNSDate(history.dateAdded), /*context_id=*/0, - /*nav_entry_id=*/0, /*referrer=*/GURL(), + /*nav_entry_id=*/0, /*local_navigation_id=*/absl::nullopt, + /*referrer=*/GURL(), /*redirect_list*/ history::RedirectList(), /*transition*/ isURLTyped ? ui::PAGE_TRANSITION_TYPED : ui::PAGE_TRANSITION_LINK, diff --git a/ios/browser/api/ipfs/BUILD.gn b/ios/browser/api/ipfs/BUILD.gn index 06c57685f7d9..42f7decff527 100644 --- a/ios/browser/api/ipfs/BUILD.gn +++ b/ios/browser/api/ipfs/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("ipfs") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ipfs_api+private.h", "ipfs_api.h", diff --git a/ios/browser/api/net/BUILD.gn b/ios/browser/api/net/BUILD.gn index 09bb4e1d6583..078877993fd6 100644 --- a/ios/browser/api/net/BUILD.gn +++ b/ios/browser/api/net/BUILD.gn @@ -8,8 +8,6 @@ import("//ios/build/config.gni") import("//net/features.gni") source_set("net") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "certificate_utility.h", "certificate_utility.mm", diff --git a/ios/browser/api/ntp_background_images/BUILD.gn b/ios/browser/api/ntp_background_images/BUILD.gn index 2c2b7b0959d6..5d0536d6e856 100644 --- a/ios/browser/api/ntp_background_images/BUILD.gn +++ b/ios/browser/api/ntp_background_images/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("ntp_background_images") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ntp_background_image+private.h", "ntp_background_image.h", diff --git a/ios/browser/api/opentabs/BUILD.gn b/ios/browser/api/opentabs/BUILD.gn index d7397d81379d..11a9f8915aef 100644 --- a/ios/browser/api/opentabs/BUILD.gn +++ b/ios/browser/api/opentabs/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("opentabs") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_opentabs_api+private.h", "brave_opentabs_api.h", diff --git a/ios/browser/api/p3a/BUILD.gn b/ios/browser/api/p3a/BUILD.gn index 7d16b8f558ed..f014e778f261 100644 --- a/ios/browser/api/p3a/BUILD.gn +++ b/ios/browser/api/p3a/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("p3a") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "brave_histograms_controller+private.h", "brave_histograms_controller.h", diff --git a/ios/browser/api/password/BUILD.gn b/ios/browser/api/password/BUILD.gn index 0efd0987c145..b979c2fd86ff 100644 --- a/ios/browser/api/password/BUILD.gn +++ b/ios/browser/api/password/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("password") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_password_api+private.h", "brave_password_api.h", diff --git a/ios/browser/api/qr_code/BUILD.gn b/ios/browser/api/qr_code/BUILD.gn index c7b9682fdf13..68a762924ee9 100644 --- a/ios/browser/api/qr_code/BUILD.gn +++ b/ios/browser/api/qr_code/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("qr_code") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "qr_code_generator.h", "qr_code_generator.mm", diff --git a/ios/browser/api/query_filter/BUILD.gn b/ios/browser/api/query_filter/BUILD.gn index 8b1e764c3fdd..c4231f175fbd 100644 --- a/ios/browser/api/query_filter/BUILD.gn +++ b/ios/browser/api/query_filter/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("query_filter") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "utils.h", "utils.mm", diff --git a/ios/browser/api/session_restore/BUILD.gn b/ios/browser/api/session_restore/BUILD.gn index 10fe66ab6e8d..b182d9cf50bb 100644 --- a/ios/browser/api/session_restore/BUILD.gn +++ b/ios/browser/api/session_restore/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("session_restore") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "synthesized_session_restore.h", "synthesized_session_restore.mm", diff --git a/ios/browser/api/sync/BUILD.gn b/ios/browser/api/sync/BUILD.gn index 45e849b122b8..bb2e53035f49 100644 --- a/ios/browser/api/sync/BUILD.gn +++ b/ios/browser/api/sync/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("sync") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_sync_api.h", "brave_sync_api.mm", diff --git a/ios/browser/api/sync/driver/BUILD.gn b/ios/browser/api/sync/driver/BUILD.gn index a8f5cf278fcf..fe0c9985d12f 100644 --- a/ios/browser/api/sync/driver/BUILD.gn +++ b/ios/browser/api/sync/driver/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("driver") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_sync_profile_service+private.h", "brave_sync_profile_service.h", diff --git a/ios/browser/api/url/BUILD.gn b/ios/browser/api/url/BUILD.gn index fe904496006d..42fa5c4eb295 100644 --- a/ios/browser/api/url/BUILD.gn +++ b/ios/browser/api/url/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("url") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "url_formatter.h", "url_formatter.mm", @@ -28,7 +26,6 @@ source_set("url") { "//components/url_formatter", "//components/url_formatter/spoof_checks/top_domains:common", "//components/url_formatter/spoof_checks/top_domains:generate_top_domains_trie", - "//components/url_formatter/spoof_checks/top_domains:top500_domains", "//net", "//url", ] diff --git a/ios/browser/api/url/url_spoof_checker.h b/ios/browser/api/url/url_spoof_checker.h index 2f4949ac0290..54eeaf2b37d1 100644 --- a/ios/browser/api/url/url_spoof_checker.h +++ b/ios/browser/api/url/url_spoof_checker.h @@ -55,8 +55,8 @@ NS_SWIFT_NAME(URLSpoofChecker.TopDomainEntry) - (instancetype)init NS_UNAVAILABLE; /// The domain name. @property(nonatomic, readonly) NSString* domain; -/// True if the domain is in the top 500. -@property(nonatomic, readonly) bool isTop500; +/// True if the domain is in the top 1000 bucket. +@property(nonatomic, readonly) bool isTopBucket; /// Type of the skeleton stored in the trie node. @property(nonatomic, readonly) BraveSpoofCheckerSkeletonType skeletonType; @end diff --git a/ios/browser/api/url/url_spoof_checker.mm b/ios/browser/api/url/url_spoof_checker.mm index a1f1b64dfb88..f79b3bebad84 100644 --- a/ios/browser/api/url/url_spoof_checker.mm +++ b/ios/browser/api/url/url_spoof_checker.mm @@ -84,7 +84,7 @@ @implementation URLSpoofCheckerTopDomainEntry - (instancetype)initWithEntry:(url_formatter::TopDomainEntry)entry { if ((self = [super init])) { _domain = base::SysUTF8ToNSString(entry.domain) ?: @""; - _isTop500 = entry.is_top_500; + _isTopBucket = entry.is_top_bucket; _skeletonType = static_cast( entry.skeleton_type); } diff --git a/ios/browser/api/version_info/BUILD.gn b/ios/browser/api/version_info/BUILD.gn index 994d69252f0b..f970db6c159b 100644 --- a/ios/browser/api/version_info/BUILD.gn +++ b/ios/browser/api/version_info/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("version_info") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "version_info_ios.h", "version_info_ios.mm", diff --git a/ios/browser/api/web/BUILD.gn b/ios/browser/api/web/BUILD.gn index 18015fdf3fe9..b35d72194edf 100644 --- a/ios/browser/api/web/BUILD.gn +++ b/ios/browser/api/web/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("web") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [] deps = [ "web_state" ] diff --git a/ios/browser/api/web/web_state/BUILD.gn b/ios/browser/api/web/web_state/BUILD.gn index e21400af27ca..001de3ea73f9 100644 --- a/ios/browser/api/web/web_state/BUILD.gn +++ b/ios/browser/api/web/web_state/BUILD.gn @@ -7,8 +7,6 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") source_set("web_state") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "web_state+private.h", "web_state.h", diff --git a/ios/browser/api/web/web_state/web_state_native.h b/ios/browser/api/web/web_state/web_state_native.h index 56c0d8504939..91f0d6d1a311 100644 --- a/ios/browser/api/web/web_state/web_state_native.h +++ b/ios/browser/api/web/web_state/web_state_native.h @@ -16,7 +16,6 @@ class Browser; class GURL; namespace brave { -class NavigationDelegate; class NativeWebState final { public: @@ -43,7 +42,6 @@ class NativeWebState final { Browser* browser_; SessionID session_id_; - std::unique_ptr navigation_delegate_; web::WebState* web_state_; std::unique_ptr web_state_observer_; }; diff --git a/ios/browser/api/web/web_state/web_state_native.mm b/ios/browser/api/web/web_state/web_state_native.mm index 64f756fffad1..088785c03438 100644 --- a/ios/browser/api/web/web_state/web_state_native.mm +++ b/ios/browser/api/web/web_state/web_state_native.mm @@ -26,172 +26,13 @@ #error "This file requires ARC support." #endif -#pragma mark - BackForwardList - -// Back Forward List for use in Navigation Manager -@interface BackForwardList : NSObject -@property(nonatomic, readonly, copy) WKBackForwardListItem* currentItem; -@property(nonatomic, readonly, copy) NSArray* backList; -@property(nonatomic, readonly, copy) - NSArray* forwardList; -@end - -@implementation BackForwardList -@synthesize currentItem; -@synthesize backList; -@synthesize forwardList; - -- (instancetype)init { - self = [super init]; - return self; -} - -- (WKBackForwardListItem*)itemAtIndex:(NSInteger)index { - if (index == 0) { - return currentItem; - } - - if (index > 0 && forwardList.count) { - return forwardList[index - 1]; - } - - if (backList.count) { - return backList[backList.count + index]; - } - - return nullptr; -} - -- (WKBackForwardListItem*)backItem { - return backList.lastObject; -} - -- (WKBackForwardListItem*)forwardItem { - return forwardList.firstObject; -} -@end - -#pragma mark - NavigationProxy - -@interface NavigationProxy : NSObject -@end - -@implementation NavigationProxy -- (instancetype)init { - if ((self = [super init])) { - } - return self; -} - -- (NSURL*)URL { - return net::NSURLWithGURL(GURL(url::kAboutBlankURL)); -} - -- (WKBackForwardList*)backForwardList { - return (WKBackForwardList*)[[BackForwardList alloc] init]; -} -@end - -#pragma mark - NavigationDelegate - namespace brave { -class NavigationDelegate : public web::NavigationManagerDelegate { - public: - NavigationDelegate(web::WebState* web_state); - ~NavigationDelegate() override; - void ClearDialogs() override; - void RecordPageStateInNavigationItem() override; - void LoadCurrentItem(web::NavigationInitiationType type) override; - void LoadIfNecessary() override; - void Reload() override; - void OnNavigationItemCommitted(web::NavigationItem* item) override; - web::WebState* GetWebState() override; - void SetWebStateUserAgent(web::UserAgentType user_agent_type) override; - id GetWebViewNavigationProxy() const override; - void GoToBackForwardListItem(WKBackForwardListItem* wk_item, - web::NavigationItem* item, - web::NavigationInitiationType type, - bool has_user_gesture) override; - - void RemoveWebView() override; - web::NavigationItemImpl* GetPendingItem() override; - GURL GetCurrentURL() const override; - - private: - web::WebState* web_state_; -}; - -NavigationDelegate::~NavigationDelegate() = default; - -id NavigationDelegate::GetWebViewNavigationProxy() - const { - return [[NavigationProxy alloc] init]; -} - -web::WebState* NavigationDelegate::GetWebState() { - return web_state_; -} - -web::NavigationItemImpl* NavigationDelegate::GetPendingItem() { - return nullptr; -} - -NavigationDelegate::NavigationDelegate(web::WebState* web_state) - : web_state_(web_state) { - // Not needed on iOS -} - -void NavigationDelegate::ClearDialogs() { - // Not needed on iOS -} - -void NavigationDelegate::RecordPageStateInNavigationItem() { - // Not needed on iOS -} - -void NavigationDelegate::LoadCurrentItem(web::NavigationInitiationType type) { - // Not needed on iOS -} - -void NavigationDelegate::LoadIfNecessary() { - // Not needed on iOS -} - -void NavigationDelegate::Reload() { - // Not needed on iOS -} - -void NavigationDelegate::OnNavigationItemCommitted(web::NavigationItem* item) { - // Not needed on iOS -} - -void NavigationDelegate::SetWebStateUserAgent( - web::UserAgentType user_agent_type) { - // Not needed on iOS -} - -void NavigationDelegate::GoToBackForwardListItem( - WKBackForwardListItem* wk_item, - web::NavigationItem* item, - web::NavigationInitiationType type, - bool has_user_gesture) { - // Not needed on iOS -} - -void NavigationDelegate::RemoveWebView() { - // Not needed on iOS -} - -GURL NavigationDelegate::GetCurrentURL() const { - return GURL(); -} #pragma mark NativeWebState NativeWebState::NativeWebState(Browser* browser, bool off_the_record) : browser_(browser), session_id_(SessionID::InvalidValue()), - navigation_delegate_(nullptr), web_state_(nullptr), web_state_observer_(nullptr) { // First setup SessionID for the web-state @@ -227,11 +68,6 @@ void GoToBackForwardListItem(WKBackForwardListItem* wk_item, web_state_ = web_state.get(); web_state_observer_ = std::make_unique(this); - // Setup Navigation Delegate for the WebState - navigation_delegate_ = std::make_unique(web_state_); - static_cast(web_state_->GetNavigationManager()) - ->SetDelegate(navigation_delegate_.get()); - // Insert the WebState into the Browser && Activate it browser_->GetWebStateList()->InsertWebState( browser_->GetWebStateList()->count(), std::move(web_state), @@ -255,7 +91,6 @@ void GoToBackForwardListItem(WKBackForwardListItem* wk_item, } // Cleanup everything else in reverse order of construction - navigation_delegate_.reset(); web_state_ = nullptr; session_id_ = SessionID::InvalidValue(); browser_ = nullptr; @@ -298,7 +133,8 @@ void GoToBackForwardListItem(WKBackForwardListItem* wk_item, navigation_manager->AddPendingItem( url, web::Referrer(), ui::PAGE_TRANSITION_TYPED, web::NavigationInitiationType::BROWSER_INITIATED, - /*is_post_navigation=*/false, web::HttpsUpgradeType::kNone); + /*is_post_navigation=*/false, /*is_error_navigation*/ false, + web::HttpsUpgradeType::kNone); navigation_manager->CommitPendingItem(); static_cast(web_state_)->OnPageLoaded(url, true); diff --git a/ios/browser/api/web_image/BUILD.gn b/ios/browser/api/web_image/BUILD.gn index 514b318f89b8..2c5cdab879ee 100644 --- a/ios/browser/api/web_image/BUILD.gn +++ b/ios/browser/api/web_image/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("web_image") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "image_downloader.h", "image_downloader.mm", diff --git a/ios/browser/brave_wallet/BUILD.gn b/ios/browser/brave_wallet/BUILD.gn index d7907a623ed5..a5e6e05554ca 100644 --- a/ios/browser/brave_wallet/BUILD.gn +++ b/ios/browser/brave_wallet/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("brave_wallet") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "asset_ratio_service_factory.cc", "asset_ratio_service_factory.h", diff --git a/ios/browser/favicon/BUILD.gn b/ios/browser/favicon/BUILD.gn index 2f521cc1b29b..1ad0d151f523 100644 --- a/ios/browser/favicon/BUILD.gn +++ b/ios/browser/favicon/BUILD.gn @@ -4,8 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("favicon") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "brave_ios_favicon_loader.h", "brave_ios_favicon_loader.mm", diff --git a/ios/browser/keyed_service/BUILD.gn b/ios/browser/keyed_service/BUILD.gn index 00d52159dabd..62a543ea0dc3 100644 --- a/ios/browser/keyed_service/BUILD.gn +++ b/ios/browser/keyed_service/BUILD.gn @@ -9,7 +9,6 @@ config("external") { } source_set("keyed_service") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "keyed_service_factory_wrapper+private.h", "keyed_service_factory_wrapper.h", diff --git a/ios/browser/providers/BUILD.gn b/ios/browser/providers/BUILD.gn index 390646dd8eb6..491cbaac9c85 100644 --- a/ios/browser/providers/BUILD.gn +++ b/ios/browser/providers/BUILD.gn @@ -16,13 +16,14 @@ group("brave_providers") { "//ios/chrome/browser/providers/branded_images:chromium_branded_images", "//ios/chrome/browser/providers/context_menu:chromium_context_menu", "//ios/chrome/browser/providers/discover_feed:chromium_discover_feed", - "//ios/chrome/browser/providers/find_in_page:chromium_find_in_page", "//ios/chrome/browser/providers/follow:chromium_follow", "//ios/chrome/browser/providers/font:chromium_font", "//ios/chrome/browser/providers/fullscreen:chromium_fullscreen", "//ios/chrome/browser/providers/keyboard:chromium_keyboard", "//ios/chrome/browser/providers/lens:chromium_lens", "//ios/chrome/browser/providers/mailto_handler:chromium_mailto_handler", + "//ios/chrome/browser/providers/material:chromium_material_branding", + "//ios/chrome/browser/providers/mini_map:chromium_mini_map", "//ios/chrome/browser/providers/modals:chromium_modals", "//ios/chrome/browser/providers/omaha:chromium_omaha", "//ios/chrome/browser/providers/overrides:chromium_overrides", diff --git a/ios/browser/providers/lottie/BUILD.gn b/ios/browser/providers/lottie/BUILD.gn index c4de3bfbc3fb..a71f568a17af 100644 --- a/ios/browser/providers/lottie/BUILD.gn +++ b/ios/browser/providers/lottie/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. source_set("chromium_lottie_animation") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "chromium_lottie_animation.mm" ] deps = [ "//ios/public/provider/chrome/browser/lottie:lottie_animation_api" ] } diff --git a/ios/browser/qr_code_generator/qrcode_generator_service.cc b/ios/browser/qr_code_generator/qrcode_generator_service.cc index 6a72db22b472..70f5cc62ce1b 100644 --- a/ios/browser/qr_code_generator/qrcode_generator_service.cc +++ b/ios/browser/qr_code_generator/qrcode_generator_service.cc @@ -270,15 +270,16 @@ std::unique_ptr QRCodeGeneratorService::generateQRCode( } input[data_size - 1] = 0; - QRCodeGenerator qr; + qr_code_generator::QRCodeGenerator qr; // The QR version (i.e. size) must be >= 5 because otherwise the dino painted // over the middle covers too much of the code to be decodable. constexpr int kMinimumQRVersion = 5; - absl::optional qr_data = qr.Generate( - base::span( - reinterpret_cast(request->data.data()), - request->data.size()), - kMinimumQRVersion); + absl::optional qr_data = + qr.Generate( + base::span( + reinterpret_cast(request->data.data()), + request->data.size()), + kMinimumQRVersion); if (!qr_data || qr_data->data.data() == nullptr || qr_data->data.size() == 0) { // The above check should have caught the too-long-URL case. diff --git a/ios/browser/skus/BUILD.gn b/ios/browser/skus/BUILD.gn index 236728cfcca6..a525ce9c6b8b 100644 --- a/ios/browser/skus/BUILD.gn +++ b/ios/browser/skus/BUILD.gn @@ -4,7 +4,6 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. source_set("skus") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "skus_sdk_factory_wrappers.h", "skus_sdk_factory_wrappers.mm", diff --git a/ios/browser/svg/BUILD.gn b/ios/browser/svg/BUILD.gn index 636ba8bae265..88323398755b 100644 --- a/ios/browser/svg/BUILD.gn +++ b/ios/browser/svg/BUILD.gn @@ -11,8 +11,6 @@ source_set("svg") { "-Wno-unreachable-code-aggressive", ] - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ "svg_image.h", "svg_image.mm", diff --git a/ios/testing/BUILD.gn b/ios/testing/BUILD.gn index f51ec53fa829..b06d26cde388 100644 --- a/ios/testing/BUILD.gn +++ b/ios/testing/BUILD.gn @@ -7,7 +7,6 @@ import("//build/config/ios/rules.gni") import("//testing/test.gni") ios_xctest_test("brave_core_ios_tests") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "dictionary_transform_test.mm", "main.mm", diff --git a/package.json b/package.json index ed90f2b5f5f5..13c58b1b2ec7 100644 --- a/package.json +++ b/package.json @@ -267,7 +267,7 @@ "projects": { "chrome": { "dir": "src", - "tag": "116.0.5845.180", + "tag": "117.0.5938.35", "repository": { "url": "https://github.com/brave/chromium" } diff --git a/patches/base-BUILD.gn.patch b/patches/base-BUILD.gn.patch index d5a048bfa2af..cb37748d2d5d 100644 --- a/patches/base-BUILD.gn.patch +++ b/patches/base-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn -index 304223b58a7062e3a6ae466d54b9e877708e5cb3..42d684f60658336b564a8754ecf51ec87a17ee27 100644 +index 6e6f24e479cce61b5f189faed40601e8f3e82ef9..96b0c277a9a89d28a7862104f9c2b0bb803dfc0e 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -4433,6 +4433,7 @@ if (is_android) { +@@ -4396,6 +4396,7 @@ if (is_android) { "android/java/src/org/chromium/base/task/ThreadPoolTaskExecutor.java", "android/java/src/org/chromium/base/task/UiThreadTaskExecutor.java", ] diff --git a/patches/base-threading-thread_restrictions.h.patch b/patches/base-threading-thread_restrictions.h.patch index ef51ac9f8a55..9e83d5e52b77 100644 --- a/patches/base-threading-thread_restrictions.h.patch +++ b/patches/base-threading-thread_restrictions.h.patch @@ -1,5 +1,5 @@ diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index 385b540b5a4291070eff5e1e6a407223de097cdb..76ea6d80e8674c17fd317d35499c48c3df006d6c 100644 +index b88010ec63528497fc2ae0b7b3fc04c0fdd2e539..d67d398f23a567c1793edd3b3766832a85100e07 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -731,6 +731,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBaseSyncPrimitives { diff --git a/patches/base-trace_event-builtin_categories.h.patch b/patches/base-trace_event-builtin_categories.h.patch index cf91ba0a60e5..dc1add7d22d4 100644 --- a/patches/base-trace_event-builtin_categories.h.patch +++ b/patches/base-trace_event-builtin_categories.h.patch @@ -1,8 +1,8 @@ diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index da966a58b11be318770fccdd14986efd2a92ccf8..e76a22d0ba534b435313d70cf091c3d7c1cdcf83 100644 +index 5d1c694fba219f1f0dbb398d16da7b779dc0afcd..15d9af06c5703999c04d953b9435172e8217e81e 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -190,6 +190,7 @@ +@@ -191,6 +191,7 @@ X("webrtc") \ X("webrtc_stats") \ X("xr") \ diff --git a/patches/build-android-gradle-generate_gradle.py.patch b/patches/build-android-gradle-generate_gradle.py.patch index 3c8e30d5635c..edae84932f4b 100644 --- a/patches/build-android-gradle-generate_gradle.py.patch +++ b/patches/build-android-gradle-generate_gradle.py.patch @@ -1,8 +1,8 @@ diff --git a/build/android/gradle/generate_gradle.py b/build/android/gradle/generate_gradle.py -index bc05baf9bbf34e5c0a41eef6198932d4f1ba2afd..95060d77ce502192f7b3e2d63cbce3c20d83a240 100755 +index f6dce230f4609e53e55d453bed50e8d6e60d3e96..4fb51148c69fdbbd7a3adbb9637e883cebf92890 100755 --- a/build/android/gradle/generate_gradle.py +++ b/build/android/gradle/generate_gradle.py -@@ -933,5 +933,6 @@ def main(): +@@ -938,5 +938,6 @@ def main(): '+/main/docs/android_studio.md') diff --git a/patches/build-android-gyp-dex.py.patch b/patches/build-android-gyp-dex.py.patch index 47aa5252a186..71f02733eb2f 100644 --- a/patches/build-android-gyp-dex.py.patch +++ b/patches/build-android-gyp-dex.py.patch @@ -1,5 +1,5 @@ diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py -index ce91b38b1ae3bf0be4046b33a3efd5f0ed0f72d1..dfaed65b2cd56d2789ae308d9a794540482138ce 100755 +index 221b3fd50c7d02e56f337cacb7174e004ce15d7f..50db6b75db8c8bcfae75137fce46b72c1797f4bc 100755 --- a/build/android/gyp/dex.py +++ b/build/android/gyp/dex.py @@ -30,6 +30,7 @@ DEFAULT_IGNORE_WARNINGS = ( diff --git a/patches/build-android-gyp-proguard.py.patch b/patches/build-android-gyp-proguard.py.patch index 643b14a9f817..579ccfa7fe94 100644 --- a/patches/build-android-gyp-proguard.py.patch +++ b/patches/build-android-gyp-proguard.py.patch @@ -1,8 +1,8 @@ diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py -index 20f66723836726987692d898fb56c5368d708867..7b4d5febed77edbee3073178366f63505e0238b3 100755 +index c00343ab8d73565a53749be7c113b82621606cd6..424d0889379ccc9abe76b352785429c8aa7f401c 100755 --- a/build/android/gyp/proguard.py +++ b/build/android/gyp/proguard.py -@@ -316,6 +316,7 @@ def _OptimizeWithR8(options, config_paths, libraries, dynamic_config_data): +@@ -329,6 +329,7 @@ def _OptimizeWithR8(options, config_paths, libraries, dynamic_config_data): '--pg-map-output', tmp_mapping_path, ] diff --git a/patches/build-config-BUILDCONFIG.gn.patch b/patches/build-config-BUILDCONFIG.gn.patch index df580db70531..e1cbfb222bda 100644 --- a/patches/build-config-BUILDCONFIG.gn.patch +++ b/patches/build-config-BUILDCONFIG.gn.patch @@ -1,5 +1,5 @@ diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 6ee83a41a05488f016f86f90b026835f4b19ea54..8ad38f54d4333df734b49064673e07eabf2df6dc 100644 +index 105e194dd1d4d4003736ce5cf963bc1290de669f..d80df2d4a508a0ee8d81287d7563b109b66d235e 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -329,6 +329,7 @@ is_posix = !is_win && !is_fuchsia diff --git a/patches/build-config-android-BUILD.gn.patch b/patches/build-config-android-BUILD.gn.patch index 6419f57aa482..2297918c9053 100644 --- a/patches/build-config-android-BUILD.gn.patch +++ b/patches/build-config-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn -index 63b37e0c17c678dca03b18b9cbfc3a5b778f208b..a3722c8bad6efbd8233c47b55e535f849acc5e32 100644 +index e7c18c068d4e5d401e4128d7f2384bb06e506a30..5f26aed99647932158b4a25a46ae5b03fbccb633 100644 --- a/build/config/android/BUILD.gn +++ b/build/config/android/BUILD.gn @@ -39,6 +39,7 @@ config("compiler") { diff --git a/patches/build-config-android-config.gni.patch b/patches/build-config-android-config.gni.patch index f39963fab22f..57672fcdfaf8 100644 --- a/patches/build-config-android-config.gni.patch +++ b/patches/build-config-android-config.gni.patch @@ -1,8 +1,8 @@ diff --git a/build/config/android/config.gni b/build/config/android/config.gni -index 2be952726980fea7dbe8d8626f12d5a55e1eedb5..0dc3235a1dc66cc1fd00bb85d3d69e7a8a305909 100644 +index 0a4ea11f8436ae4bac9c202b81bf24ba959636e9..320c6d0633b113b784d6a51a63a37db01458fd98 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni -@@ -21,6 +21,7 @@ declare_args() { +@@ -22,6 +22,7 @@ declare_args() { # toolchain, this GNI file may be read and processed from within Chrome OS # toolchains. Checking |is_android| here would therefore be too restrictive. if (is_android || is_chromeos) { diff --git a/patches/build-config-android-internal_rules.gni.patch b/patches/build-config-android-internal_rules.gni.patch index 32157dc8b3d6..6345c66cf2ae 100644 --- a/patches/build-config-android-internal_rules.gni.patch +++ b/patches/build-config-android-internal_rules.gni.patch @@ -1,8 +1,8 @@ diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni -index 0a8542670b2ea8aedcb4c70c6ffda2f1057b6598..aae574fa58be178ce7e56d2da7aaa7232ef409b4 100644 +index d6bcf850168e853cdf70d16362c282256b693868..164c20ff23f2cefafa9e8a91ad1797f30968add1 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni -@@ -4032,6 +4032,7 @@ if (enable_java_templates) { +@@ -4070,6 +4070,7 @@ if (enable_java_templates) { } else { not_needed(invoker, [ "missing_classes_allowlist" ]) } diff --git a/patches/build-config-android-rules.gni.patch b/patches/build-config-android-rules.gni.patch index 6147edc57924..168254a3e6da 100644 --- a/patches/build-config-android-rules.gni.patch +++ b/patches/build-config-android-rules.gni.patch @@ -1,8 +1,8 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni -index d12617a3c7a3a5b8216b8b7f471d7818ada7f809..de7302a1cef6f6dabeebdd8881540db929d72fe0 100644 +index 758dbe2a66cbcbc3164e771059d02c4285db2eb5..c512b39b4e472fa9f12bd5836963418225694d14 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni -@@ -432,6 +432,7 @@ if (enable_java_templates && is_android) { +@@ -428,6 +428,7 @@ if (enable_java_templates && is_android) { # ] # } template("java_cpp_enum") { @@ -10,7 +10,7 @@ index d12617a3c7a3a5b8216b8b7f471d7818ada7f809..de7302a1cef6f6dabeebdd8881540db9 action_with_pydeps(target_name) { forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "sources" ]) -@@ -607,6 +608,7 @@ if (enable_java_templates && is_android) { +@@ -603,6 +604,7 @@ if (enable_java_templates && is_android) { # output = "$target_gen_dir/AndroidManifest.xml" # } template("jinja_template") { diff --git a/patches/build-config-compiler-BUILD.gn.patch b/patches/build-config-compiler-BUILD.gn.patch deleted file mode 100644 index 14a6eb0fea46..000000000000 --- a/patches/build-config-compiler-BUILD.gn.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index ae742b0b85a506f550852e611471338bde0da390..fa4c05af9cd5a027ed973614809c3cc620934be0 100644 ---- a/build/config/compiler/BUILD.gn -+++ b/build/config/compiler/BUILD.gn -@@ -2570,7 +2570,7 @@ config("symbols") { - if (use_dwarf5) { - cflags += [ "-gdwarf-5" ] - rustflags += [ "-Zdwarf-version=5" ] -- } else if (!is_apple) { -+ } else { - # Recent clang versions default to DWARF5 on Linux, and Android is about - # to switch. TODO: Adopt that in controlled way. - # Apple platforms still default to 4, so the flag is not needed there. diff --git a/patches/build-rust-BUILD.gn.patch b/patches/build-rust-BUILD.gn.patch deleted file mode 100644 index 498eac17eec4..000000000000 --- a/patches/build-rust-BUILD.gn.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/build/rust/BUILD.gn b/build/rust/BUILD.gn -index 17c7efbb7abd2376b2c83656c9dab9d6fc732e05..609dab84217b4d17e1c53ff572c23460431b1f72 100644 ---- a/build/rust/BUILD.gn -+++ b/build/rust/BUILD.gn -@@ -28,10 +28,15 @@ if (toolchain_has_rust) { - - defines = [ "RUST_CXX_NO_EXCEPTIONS" ] - -- if (is_win) { -- defines += [ "CXX_RS_EXPORT=__declspec(dllexport)" ] -+ # We cannot depend on base/base_export.h because base depends on us. -+ if (is_component_build) { -+ if (is_win) { -+ defines += [ "CXX_RS_EXPORT=__declspec(dllexport)" ] -+ } else { -+ defines += [ "CXX_RS_EXPORT=__attribute__((visibility(\"default\")))" ] -+ } - } else { -- defines += [ "CXX_RS_EXPORT=__attribute__((visibility(\"default\")))" ] -+ defines += [ "CXX_RS_EXPORT=" ] - } - - # Depending on the C++ bindings side of cxx then requires also depending diff --git a/patches/build-rust-cargo_crate.gni.patch b/patches/build-rust-cargo_crate.gni.patch index 85ed0d1b9f78..b50f6f67dbc3 100644 --- a/patches/build-rust-cargo_crate.gni.patch +++ b/patches/build-rust-cargo_crate.gni.patch @@ -1,5 +1,5 @@ diff --git a/build/rust/cargo_crate.gni b/build/rust/cargo_crate.gni -index ca7475db78595e5854730d1a68bbdbf2af365df0..2f838a02f399e6f8113d21c82a88b800ea6161a8 100644 +index 7471b015c2d66516211a2b36ec77fbcf60854722..c54e8a7baa5c60fb47c8d3e8b5a86a1bdf7b4902 100644 --- a/build/rust/cargo_crate.gni +++ b/build/rust/cargo_crate.gni @@ -190,7 +190,7 @@ template("cargo_crate") { diff --git a/patches/build-rust-run_build_script.py.patch b/patches/build-rust-run_build_script.py.patch deleted file mode 100644 index c818b240ed58..000000000000 --- a/patches/build-rust-run_build_script.py.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/build/rust/run_build_script.py b/build/rust/run_build_script.py -index 3f99f3af9b0b68f600c3f32f49e276eb1308fece..0e30c5367cebf6d63733fd2e7f85f51397c71ce1 100755 ---- a/build/rust/run_build_script.py -+++ b/build/rust/run_build_script.py -@@ -101,11 +101,12 @@ def main(): - env["OUT_DIR"] = tempdir - env["CARGO_MANIFEST_DIR"] = os.path.abspath(args.src_dir) - env["HOST"] = host_triple(rustc_path) -+ env["TARGET"] = env["HOST"] - if args.target is None: -- env["TARGET"] = env["HOST"] -+ target = env["TARGET"] - else: -- env["TARGET"] = args.target -- target_components = env["TARGET"].split("-") -+ target = args.target -+ target_components = target.split("-") - if len(target_components) == 2: - env["CARGO_CFG_TARGET_ARCH"] = target_components[0] - env["CARGO_CFG_TARGET_VENDOR"] = '' diff --git a/patches/build-rust-rust_target.gni.patch b/patches/build-rust-rust_target.gni.patch new file mode 100644 index 000000000000..832e00ec9beb --- /dev/null +++ b/patches/build-rust-rust_target.gni.patch @@ -0,0 +1,13 @@ +diff --git a/build/rust/rust_target.gni b/build/rust/rust_target.gni +index 1fdad6338f3aeb5cf2d1811891bd26173e981525..a0a56a47e95d5fea755f40a63ab0007532f2d858 100644 +--- a/build/rust/rust_target.gni ++++ b/build/rust/rust_target.gni +@@ -173,7 +173,7 @@ template("rust_target") { + _cxx_bindings = invoker.cxx_bindings + } + _rustenv = [ "OUT_DIR=" + +- rebase_path(_env_out_dir, get_path_info(_crate_root, "dir")) ] ++ rebase_path(_env_out_dir) ] + if (defined(invoker.rustenv)) { + _rustenv += invoker.rustenv + } diff --git a/patches/build-rust-std-BUILD.gn.patch b/patches/build-rust-std-BUILD.gn.patch deleted file mode 100644 index 45d3f6dd4e15..000000000000 --- a/patches/build-rust-std-BUILD.gn.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn -index 9f95c130d64bdd2ad3f8dd4c698a0c66bbcd8570..c55c17c0124a81f57783a3b9611974bc61a1cdb8 100644 ---- a/build/rust/std/BUILD.gn -+++ b/build/rust/std/BUILD.gn -@@ -200,6 +200,9 @@ if (toolchain_has_rust) { - sources = [] - output_name = "librustc-nightly_rt.$rt_name" - output_dir = "$local_rustc_sysroot/$sysroot_lib_subdir" -+ if (is_win) { -+ arflags = [ "/llvmlibempty" ] -+ } - } - } - rustc_sanitizer_runtimes = [] diff --git a/patches/build-util-android_chrome_version.py.patch b/patches/build-util-android_chrome_version.py.patch index e0de933bfd59..a9998331f6af 100644 --- a/patches/build-util-android_chrome_version.py.patch +++ b/patches/build-util-android_chrome_version.py.patch @@ -1,21 +1,21 @@ diff --git a/build/util/android_chrome_version.py b/build/util/android_chrome_version.py -index f00cd99d2bfa5793d6ed5d96025885ad83af412f..4e49484e6bdb3648739521c6125fbacb8516c33c 100755 +index 41b22a0de9fbd135b50d9cfadd4fa78c52cc1ec7..56e9da9a35c7471acb73d1ca9a96335f7ffeb63d 100755 --- a/build/util/android_chrome_version.py +++ b/build/util/android_chrome_version.py -@@ -199,6 +199,7 @@ def _GetAbisToDigitMask(build_number): +@@ -199,6 +199,7 @@ def _GetAbisToDigitMask(build_number, patch_number): mapped to version code suffix. """ - + # Scheme change was made directly to M113 and M114 branches. + from brave_version_utils import remap_build_number; build_number = remap_build_number(build_number) - if build_number < 5750: - return { - 'arm': { -@@ -327,7 +328,7 @@ def GenerateVersionCodes(version_values, arch, is_next_build): - """ + use_new_scheme = (build_number >= 5750 + or (build_number == 5672 and patch_number >= 176) + or (build_number == 5735 and patch_number >= 53)) +@@ -332,7 +333,7 @@ def GenerateVersionCodes(version_values, arch, is_next_build): - base_version_code = int( -- '%s%03d00' % (version_values['BUILD'], int(version_values['PATCH']))) -+ '%02d%02d%03d00' % (int(version_values['MINOR']) + 41, int(version_values['BUILD']), int(version_values['PATCH']))) + build_number = int(version_values['BUILD']) + patch_number = int(version_values['PATCH']) +- base_version_code = (build_number * 1000 + patch_number) * 100 ++ base_version_code = int('%02d%02d%03d00' % (int(version_values['MINOR']) + 41, int(version_values['BUILD']), int(version_values['PATCH']))) if is_next_build: base_version_code += _NEXT_BUILD_VERSION_CODE_DIFF diff --git a/patches/chrome-BUILD.gn.patch b/patches/chrome-BUILD.gn.patch index ef04d34b7d76..c45055471ec2 100644 --- a/patches/chrome-BUILD.gn.patch +++ b/patches/chrome-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b1631a6c1b9f 100644 +index 61f07f736047732cc631c713fafa507df48ebb90..d5dd6542ad941a15456274997204eb3697f9e521 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -201,6 +201,7 @@ if (!is_android && !is_mac) { @@ -10,7 +10,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 deps += [ ":chrome_dll", -@@ -523,11 +524,12 @@ if (is_win) { +@@ -519,11 +520,12 @@ if (is_win) { args += [ "--keystone=0" ] } } @@ -24,7 +24,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 extra_substitutions = [ "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id", "CHROMIUM_SHORT_NAME=$chrome_product_short_name", -@@ -547,6 +549,7 @@ if (is_win) { +@@ -543,6 +545,7 @@ if (is_win) { "//chrome/common:buildflags", "//chrome/common:version_header", ] @@ -32,7 +32,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 if (enable_updater) { deps += [ ":chromium_updater_privileged_helper" ] -@@ -623,7 +626,7 @@ if (is_win) { +@@ -619,7 +622,7 @@ if (is_win) { args = [ "-b", @@ -41,7 +41,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 "-v", chrome_version_full, "-g", -@@ -697,6 +700,7 @@ if (is_win) { +@@ -693,6 +696,7 @@ if (is_win) { # this dependency directly copies the file into the framework's # resources directory. public_deps += [ ":chrome_framework_widevine_signature" ] @@ -49,7 +49,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 } } -@@ -740,9 +744,11 @@ if (is_win) { +@@ -736,9 +740,11 @@ if (is_win) { "--scm=0", ] } @@ -61,7 +61,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 if (is_chrome_branded && include_branded_entitlements) { # These entitlements are bound to the official Google Chrome signing # certificate and will not necessarily work in any other build. -@@ -767,6 +773,7 @@ if (is_win) { +@@ -763,6 +769,7 @@ if (is_win) { info_plist_target = invoker.info_plist_target } else { info_plist_target = ":chrome_helper_plist" @@ -69,7 +69,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 } extra_substitutions = [ -@@ -945,6 +952,7 @@ if (is_win) { +@@ -941,6 +948,7 @@ if (is_win) { sources += [ "//third_party/updater/chrome_mac_universal_prod/${updater_product_full_name}.app" ] } else { sources += [ "$root_out_dir/${updater_product_full_name}.app" ] @@ -77,15 +77,15 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 public_deps += [ "//chrome/updater/mac:browser_install_script", -@@ -1259,6 +1267,7 @@ if (is_win) { +@@ -1276,6 +1284,7 @@ if (is_win) { + "-current_version", chrome_dylib_version, - "-Wl,-order_file," + rebase_path("app/framework.order", root_build_dir), ] + import("//brave/browser/sources.gni") public_deps += brave_chrome_framework_public_deps bundle_deps += brave_chrome_framework_bundle_deps framework_contents += brave_chrome_framework_contents configs += brave_chrome_framework_configs if (!is_component_build) { # Specify a sensible install_name for static builds. The library is -@@ -1439,6 +1448,7 @@ if (is_win) { +@@ -1456,6 +1465,7 @@ if (is_win) { group("dependencies") { public_deps = [ @@ -93,7 +93,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 "//build:branding_buildflags", "//build:chromeos_buildflags", "//chrome/browser", -@@ -1505,7 +1515,7 @@ group("dependencies") { +@@ -1522,7 +1532,7 @@ group("dependencies") { if (is_win) { process_version_rc_template("chrome_exe_version") { @@ -102,7 +102,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 output = "$target_gen_dir/chrome_exe_version.rc" } -@@ -1559,6 +1569,7 @@ group("resources") { +@@ -1576,6 +1586,7 @@ group("resources") { "//chrome/browser:resources", "//chrome/common:resources", "//chrome/renderer:resources", @@ -110,7 +110,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..b9bb51e48160cc9fabd833959359b163 ] } -@@ -1612,6 +1623,7 @@ if (!is_android) { +@@ -1629,6 +1640,7 @@ if (!is_android) { if (enable_resource_allowlist_generation) { repack_allowlist = _chrome_resource_allowlist deps = [ ":resource_allowlist" ] diff --git a/patches/chrome-VERSION.patch b/patches/chrome-VERSION.patch index 081116a6ca89..3586ce9788f6 100644 --- a/patches/chrome-VERSION.patch +++ b/patches/chrome-VERSION.patch @@ -1,12 +1,12 @@ diff --git a/chrome/VERSION b/chrome/VERSION -index 3994acc908b1dcf8a8eee0afe05791136f586121..2ed5debc08b3636540c04035c768af9d90afe487 100644 +index 2658d6854fa945a159bad0169547949884ce5154..e041183764d25ec4a9f41cfa0fbfe3b62f85a817 100644 --- a/chrome/VERSION +++ b/chrome/VERSION @@ -1,4 +1,4 @@ - MAJOR=116 + MAJOR=117 -MINOR=0 --BUILD=5845 --PATCH=180 +-BUILD=5938 +-PATCH=35 +MINOR=1 +BUILD=58 +PATCH=116 diff --git a/patches/chrome-android-BUILD.gn.patch b/patches/chrome-android-BUILD.gn.patch index c2525847893f..822a5d5d363b 100644 --- a/patches/chrome-android-BUILD.gn.patch +++ b/patches/chrome-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6eebe312f01 100644 +index d7ceb4f02120ec22640efc0ab92706c06a110c01..6677ae1444cefaea6beb62fac84e748ee8a48e24 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -169,6 +169,7 @@ if (current_toolchain == default_toolchain) { @@ -18,7 +18,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee } android_library("app_hooks_java") { -@@ -629,6 +631,7 @@ if (current_toolchain == default_toolchain) { +@@ -640,6 +642,7 @@ if (current_toolchain == default_toolchain) { ] deps += feed_deps @@ -26,7 +26,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee srcjar_deps = [ ":chrome_android_java_enums_srcjar", -@@ -649,6 +652,7 @@ if (current_toolchain == default_toolchain) { +@@ -659,6 +662,7 @@ if (current_toolchain == default_toolchain) { "//components/supervised_user/core/browser:supervised_user_url_filter_enum_javagen", "//net:effective_connection_type_java", ] @@ -34,7 +34,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee # From java_sources.gni. sources = chrome_java_sources + [ app_hooks_impl ] -@@ -779,6 +783,7 @@ if (current_toolchain == default_toolchain) { +@@ -792,6 +796,7 @@ if (current_toolchain == default_toolchain) { "//components/messages/android/internal:java", "//components/segmentation_platform/internal:internal_java", ] @@ -42,7 +42,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee } action_with_pydeps("chrome_android_java_google_api_keys_srcjar") { -@@ -2052,6 +2057,7 @@ if (current_toolchain == default_toolchain) { +@@ -2099,6 +2104,7 @@ if (current_toolchain == default_toolchain) { "java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png", "java/res_chromium_base/values/channel_constants.xml", ] @@ -50,7 +50,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee # Dep needed to ensure override works properly. deps = [ ":chrome_base_module_resources" ] -@@ -2271,6 +2277,7 @@ if (current_toolchain == default_toolchain) { +@@ -2318,6 +2324,7 @@ if (current_toolchain == default_toolchain) { ":${_variant}_locale_pak_assets", ":${_variant}_paks", ] @@ -58,7 +58,7 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee if (_is_monochrome) { deps += [ "//android_webview:locale_pak_assets" ] if (webview_includes_weblayer && !_is_bundle_module) { -@@ -2541,6 +2548,7 @@ if (current_toolchain == default_toolchain) { +@@ -2590,6 +2597,7 @@ if (current_toolchain == default_toolchain) { "//components/payments/content/android:service_java", "//third_party/androidx:androidx_browser_browser_java", ] @@ -66,3 +66,11 @@ index 8c74c18eba8a8eca690620af60700aa5dfd0ae9d..6ab64e52574a06b3e07bc27e6dc1f6ee # More deps for DFMs. if (dfmify_dev_ui) { +@@ -3523,6 +3531,7 @@ generate_jni("chrome_jni_headers") { + "java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java", + "java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java", + ] ++ sources += brave_jni_headers_sources + + if (enable_vr) { + sources += [ "features/vr/java/src/org/chromium/chrome/browser/vr/VrModuleProvider.java" ] diff --git a/patches/chrome-android-chrome_java_sources.gni.patch b/patches/chrome-android-chrome_java_sources.gni.patch index 4caea69d5784..c090a165dbdb 100644 --- a/patches/chrome-android-chrome_java_sources.gni.patch +++ b/patches/chrome-android-chrome_java_sources.gni.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni -index 7e63baa23aa64f0e81263ea1602531d47bbfccf5..f1fc2b2e025cbb54b98f1a9021872d5edd0be4b6 100644 +index a67d20641971d0c9618c28c5d9049b4df9b9bb63..ff7acdb33cf8f73825838b67f726f2abae9a73fb 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1204,3 +1204,4 @@ chrome_java_sources = [ +@@ -1211,3 +1211,4 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUSBActivity.java", "java/src/org/chromium/chrome/browser/webshare/ShareServiceImplementationFactory.java", ] diff --git a/patches/chrome-android-chrome_public_apk_tmpl.gni.patch b/patches/chrome-android-chrome_public_apk_tmpl.gni.patch index de955ada67d8..a337a0907700 100644 --- a/patches/chrome-android-chrome_public_apk_tmpl.gni.patch +++ b/patches/chrome-android-chrome_public_apk_tmpl.gni.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni -index 3d760420407464575b056318b80345a5101a3f27..662f9329678793d893172139c8a2364c06f42fab 100644 +index 5122a76e6c951f4eec0fdd83437e8c3df1d0856e..e76e2134b26c2ce655f77ce33ef96ccf4da7e6ff 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -313,6 +313,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -314,6 +314,7 @@ template("chrome_common_apk_or_module_tmpl") { "*ic_file_download_white*", # Bottom edge seems misaligned. "*ic_lock.*", # Bottom edge seems misaligned. ] @@ -10,7 +10,7 @@ index 3d760420407464575b056318b80345a5101a3f27..662f9329678793d893172139c8a2364c # Most of these, with the exception of resource_exclusion_exceptions, # are currently duplicated in system_webview_apk_tmpl.gni. -@@ -337,6 +338,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -338,6 +339,7 @@ template("chrome_common_apk_or_module_tmpl") { proguard_enabled = true proguard_configs = [ "//chrome/android/proguard/main.flags" ] @@ -18,7 +18,7 @@ index 3d760420407464575b056318b80345a5101a3f27..662f9329678793d893172139c8a2364c if (_is_monochrome) { proguard_configs += [ "//android_webview/nonembedded/java/proguard.flags" ] -@@ -741,6 +743,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -746,6 +748,7 @@ template("chrome_common_apk_or_module_tmpl") { "version_code", "version_name", ]) @@ -26,7 +26,7 @@ index 3d760420407464575b056318b80345a5101a3f27..662f9329678793d893172139c8a2364c } } -@@ -769,6 +772,7 @@ template("monochrome_public_common_apk_or_module_tmpl") { +@@ -774,6 +777,7 @@ template("monochrome_public_common_apk_or_module_tmpl") { if (!defined(is_monochrome)) { is_trichrome = true } diff --git a/patches/chrome-android-features-tab_ui-BUILD.gn.patch b/patches/chrome-android-features-tab_ui-BUILD.gn.patch new file mode 100644 index 000000000000..4fbe9a7fd645 --- /dev/null +++ b/patches/chrome-android-features-tab_ui-BUILD.gn.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/android/features/tab_ui/BUILD.gn b/chrome/android/features/tab_ui/BUILD.gn +index c73c8adfa810ca56b5854d958df1eab89e95cf9a..15269f48bb9294fd19ef122f4acd868beea42a19 100644 +--- a/chrome/android/features/tab_ui/BUILD.gn ++++ b/chrome/android/features/tab_ui/BUILD.gn +@@ -85,6 +85,7 @@ android_resources("java_resources") { + "java/res/values/ids.xml", + "java/res/values/styles.xml", + ] ++ sources += brave_android_features_java_resources + deps = [ + ":java_strings_grd", + "//chrome/android:chrome_app_java_resources", diff --git a/patches/chrome-android-java-AndroidManifest.xml.patch b/patches/chrome-android-java-AndroidManifest.xml.patch index 33d8a132b738..2184b3f65fa8 100644 --- a/patches/chrome-android-java-AndroidManifest.xml.patch +++ b/patches/chrome-android-java-AndroidManifest.xml.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml -index 6f3722cd64029848c1737ced63889cf7cb41c5aa..7195ef1e5fc2c67861001a44e7070dea584fae62 100644 +index 298dfaabe9ce9c383c2e3b00590ce23e6904d2a7..2d352320951fbd6cd7f2f23b6fa3a33cc6bd0455 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -28,6 +28,7 @@ by a child template that "extends" this file. @@ -48,7 +48,7 @@ index 6f3722cd64029848c1737ced63889cf7cb41c5aa..7195ef1e5fc2c67861001a44e7070dea -@@ -138,7 +149,9 @@ by a child template that "extends" this file. +@@ -136,7 +147,9 @@ by a child template that "extends" this file. @@ -58,7 +58,7 @@ index 6f3722cd64029848c1737ced63889cf7cb41c5aa..7195ef1e5fc2c67861001a44e7070dea {% block extra_uses_permissions %} {% endblock %} -@@ -200,7 +213,7 @@ by a child template that "extends" this file. +@@ -198,7 +211,7 @@ by a child template that "extends" this file. android:networkSecurityConfig="@xml/network_security_config" android:allowAudioPlaybackCapture="false" android:appComponentFactory="org.chromium.chrome.browser.base.SplitCompatAppComponentFactory" @@ -67,7 +67,7 @@ index 6f3722cd64029848c1737ced63889cf7cb41c5aa..7195ef1e5fc2c67861001a44e7070dea {% block extra_application_attributes %}{% endblock %}> {% if channel in ['canary', 'dev', 'default'] %} -@@ -349,6 +362,7 @@ by a child template that "extends" this file. +@@ -347,6 +360,7 @@ by a child template that "extends" this file. @@ -75,9 +75,9 @@ index 6f3722cd64029848c1737ced63889cf7cb41c5aa..7195ef1e5fc2c67861001a44e7070dea -@@ -1202,6 +1216,7 @@ by a child template that "extends" this file. - +@@ -1218,6 +1232,7 @@ by a child template that "extends" this file. + + {% endif %} + {% include "//brave/android/java/AndroidManifest.xml" %} {% block extra_application_definitions %} diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuItem.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuItem.java.patch index 2983db480140..085ce5e168e0 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuItem.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuItem.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java -index 7daa27cc9cfa48fb1cb4314d06c1f2de299fc38b..86567850d549132ceabe511470f765ba1aed2e87 100644 +index 587083a0603b65134c5aaed5be2b884b5aca712b..d43358e14e2bc8b51d9e12f374e0d9099e00bd58 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java -@@ -42,7 +42,7 @@ class ChromeContextMenuItem { +@@ -41,7 +41,7 @@ class ChromeContextMenuItem { Item.SHOP_IMAGE_WITH_GOOGLE_LENS, Item.SHARE_IMAGE, Item.DIRECT_SHARE_IMAGE, Item.CALL, Item.SEND_MESSAGE, Item.ADD_TO_CONTACTS, Item.COPY, Item.SAVE_VIDEO, Item.OPEN_IN_CHROME, Item.OPEN_IN_NEW_TAB_IN_GROUP, Item.SHARE_HIGHLIGHT, @@ -11,7 +11,7 @@ index 7daa27cc9cfa48fb1cb4314d06c1f2de299fc38b..86567850d549132ceabe511470f765ba @Retention(RetentionPolicy.SOURCE) public @interface Item { // Values are numerated from 0 and can't have gaps. -@@ -90,7 +90,7 @@ class ChromeContextMenuItem { +@@ -89,7 +89,7 @@ class ChromeContextMenuItem { int REMOVE_HIGHLIGHT = 33; int LEARN_MORE = 34; // ALWAYS UPDATE! @@ -20,7 +20,7 @@ index 7daa27cc9cfa48fb1cb4314d06c1f2de299fc38b..86567850d549132ceabe511470f765ba } /** -@@ -132,6 +132,7 @@ class ChromeContextMenuItem { +@@ -131,6 +131,7 @@ class ChromeContextMenuItem { R.id.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT R.id.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT R.id.contextmenu_learn_more, // Item.LEARN_MORE @@ -28,7 +28,7 @@ index 7daa27cc9cfa48fb1cb4314d06c1f2de299fc38b..86567850d549132ceabe511470f765ba }; /** -@@ -173,6 +174,7 @@ class ChromeContextMenuItem { +@@ -172,6 +173,7 @@ class ChromeContextMenuItem { R.string.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT R.string.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT R.string.contextmenu_learn_more, // Item.LEARN_MORE diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuPopulator.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuPopulator.java.patch index 0912f90743b9..2c5f364da1f2 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuPopulator.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-contextmenu-ChromeContextMenuPopulator.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java -index 82360f40547faca5e3e0a820ccadbbbc8e26c04a..59fd1aad787a5fb0c2bffe6ead049465a82abc34 100644 +index f46b319c4fc0efb162ba364da6929df1e5026888..238b81bff6b18669c2ba7419f19bb3ae16f34f84 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java -@@ -132,7 +132,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -131,7 +131,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { Action.COPY_IMAGE, Action.SHOP_IMAGE_WITH_GOOGLE_LENS, Action.READ_LATER, Action.SHOP_WITH_GOOGLE_LENS_CHIP, Action.TRANSLATE_WITH_GOOGLE_LENS_CHIP, Action.SHARE_HIGHLIGHT, Action.REMOVE_HIGHLIGHT, Action.LEARN_MORE, @@ -11,7 +11,7 @@ index 82360f40547faca5e3e0a820ccadbbbc8e26c04a..59fd1aad787a5fb0c2bffe6ead049465 @Retention(RetentionPolicy.SOURCE) public @interface Action { int OPEN_IN_NEW_TAB = 0; -@@ -176,7 +176,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -175,7 +175,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { int LEARN_MORE = 38; int OPEN_IN_NEW_TAB_IN_GROUP = 39; int OPEN_IN_NEW_WINDOW = 40; @@ -20,7 +20,7 @@ index 82360f40547faca5e3e0a820ccadbbbc8e26c04a..59fd1aad787a5fb0c2bffe6ead049465 } } -@@ -269,6 +269,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -259,6 +259,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (!MailTo.isMailTo(mParams.getLinkUrl().getSpec()) && !UrlUtilities.isTelScheme(mParams.getLinkUrl())) { linkGroup.add(createListItem(Item.COPY_LINK_ADDRESS)); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch index 5c9067ece105..43dbc62612e0 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java -index 4d7ba2bfa18a741358dcc2b2171971700f04e159..b74610ae583c66d0b0f0419f05ef6be588c24adc 100644 +index f592872e177033b9a09fdcff19aeeaea66c2ec23..aba68dd18f3eb0c3d7216e430dcd3182a98a8703 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java @@ -82,7 +82,7 @@ public class NotificationPlatformBridge { @@ -11,7 +11,7 @@ index 4d7ba2bfa18a741358dcc2b2171971700f04e159..b74610ae583c66d0b0f0419f05ef6be5 private static NotificationManagerProxy sNotificationManagerOverride; -@@ -135,7 +135,7 @@ public class NotificationPlatformBridge { +@@ -133,7 +133,7 @@ public class NotificationPlatformBridge { sNotificationManagerOverride = notificationManager; } @@ -20,7 +20,7 @@ index 4d7ba2bfa18a741358dcc2b2171971700f04e159..b74610ae583c66d0b0f0419f05ef6be5 mNativeNotificationPlatformBridge = nativeNotificationPlatformBridge; Context context = ContextUtils.getApplicationContext(); if (sNotificationManagerOverride != null) { -@@ -585,7 +585,7 @@ public class NotificationPlatformBridge { +@@ -583,7 +583,7 @@ public class NotificationPlatformBridge { } } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch index 123d388dda57..3076392025b5 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -index 436209985756ef3c0ccecc56ea4a75f011f337ba..8ca92d3628f383d90291cbddd2dd07dcfbe662d0 100644 +index 242926889212725eabff3db27caa8bb4827f7421..9186f3601f548b7288c1e3ec1e4b54f6902be07c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java @@ -60,7 +60,7 @@ import org.chromium.ui.text.SpanApplier; @@ -11,7 +11,7 @@ index 436209985756ef3c0ccecc56ea4a75f011f337ba..8ca92d3628f383d90291cbddd2dd07dc implements Preference.OnPreferenceChangeListener, FragmentHelpAndFeedbackLauncher, ProfileDependentSetting { private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; -@@ -337,6 +337,7 @@ public class PrivacySettings extends PreferenceFragmentCompat +@@ -333,6 +333,7 @@ public class PrivacySettings extends PreferenceFragmentCompat @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.clear(); @@ -19,7 +19,7 @@ index 436209985756ef3c0ccecc56ea4a75f011f337ba..8ca92d3628f383d90291cbddd2dd07dc MenuItem help = menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(TraceEventVectorDrawableCompat.create( -@@ -350,7 +351,7 @@ public class PrivacySettings extends PreferenceFragmentCompat +@@ -346,7 +347,7 @@ public class PrivacySettings extends PreferenceFragmentCompat getActivity(), getString(R.string.help_context_privacy), null); return true; } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch index 66e44c034fe5..a4f616f0c2d1 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java -index ea1d9e280b7fbcc6dee43b5b719cbcba85773dae..0e43bdf14d2f60e00973d8bb07c66451f5b97d05 100644 +index 3ffd30c3b7c2d2142fc5dcd9941a7b6e33be90ef..d566e0eda8ee997458661f9240a0e9d8e5a6c0e7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java -@@ -53,7 +53,7 @@ import org.chromium.chrome.browser.sync.ui.PassphraseDialogFragment; +@@ -52,7 +52,7 @@ import org.chromium.chrome.browser.sync.ui.PassphraseDialogFragment; import org.chromium.chrome.browser.sync.ui.PassphraseTypeDialogFragment; import org.chromium.chrome.browser.ui.signin.SignOutDialogCoordinator; import org.chromium.chrome.browser.ui.signin.SignOutDialogCoordinator.Listener; @@ -11,7 +11,7 @@ index ea1d9e280b7fbcc6dee43b5b719cbcba85773dae..0e43bdf14d2f60e00973d8bb07c66451 import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.signin.AccountManagerFacadeProvider; -@@ -359,7 +359,7 @@ public class ManageSyncSettings extends PreferenceFragmentCompat +@@ -353,7 +353,7 @@ public class ManageSyncSettings extends PreferenceFragmentCompat .getIdentityManager(Profile.getLastUsedRegularProfile()) .getPrimaryAccountInfo(ConsentLevel.SYNC)); // May happen if account is removed from the device while this screen is shown. diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-tabbed_mode-TabbedRootUiCoordinator.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-tabbed_mode-TabbedRootUiCoordinator.java.patch index e303393e8bdf..4ae12ef7aeb6 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-tabbed_mode-TabbedRootUiCoordinator.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-tabbed_mode-TabbedRootUiCoordinator.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -index 25e2ad32e692811742be261cd873dfff4bc64130..e724b0680df3e95f71fe366dc5745baaae49e5f6 100644 +index 7f494b05c003ff94d51b1fbb1f8e799b717c0611..db9bef6484953024b31ea14c164665857dab1564 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -705,7 +705,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -702,7 +702,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { NotificationPermissionController.attach( mWindowAndroid, mNotificationPermissionController); diff --git a/patches/chrome-app-BUILD.gn.patch b/patches/chrome-app-BUILD.gn.patch index 731c2b8b6f28..5b92b99a2f5a 100644 --- a/patches/chrome-app-BUILD.gn.patch +++ b/patches/chrome-app-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn -index d7531ca3e7b29ad67ce5e8f893f02b7a11d58191..9db19f0addf6a72c5aac59bdc01366b55a04c1c9 100644 +index 8179dd92317a4cbafb65bdefd5c27f9848bca0d7..411ad5c908ceb4aac150a5ac1844d288057c71f2 100644 --- a/chrome/app/BUILD.gn +++ b/chrome/app/BUILD.gn @@ -124,6 +124,8 @@ grit("generated_resources") { diff --git a/patches/chrome-browser-BUILD.gn.patch b/patches/chrome-browser-BUILD.gn.patch index 3e0f28dd9551..933d23a3810f 100644 --- a/patches/chrome-browser-BUILD.gn.patch +++ b/patches/chrome-browser-BUILD.gn.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 01194da83fe3f14c5f84671a186ed01fdbd2dc1e..ac4383ed0b985fa3e538d78b55420467e56d1259 100644 +index ff490f2ffb3f5af65d8af96ff708f9292ffb5e33..949a451d9369766c0c56fb4985f2ee2f632b52af 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2563,6 +2563,7 @@ static_library("browser") { +@@ -2587,6 +2587,7 @@ static_library("browser") { "metrics/family_link_user_metrics_provider.h", ] } + import("//brave/browser/sources.gni") sources += brave_chrome_browser_sources deps += brave_chrome_browser_deps public_deps += brave_chrome_browser_public_deps allow_circular_includes_from += brave_chrome_browser_allow_circular_includes_from - if (is_android) { + if (!is_chromeos_ash) { sources += [ diff --git a/patches/chrome-browser-about_flags.cc.patch b/patches/chrome-browser-about_flags.cc.patch index d449b13e3ca6..6f4dcb46612f 100644 --- a/patches/chrome-browser-about_flags.cc.patch +++ b/patches/chrome-browser-about_flags.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 20160807af8efefcabc065c89b18c7e9685974ee..c3d4d3ebddcbf27a459ecfeedd698e9a68ae85ae 100644 +index 6dd44c495824833aecddbb76582836ffb7c5a593..1106dbc7e077f424635d0f0229f89cda7a53cc30 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3788,6 +3788,7 @@ const FeatureEntry::FeatureVariation kPasswordGenerationExperimentVariations[] = +@@ -3819,6 +3819,7 @@ const FeatureEntry::FeatureVariation kPasswordGenerationExperimentVariations[] = // // When adding a new choice, add it to the end of the list. const FeatureEntry kFeatureEntries[] = { diff --git a/patches/chrome-browser-app_controller_mac.mm.patch b/patches/chrome-browser-app_controller_mac.mm.patch index c00dbb9231dc..c2d99f25ea9a 100644 --- a/patches/chrome-browser-app_controller_mac.mm.patch +++ b/patches/chrome-browser-app_controller_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm -index e36b5a4d6d8d093bc1f13c3df3cb404562149617..9c1d11b98fbd3d748fb7db22a6711f1a77cd73b6 100644 +index 32b5fd746c0e300638010e03282cfc97ff9260ac..d45f86bddb9a9222f5e24869459be8b6e9d1a4db 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm -@@ -646,7 +646,7 @@ class AppControllerNativeThemeObserver : public ui::NativeThemeObserver { +@@ -644,7 +644,7 @@ class AppControllerNativeThemeObserver : public ui::NativeThemeObserver { + (AppController*)sharedController { static AppController* sharedController = [] { @@ -11,7 +11,7 @@ index e36b5a4d6d8d093bc1f13c3df3cb404562149617..9c1d11b98fbd3d748fb7db22a6711f1a NSApp.delegate = sharedController; return sharedController; }(); -@@ -1187,7 +1187,7 @@ class AppControllerNativeThemeObserver : public ui::NativeThemeObserver { +@@ -1183,7 +1183,7 @@ class AppControllerNativeThemeObserver : public ui::NativeThemeObserver { } auto it = _profileBookmarkMenuBridgeMap.find(profilePath); diff --git a/patches/chrome-browser-browser_process_impl.h.patch b/patches/chrome-browser-browser_process_impl.h.patch index 5ced5594850a..cae297b126c4 100644 --- a/patches/chrome-browser-browser_process_impl.h.patch +++ b/patches/chrome-browser-browser_process_impl.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h -index 701b6cc46045cadb381e4399acca782422c21d5f..00b0e73433741b51a7c99745dcccc10d25fdc865 100644 +index 43d7af86dbd67cccb6a9dffdc3e1c2a2e69130f5..68fe495b2e11dba1a95a12ec779ca32985237fff 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h -@@ -223,6 +223,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -225,6 +225,7 @@ class BrowserProcessImpl : public BrowserProcess, static void RegisterPrefs(PrefRegistrySimple* registry); private: diff --git a/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate.h.patch b/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate.h.patch index a0fe93aaaf5b..3dde37ebb3a8 100644 --- a/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate.h.patch +++ b/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h -index dfd4d3320d41b1b55b59aa595aaa79da8a73b450..7f5dfeffac5793d41229feafa05208a919358aef 100644 +index 21df89b758b87ceb35802f284337e801a7a50ca3..f6b271eacbef3a69315c0d7d78d01cdbc148c1ae 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h -@@ -93,6 +93,7 @@ class ChromeBrowsingDataRemoverDelegate +@@ -95,6 +95,7 @@ class ChromeBrowsingDataRemoverDelegate void OverrideDomainReliabilityClearerForTesting( DomainReliabilityClearer clearer); @@ -10,16 +10,16 @@ index dfd4d3320d41b1b55b59aa595aaa79da8a73b450..7f5dfeffac5793d41229feafa05208a9 private: using WebRtcEventLogManager = webrtc_event_logging::WebRtcEventLogManager; -@@ -146,11 +147,12 @@ class ChromeBrowsingDataRemoverDelegate - kWebAppHistory = 42, +@@ -149,11 +150,12 @@ class ChromeBrowsingDataRemoverDelegate kWebAuthnCredentials = 43, kWebrtcVideoPerfHistory = 44, -+ kIPFSCache = 45, + kMediaDeviceSalts = 45, ++ kIPFSCache = 46, // Please update ChromeBrowsingDataRemoverTasks in enums.xml and // History.ClearBrowsingData.Duration.ChromeTask.{Task} // in histograms/metadata/history/histograms.xml when adding entries! -- kMaxValue = kWebrtcVideoPerfHistory, +- kMaxValue = kMediaDeviceSalts, + kMaxValue = kIPFSCache, }; diff --git a/patches/chrome-browser-content_settings-page_specific_content_settings_delegate.cc.patch b/patches/chrome-browser-content_settings-page_specific_content_settings_delegate.cc.patch index a92a03c30994..c59fa5ed15a3 100644 --- a/patches/chrome-browser-content_settings-page_specific_content_settings_delegate.cc.patch +++ b/patches/chrome-browser-content_settings-page_specific_content_settings_delegate.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc -index a1ba301df353a21861bba1e8d2ed8d8b74333da0..21ffa49038e6dbfd03072318891b31d939b5ea96 100644 +index 329adc1de429b7fc7cb8479244a472768e7d7890..4d9dc70ac6c6472acea78b8e192ca9d88c76c331 100644 --- a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc +++ b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc -@@ -129,6 +129,7 @@ void GetGuestViewDefaultContentSettingRules( +@@ -170,6 +170,7 @@ void GetGuestViewDefaultContentSettingRules( ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK), std::string(), incognito)); diff --git a/patches/chrome-browser-download-download_target_determiner.cc.patch b/patches/chrome-browser-download-download_target_determiner.cc.patch index 57d2a26fb099..6be59020703d 100644 --- a/patches/chrome-browser-download-download_target_determiner.cc.patch +++ b/patches/chrome-browser-download-download_target_determiner.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc -index 4a297b7842a70f90d9f335291f58e7ac04cf0f4a..36a1b86ee8d6c6b75a4ccf0d6697ba0a059935f3 100644 +index 4aa1c174727044c92f8bf772c49c17d162d4dc25..d02a39cf83cd6e421f0642b981f10b4b6b4688dc 100644 --- a/chrome/browser/download/download_target_determiner.cc +++ b/chrome/browser/download/download_target_determiner.cc @@ -1256,6 +1256,7 @@ DownloadFileType::DangerLevel DownloadTargetDeterminer::GetDangerLevel( diff --git a/patches/chrome-browser-download-internal-android-BUILD.gn.patch b/patches/chrome-browser-download-internal-android-BUILD.gn.patch new file mode 100644 index 000000000000..943ff0ef7bff --- /dev/null +++ b/patches/chrome-browser-download-internal-android-BUILD.gn.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/download/internal/android/BUILD.gn b/chrome/browser/download/internal/android/BUILD.gn +index 09361f7e30a09edab1618d563788972ffed92a21..3889826c2d235e9e376af53b811e04d441b61b47 100644 +--- a/chrome/browser/download/internal/android/BUILD.gn ++++ b/chrome/browser/download/internal/android/BUILD.gn +@@ -200,6 +200,7 @@ android_resources("java_resources") { + "java/res/values/ids.xml", + "java/res/values/styles.xml", + ] ++ sources += brave_download_internal_java_resources + + deps = [ + "//chrome/browser/download/android:java_resources", diff --git a/patches/chrome-browser-extensions-BUILD.gn.patch b/patches/chrome-browser-extensions-BUILD.gn.patch index e62cc37e35d7..76657cf62270 100644 --- a/patches/chrome-browser-extensions-BUILD.gn.patch +++ b/patches/chrome-browser-extensions-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn -index 51ffd40dbf0a0bcdb0d39b4f717c0eafb856f9c7..a488bd8e03e8b33864bbfceddec467e472e16382 100644 +index 913a49367abcca1523a782d248a454166b984f97..e545ac85598e11b195c9409d05641b1e5c30cc0e 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -1397,6 +1397,7 @@ static_library("extensions") { +@@ -1402,6 +1402,7 @@ static_library("extensions") { } else { sources += [ "api/braille_display_private/braille_controller_stub.cc" ] } diff --git a/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch b/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch index 3e11c635f450..4c049e5b3dc7 100644 --- a/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch +++ b/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc -index d1051e2fa6f6e0117a60df5563e8c9d9213d07cd..fee295a9600da81e7433c550a391df7eb69f982e 100644 +index ad388123c6548a639b7efa35e8404dda53915684..2ac0a421f379938208020893ec63edcc0d1aec4d 100644 --- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc +++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc -@@ -638,6 +638,7 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper( +@@ -643,6 +643,7 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper( info->incognito_access.is_enabled = util::CanBeIncognitoEnabled(&extension); info->incognito_access.is_active = util::IsIncognitoEnabled(extension.id(), browser_context_); + BRAVE_CREATE_EXTENSION_INFO_HELPER - // Install warnings, but only if unpacked, the error console isn't enabled - // (otherwise it shows these), and we're in developer mode (normal users don't + // Safety check warning acknowledge status. + extension_prefs_->ReadPrefAsBoolean( diff --git a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch index 65aef16148bc..3f8a37ee87f6 100644 --- a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch +++ b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -index 87dc7d1caae87df92225a74c8a0ca5f187c21c32..940345f806e3bf7c4b57646c8e2221f41e883c70 100644 +index 0447095518189c3e27ba372e40a06c2f5e34969e..5d1843efd03b974e11fcf33804d818b0194c6673 100644 --- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc +++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -@@ -170,6 +170,7 @@ ExtensionFunction::ResponseAction IdentityGetAuthTokenFunction::Run() { +@@ -171,6 +171,7 @@ ExtensionFunction::ResponseAction IdentityGetAuthTokenFunction::Run() { // From here on out, results must be returned asynchronously. StartAsyncRun(); @@ -10,7 +10,7 @@ index 87dc7d1caae87df92225a74c8a0ca5f187c21c32..940345f806e3bf7c4b57646c8e2221f4 if (gaia_id.empty() || IsPrimaryAccountOnly()) { // Try the primary account. // TODO(https://crbug.com/932400): collapse the asynchronicity -@@ -393,10 +394,12 @@ void IdentityGetAuthTokenFunction::StartSigninFlow() { +@@ -394,10 +395,12 @@ void IdentityGetAuthTokenFunction::StartSigninFlow() { void IdentityGetAuthTokenFunction::StartMintTokenFlow( IdentityMintRequestQueue::MintType type) { #if !BUILDFLAG(IS_CHROMEOS) diff --git a/patches/chrome-browser-extensions-extension_tab_util.cc.patch b/patches/chrome-browser-extensions-extension_tab_util.cc.patch index 4a122dffe4f0..2cfb3e15f1cf 100644 --- a/patches/chrome-browser-extensions-extension_tab_util.cc.patch +++ b/patches/chrome-browser-extensions-extension_tab_util.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc -index 7cb58a2986602aaa5076ff4ca0dfe9b6cf87e4d3..6e6d847f5b13cdc997849498757cc1522376ca95 100644 +index 8bb7f129cc9affbaac244097351f8a2b90d90919..9eef77b6b2b4c99ce1d2f63c4973c68d164ddf20 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc -@@ -804,6 +804,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { - }; +@@ -805,6 +805,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { + } - if (!url.SchemeIs(content::kChromeUIScheme)) -+ if (!url.SchemeIs(content::kBraveUIScheme)) + if (!url.SchemeIs(content::kChromeUIScheme)) { ++ if (!url.SchemeIs(content::kBraveUIScheme)) return false; + } - return base::Contains(kill_hosts, url.host_piece()); diff --git a/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch b/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch index a1e1c86da245..a52ce665d0ff 100644 --- a/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch +++ b/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch @@ -1,13 +1,13 @@ diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc -index e0acf5eccef5aef764ca21245fd8065a552445c6..017b3769fed4c70f17bbbb7fe437d4c01ad3300d 100644 +index 5d0b30ab58c344e5a1c4220ea5b5de6b08104933..cf4bd77edf5cba3ff5e9a069c04c805053210414 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc -@@ -345,7 +345,7 @@ ExternalProtocolHandler::BlockState ExternalProtocolHandler::GetBlockState( - // Always allow the hard-coded allowed schemes. - for (size_t i = 0; i < std::size(kAllowedSchemes); ++i) { - if (kAllowedSchemes[i] == scheme) +@@ -371,7 +371,7 @@ ExternalProtocolHandler::BlockState ExternalProtocolHandler::GetBlockState( + if (candidate == scheme) { + base::UmaHistogramEnumeration(kBlockStateMetric, + BlockStateMetric::kAllowedDefaultMail); - return DONT_BLOCK; + return UNKNOWN; + } } - - PrefService* profile_prefs = profile->GetPrefs(); + for (const auto* candidate : kNewsSchemes) { diff --git a/patches/chrome-browser-flags-BUILD.gn.patch b/patches/chrome-browser-flags-BUILD.gn.patch index 888f06bca444..6e2afdfda736 100644 --- a/patches/chrome-browser-flags-BUILD.gn.patch +++ b/patches/chrome-browser-flags-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn -index be222f2e653148a7cd28c2c353cd6137f2855555..21589a3af5f4f7c270a831cea0eed9d330e09c78 100644 +index b82191200961c5cadc81dca83b0600cea1072bc6..5d15920b6bce55f771b493927cfb87f865a171ce 100644 --- a/chrome/browser/flags/BUILD.gn +++ b/chrome/browser/flags/BUILD.gn -@@ -34,6 +34,7 @@ android_library("java") { +@@ -33,6 +33,7 @@ android_library("java") { "//third_party/android_deps:guava_android_java", "//third_party/androidx:androidx_annotation_annotation_java", ] diff --git a/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch b/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch index 3b3dfc2794f0..bfd69463f567 100644 --- a/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch +++ b/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm -index 268856f9d89b83b9815e0ec5522d0060e1e9538c..8d6a11fe555734b2d4fb60664050a4ada00a5f8b 100644 +index 6c62ab97045c8db9666fe68096ebc7f216680435..c60c0ec280575dd21e8c1eff71226780218145e9 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac.mm -@@ -153,6 +153,7 @@ const std::vector& GetShortcutsNotPresentInMainMenu() { +@@ -149,6 +149,7 @@ const std::vector& GetShortcutsNotPresentInMainMenu() { {true, false, false, true, kVK_DownArrow, IDC_FOCUS_NEXT_PANE}, {true, false, false, true, kVK_UpArrow, IDC_FOCUS_PREVIOUS_PANE}, {true, true, false, true, kVK_ANSI_A, IDC_FOCUS_INACTIVE_POPUP_FOR_ACCESSIBILITY}, diff --git a/patches/chrome-browser-incognito-BUILD.gn.patch b/patches/chrome-browser-incognito-BUILD.gn.patch index c1f8c642756f..43d29ee29450 100644 --- a/patches/chrome-browser-incognito-BUILD.gn.patch +++ b/patches/chrome-browser-incognito-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/incognito/BUILD.gn b/chrome/browser/incognito/BUILD.gn -index eccefc91c69b95f6401baec6c092ed1289fd2533..9a1b28337d36275a8cc0fdb1781b13b906a0b302 100644 +index b6c611172ac34551196ae8b647eb06773340aece..47d105e70e1cc3b32d8f3ce49de215dcb6073539 100644 --- a/chrome/browser/incognito/BUILD.gn +++ b/chrome/browser/incognito/BUILD.gn -@@ -62,6 +62,7 @@ android_library("java") { +@@ -63,6 +63,7 @@ android_library("java") { "//url:gurl_java", ] diff --git a/patches/chrome-browser-net-profile_network_context_service.cc.patch b/patches/chrome-browser-net-profile_network_context_service.cc.patch index b4de8673f0ff..02ff20802b65 100644 --- a/patches/chrome-browser-net-profile_network_context_service.cc.patch +++ b/patches/chrome-browser-net-profile_network_context_service.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc -index 2795ff21d23b819dde4a324d522e0a954955860a..ac7d5321322decb65a48ca5e7334a911153c8797 100644 +index e45e4487be0a3f2137bae0f4b96980507e4f4204..342c16d67e8f1cffde4e8dfca7146061bfbb3a96 100644 --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc -@@ -491,6 +491,7 @@ network::mojom::CTPolicyPtr ProfileNetworkContextService::GetCTPolicy() { +@@ -515,6 +515,7 @@ network::mojom::CTPolicyPtr ProfileNetworkContextService::GetCTPolicy() { std::vector excluded_legacy_spkis( TranslateStringArray(ct_excluded_legacy_spkis)); diff --git a/patches/chrome-browser-net-proxy_config_monitor.cc.patch b/patches/chrome-browser-net-proxy_config_monitor.cc.patch index 19a792fe9dc6..7be02c46a90b 100644 --- a/patches/chrome-browser-net-proxy_config_monitor.cc.patch +++ b/patches/chrome-browser-net-proxy_config_monitor.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc -index 6dc5622f50847e35d66eff8b34b4888aa6c4ca90..198d824d63659e32aa6e1ebe630e58ae5de7a74c 100644 +index c9281f7abfbdeaa4f0d9fe3c199b34fcb5acaf2c..4bd06d22bad8f82a1733eda4b20d290ba498bbe1 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc -@@ -53,6 +53,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { +@@ -52,6 +52,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { profile->GetPrefs(), g_browser_process->local_state()); } diff --git a/patches/chrome-browser-net-system_network_context_manager.cc.patch b/patches/chrome-browser-net-system_network_context_manager.cc.patch index 6c8ff694cd83..cba2b3e29733 100644 --- a/patches/chrome-browser-net-system_network_context_manager.cc.patch +++ b/patches/chrome-browser-net-system_network_context_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc -index 35ad09af3e071c9d0a05d0ae967e4ee04cfe2f07..d0967a2a4b2e18cc5cefc9c39b9d5227e7586fbe 100644 +index 0f33b0c21ece0a13c746c4a12eb55a875d87ebe5..a68cdc51f3da332cd3ea53ff5a7cafd0f6ee358c 100644 --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -298,7 +298,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem +@@ -347,7 +347,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem if (!manager_) return; manager_->GetURLLoaderFactory()->CreateLoaderAndStart( diff --git a/patches/chrome-browser-notifications-BUILD.gn.patch b/patches/chrome-browser-notifications-BUILD.gn.patch index dff06cb199d6..68294f827679 100644 --- a/patches/chrome-browser-notifications-BUILD.gn.patch +++ b/patches/chrome-browser-notifications-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/notifications/BUILD.gn b/chrome/browser/notifications/BUILD.gn -index 9f8f270d738559ca91a892988a5c4a39fe3b5778..c4b5dc98f3ce03c797b57694149b86e8ac5268c7 100644 +index 249433c797fde787e52689f1a9b8dc672a4bcbbe..2f4d62ac0ad3df6ccacecdd8e6ecdf8766411b61 100644 --- a/chrome/browser/notifications/BUILD.gn +++ b/chrome/browser/notifications/BUILD.gn @@ -82,6 +82,7 @@ if (is_android) { diff --git a/patches/chrome-browser-preferences-BUILD.gn.patch b/patches/chrome-browser-preferences-BUILD.gn.patch index 19b38beb9029..5d2011e3fe9d 100644 --- a/patches/chrome-browser-preferences-BUILD.gn.patch +++ b/patches/chrome-browser-preferences-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/preferences/BUILD.gn b/chrome/browser/preferences/BUILD.gn -index e0257b2da7ce00206e541cbe3e6092b3861fa775..d039e0c52fcb39ef0d7e8b15c57eeb66036d28ed 100644 +index d15a889535f7c1679dad73cf382c62f2d6250af3..224e69136cfeef8235e963717bcd90b539eec645 100644 --- a/chrome/browser/preferences/BUILD.gn +++ b/chrome/browser/preferences/BUILD.gn @@ -29,6 +29,7 @@ android_library("java") { diff --git a/patches/chrome-browser-prefs-browser_prefs.cc.patch b/patches/chrome-browser-prefs-browser_prefs.cc.patch index b6552191adc0..656a7fe16e37 100644 --- a/patches/chrome-browser-prefs-browser_prefs.cc.patch +++ b/patches/chrome-browser-prefs-browser_prefs.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index af2d036f0b354af7b9e018325c2ec2d1a9da8fdb..45c59a927201e5ae166dc7a3b6018e31d0588a32 100644 +index 1944adea64d4cd10e6d70f69f3ad193b524669e0..9d21d29b3b9d342ca603efb38d7983b893da7f62 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1528,6 +1528,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1626,6 +1626,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry); #endif @@ -11,10 +11,10 @@ index af2d036f0b354af7b9e018325c2ec2d1a9da8fdb..45c59a927201e5ae166dc7a3b6018e31 #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) screen_ai::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) -@@ -1929,6 +1931,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - prefs::kAccessibilityPdfOcrAlwaysActive, false, - user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) +@@ -2036,6 +2038,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + #if BUILDFLAG(IS_CHROMEOS_ASH) + registry->RegisterBooleanPref(kClearUserDataDir1Pref, false); + #endif + brave::RegisterProfilePrefs(registry); } diff --git a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch index e7e739ed5c91..a259ea136bf3 100644 --- a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch +++ b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 7f04636806afe3225aebb2e2e8ac6ca31089720e..b2338be312fbbd1a3a7ac27498924ca70d9f6890 100644 +index 9e9372e1b3b7fb80c7cc218a817dc9eedcd52ef5..1ec1d9d958d35bb512115a9e1b5e5f7bcd336c1c 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -2117,6 +2117,7 @@ void RenderViewContextMenu::AppendSearchProvider() { +@@ -2136,6 +2136,7 @@ void RenderViewContextMenu::AppendSearchProvider() { selection_navigation_url_ = match.destination_url; if (!selection_navigation_url_.is_valid()) return; diff --git a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch index 24046eef121b..1e8f322362d2 100644 --- a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch +++ b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h -index 0cbc7b7181130e21d393825c5440ae4112456ccf..46266026cbfcfbccc5c75e81f84837d2837ccd37 100644 +index 88034ab23482766ea9483cc0e9a92e0742d48832..8af532121329c9e93f6fd04b0be6c02ef6846486 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -185,6 +185,7 @@ class RenderViewContextMenu +@@ -191,6 +191,7 @@ class RenderViewContextMenu // Returns true if keyboard lock is active and requires the user to press and // hold escape to exit exclusive access mode. bool IsPressAndHoldEscRequiredToExitFullscreen() const; diff --git a/patches/chrome-browser-resources-downloads-downloads.ts.patch b/patches/chrome-browser-resources-downloads-downloads.ts.patch index c5deec4e1c40..8988da322f91 100644 --- a/patches/chrome-browser-resources-downloads-downloads.ts.patch +++ b/patches/chrome-browser-resources-downloads-downloads.ts.patch @@ -1,12 +1,11 @@ diff --git a/chrome/browser/resources/downloads/downloads.ts b/chrome/browser/resources/downloads/downloads.ts -index 0b05e22165c61dcb57aeeb46f251f697a6514978..195dd8bd5e2ea55c911da2f8a02f113db294f438 100644 +index 0b05e22165c61dcb57aeeb46f251f697a6514978..2b41f68fdfde55be0b43e9c5c44a1cfa4d030db2 100644 --- a/chrome/browser/resources/downloads/downloads.ts +++ b/chrome/browser/resources/downloads/downloads.ts -@@ -2,6 +2,8 @@ +@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -+import 'chrome://resources/brave/polymer_overriding.js' +import './brave_overrides/index.js'; import './manager.js'; diff --git a/patches/chrome-browser-resources-extensions-item_list.html.patch b/patches/chrome-browser-resources-extensions-item_list.html.patch index 436b4b70664f..fb9e9a1db2f6 100644 --- a/patches/chrome-browser-resources-extensions-item_list.html.patch +++ b/patches/chrome-browser-resources-extensions-item_list.html.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/extensions/item_list.html b/chrome/browser/resources/extensions/item_list.html -index 49a48fa68bad67c2f756d895867745e9413179c2..3b106c2d2604653e881a108f07cc55567a6f2233 100644 +index 807d3076ee961265bd6b80796d2596fd25a35361..d017c312c519a325566b8b2d0ccea2a620e01eff 100644 --- a/chrome/browser/resources/extensions/item_list.html +++ b/chrome/browser/resources/extensions/item_list.html -@@ -129,5 +129,6 @@ +@@ -147,5 +147,6 @@ diff --git a/patches/chrome-browser-resources-extensions-item_list.ts.patch b/patches/chrome-browser-resources-extensions-item_list.ts.patch index 88c925c8cc1e..955e1719dec9 100644 --- a/patches/chrome-browser-resources-extensions-item_list.ts.patch +++ b/patches/chrome-browser-resources-extensions-item_list.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/extensions/item_list.ts b/chrome/browser/resources/extensions/item_list.ts -index c50ddec2b618afe0f5e13403b5180f6a584a5305..306a7891c6811331ad6e919c8e072eb0e2484541 100644 +index 6d6862a0ef20c8b88d3f1d0055bfb7df0d41c4c1..6792e05cbec9985f5b1f5c30dd1fc064d1fe2fd2 100644 --- a/chrome/browser/resources/extensions/item_list.ts +++ b/chrome/browser/resources/extensions/item_list.ts @@ -14,6 +14,7 @@ import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bu diff --git a/patches/chrome-browser-resources-extensions-sidebar.html.patch b/patches/chrome-browser-resources-extensions-sidebar.html.patch index 70cb1503bafb..507243de3b9b 100644 --- a/patches/chrome-browser-resources-extensions-sidebar.html.patch +++ b/patches/chrome-browser-resources-extensions-sidebar.html.patch @@ -1,17 +1,17 @@ diff --git a/chrome/browser/resources/extensions/sidebar.html b/chrome/browser/resources/extensions/sidebar.html -index 2c382510c9613dac74e0b137989533967ed1e8e8..805339dd6f617233f7c49f7fa939bf2bb4c7f28f 100644 +index 103812bf71f80ee9acf18cca78adece8b7f87c0b..8fd83fc0cd43622a4d0a1929043e49b2dd83ce7f 100644 --- a/chrome/browser/resources/extensions/sidebar.html +++ b/chrome/browser/resources/extensions/sidebar.html -@@ -77,6 +77,7 @@ +@@ -72,6 +72,7 @@
+ diff --git a/patches/chrome-browser-resources-history-history.ts.patch b/patches/chrome-browser-resources-history-history.ts.patch index 7a56b90b5de9..429d474e45ec 100644 --- a/patches/chrome-browser-resources-history-history.ts.patch +++ b/patches/chrome-browser-resources-history-history.ts.patch @@ -1,12 +1,11 @@ diff --git a/chrome/browser/resources/history/history.ts b/chrome/browser/resources/history/history.ts -index 70742f191d94b436b8be1d55f4c2549d753d66b7..b0d823b5e5a5dee8529923158d5f77d06f39c1a0 100644 +index 70742f191d94b436b8be1d55f4c2549d753d66b7..4eab517cafeee02e5397bf4abb2c904c3bc33ecd 100644 --- a/chrome/browser/resources/history/history.ts +++ b/chrome/browser/resources/history/history.ts -@@ -2,6 +2,8 @@ +@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -+import 'chrome://resources/brave/polymer_overriding.js' +import './brave_overrides/index.js'; import './app.js'; diff --git a/patches/chrome-browser-resources-password_manager-BUILD.gn.patch b/patches/chrome-browser-resources-password_manager-BUILD.gn.patch new file mode 100644 index 000000000000..ed1bca533fa2 --- /dev/null +++ b/patches/chrome-browser-resources-password_manager-BUILD.gn.patch @@ -0,0 +1,10 @@ +diff --git a/chrome/browser/resources/password_manager/BUILD.gn b/chrome/browser/resources/password_manager/BUILD.gn +index 677c2e90e2b74fce4098f8ae29dadcdcbe9e312b..6d32518dec00ee96c4cc6d8a4c707eee1b482aeb 100644 +--- a/chrome/browser/resources/password_manager/BUILD.gn ++++ b/chrome/browser/resources/password_manager/BUILD.gn +@@ -134,4 +134,5 @@ build_webui("build") { + "$root_gen_dir/chrome/browser/resources/settings_shared/tsc", + root_build_dir) ] + } ++ import("//brave/browser/resources/password_manager/sources.gni") non_web_component_files += brave_password_manager_non_web_component_files exclude_ts_preprocess_files = brave_password_manager_ts_local_files preprocess_deps = brave_password_manager_preprocess_extra_deps + } diff --git a/patches/chrome-browser-resources-password_manager-password_manager.ts.patch b/patches/chrome-browser-resources-password_manager-password_manager.ts.patch new file mode 100644 index 000000000000..de517984919e --- /dev/null +++ b/patches/chrome-browser-resources-password_manager-password_manager.ts.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/resources/password_manager/password_manager.ts b/chrome/browser/resources/password_manager/password_manager.ts +index 00636b8e4f0aabe012d5c4cd4d18c55b7962334c..125db9abd26c25489bf0f932d58237ca46ae96ef 100644 +--- a/chrome/browser/resources/password_manager/password_manager.ts ++++ b/chrome/browser/resources/password_manager/password_manager.ts +@@ -2,6 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++import './brave_overrides/index.js'; + import './password_manager_app.js'; + + export {SettingsPrefsElement} from 'chrome://resources/cr_components/settings_prefs/prefs.js'; diff --git a/patches/chrome-browser-resources-password_manager-shared_style.css.patch b/patches/chrome-browser-resources-password_manager-shared_style.css.patch new file mode 100644 index 000000000000..6c2f0f3852cf --- /dev/null +++ b/patches/chrome-browser-resources-password_manager-shared_style.css.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/resources/password_manager/shared_style.css b/chrome/browser/resources/password_manager/shared_style.css +index d150fd2b8f713231a4453b9e760ab80b963ebc40..b4817eba5918a5cab874bc95d76b5a9f8ba7163e 100644 +--- a/chrome/browser/resources/password_manager/shared_style.css ++++ b/chrome/browser/resources/password_manager/shared_style.css +@@ -6,6 +6,7 @@ + * #type=style + * #import=./shared_vars.css.js + * #import=chrome://resources/cr_elements/cr_shared_vars.css.js ++ * #include=br-shared-style + * #css_wrapper_metadata_end */ + + .card { diff --git a/patches/chrome-browser-resources-settings-BUILD.gn.patch b/patches/chrome-browser-resources-settings-BUILD.gn.patch index f9f8d9b6c879..19e1cdb8c77e 100644 --- a/patches/chrome-browser-resources-settings-BUILD.gn.patch +++ b/patches/chrome-browser-resources-settings-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn -index d86fe848aded1075c0285fa1dadda0aab7af7c23..f59c7339b4a4761e04638bb55e334f00c108ed1e 100644 +index e37a0086c59da1c03f3ad0339add090a597b8ec7..445ba9768978e637627dc93d90871f6ede127eee 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn -@@ -450,4 +450,5 @@ build_webui("build") { +@@ -437,4 +437,5 @@ build_webui("build") { "$root_gen_dir/chrome/browser/resources/settings_shared/tsc", root_build_dir) ] } diff --git a/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch b/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch index 37ce3f72ee58..77fe4d47677a 100644 --- a/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch +++ b/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/people_page/sync_controls.ts b/chrome/browser/resources/settings/people_page/sync_controls.ts -index 82390e59a178d861873c2b969bcf2a4d7345df40..c3392ddbe48991405579fd44ad1df0163a8edc0c 100644 +index d9cecedc93ded3eecb1913c81710ed4470b94209..a0bbf205aee9291f6f9b34a451091420b38a1d9a 100644 --- a/chrome/browser/resources/settings/people_page/sync_controls.ts +++ b/chrome/browser/resources/settings/people_page/sync_controls.ts @@ -118,7 +118,7 @@ export class SettingsSyncControlsElement extends diff --git a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch index 264a62d1bedc..360885070a24 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/personalization_options.ts b/chrome/browser/resources/settings/privacy_page/personalization_options.ts -index 7be2ad2e49fe5544c8534f3f108f1ec8752e7b5d..60130b6f217597ee3a7cc8608dac63bff82c1ae7 100644 +index 4fd564ebb19be9fdb8f545a21e5fe1492313dc0c..d9572759a91d65a09a93dd43f804c1d01b8f6844 100644 --- a/chrome/browser/resources/settings/privacy_page/personalization_options.ts +++ b/chrome/browser/resources/settings/privacy_page/personalization_options.ts @@ -71,7 +71,7 @@ export class SettingsPersonalizationOptionsElement extends diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch index 5afbb0a554df..50e5c1551da4 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html -index 7f6f1a5382aff11bf9f1578890402954a98c4826..aa946bb3fa3f7a96fc99e65958a875e7d607b9b8 100644 +index d1c96ab670f42622b85b0f6aa36091a7cbf968bc..a570cb04efcf88666e9c6e236bda9798fbcade66 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html @@ -34,6 +34,7 @@ @@ -10,7 +10,7 @@ index 7f6f1a5382aff11bf9f1578890402954a98c4826..aa946bb3fa3f7a96fc99e65958a875e7 @@ -18,7 +18,7 @@ index 7f6f1a5382aff11bf9f1578890402954a98c4826..aa946bb3fa3f7a96fc99e65958a875e7 diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch index 6d25eb1d903b..5f1fd104dae8 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/chrome/browser/resources/settings/privacy_page/privacy_page.ts -index ea117e5584e2f8e6d0ca46b63fe1b980e58d8d79..d52020e45a4aa72a230adb5eac34b2533df6bf29 100644 +index 76c7d5d0170355daab2a4546da607bf8201af4eb..f7995ceef9a04b10a02f38af07b530d4b815ed4b 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts @@ -18,6 +18,7 @@ import '../settings_page/settings_animated_pages.js'; diff --git a/patches/chrome-browser-resources-settings-route.ts.patch b/patches/chrome-browser-resources-settings-route.ts.patch index 8715a5e93775..0d794f23fd7f 100644 --- a/patches/chrome-browser-resources-settings-route.ts.patch +++ b/patches/chrome-browser-resources-settings-route.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts -index bc580a9b37080f6468807dc8b2599881671f8d30..0b2afdacaba6ae413c6746e5b3effcb9c636d198 100644 +index f0b4905379d30a14a937b2212c1d2caa8ef50704..114423bb60359171053c1a94e1bc4660e3bd4ae3 100644 --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts @@ -8,6 +8,7 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; @@ -10,7 +10,7 @@ index bc580a9b37080f6468807dc8b2599881671f8d30..0b2afdacaba6ae413c6746e5b3effcb9 /** * Add all of the child routes that originate from the privacy route, * regardless of whether the privacy section under basic or advanced. -@@ -288,6 +289,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes { +@@ -278,6 +279,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes { } // } diff --git a/patches/chrome-browser-resources-settings-router.ts.patch b/patches/chrome-browser-resources-settings-router.ts.patch index 23196bdcc8de..60203fc04212 100644 --- a/patches/chrome-browser-resources-settings-router.ts.patch +++ b/patches/chrome-browser-resources-settings-router.ts.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/settings/router.ts b/chrome/browser/resources/settings/router.ts -index f8b2a426544a1b985fe2e00735fdd8e66458d3ab..bf1178d021516caad6d36cdd6c968eacb23f311e 100644 +index 18d787f7f1a13b7a903021598c442a5147f19cc1..38d83dde5ee1f7b8f783f34994aaf61fc91400fb 100644 --- a/chrome/browser/resources/settings/router.ts +++ b/chrome/browser/resources/settings/router.ts -@@ -105,6 +105,7 @@ export interface SettingsRoutes { +@@ -101,6 +101,7 @@ export interface SettingsRoutes { SYNC_ADVANCED: Route; SYSTEM: Route; TRIGGERED_RESET_DIALOG: Route; diff --git a/patches/chrome-browser-resources-settings-settings.ts.patch b/patches/chrome-browser-resources-settings-settings.ts.patch index 0d997d4ed579..dd617671cbc3 100644 --- a/patches/chrome-browser-resources-settings-settings.ts.patch +++ b/patches/chrome-browser-resources-settings-settings.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/settings.ts b/chrome/browser/resources/settings/settings.ts -index 3e1e355377ed6eeaab3315050ac4ff6c4fd20403..612f17c08f48a043786c0936d313dbe55189f5ed 100644 +index d8783de1b83335f8dd295e1f53d3c4752a531a5c..ecb90e239e9727a2c0c3ca8585c4ebfe0ea2ea03 100644 --- a/chrome/browser/resources/settings/settings.ts +++ b/chrome/browser/resources/settings/settings.ts @@ -2,6 +2,7 @@ diff --git a/patches/chrome-browser-resources-settings-site_settings-constants.ts.patch b/patches/chrome-browser-resources-settings-site_settings-constants.ts.patch index 57ece3c71a1d..22a33d6dd5f9 100644 --- a/patches/chrome-browser-resources-settings-site_settings-constants.ts.patch +++ b/patches/chrome-browser-resources-settings-site_settings-constants.ts.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts -index ef3a8845cf320aafa20be168eca4d0f970199119..52d94449126d28f6aa4be753aa61194bb8419879 100644 +index 42a580a7eed0f49fc7251ef867c721a04a37d0bf..00331b98d9bd28c9ab11373b52edc4bd2a35d742 100644 --- a/chrome/browser/resources/settings/site_settings/constants.ts +++ b/chrome/browser/resources/settings/site_settings/constants.ts -@@ -52,6 +52,7 @@ export enum ContentSettingsTypes { +@@ -53,6 +53,7 @@ export enum ContentSettingsTypes { // are used everywhere where ContentSettingsTypes is used in JS. PDF_DOCUMENTS = 'pdfDocuments', SITE_DATA = 'site-data', diff --git a/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch b/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch index 38c9d13725a2..212dc780bb11 100644 --- a/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch +++ b/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -index eddbe04e23c927a69a637a7549c87c33cd582b75..daf2ebfb75402ebff103c09201d95ffcc7aa2849 100644 +index e06784e40d55666b75bb3e4207ce55366cb9c84b..415f8966d3175fa012728855719b89d5d831d175 100644 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts @@ -8,6 +8,7 @@ diff --git a/patches/chrome-browser-resources-signin-profile_customization-profile_customization_app.ts.patch b/patches/chrome-browser-resources-signin-profile_customization-profile_customization_app.ts.patch index 3b42c22fee53..621bde1d6b24 100644 --- a/patches/chrome-browser-resources-signin-profile_customization-profile_customization_app.ts.patch +++ b/patches/chrome-browser-resources-signin-profile_customization-profile_customization_app.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/signin/profile_customization/profile_customization_app.ts b/chrome/browser/resources/signin/profile_customization/profile_customization_app.ts -index 6a2576a30727b155ba6643bc9914cc95dea16f63..a159bc3a9a341b1fd749578fd489315e7bcfc0fb 100644 +index 3546cf3acdb7847c053b01005a1b3f154c441ef4..59983a4b271ff8e6513eb66c070a34f74f825702 100644 --- a/chrome/browser/resources/signin/profile_customization/profile_customization_app.ts +++ b/chrome/browser/resources/signin/profile_customization/profile_customization_app.ts @@ -2,6 +2,7 @@ @@ -8,5 +8,5 @@ index 6a2576a30727b155ba6643bc9914cc95dea16f63..a159bc3a9a341b1fd749578fd489315e +import 'chrome://resources/brave/polymer_overriding.js'; import 'chrome://resources/cr_components/customize_themes/customize_themes.js'; + import 'chrome://resources/cr_components/theme_color_picker/theme_color_picker.js'; import 'chrome://resources/cr_elements/cr_button/cr_button.js'; - import 'chrome://resources/cr_elements/cr_input/cr_input.js'; diff --git a/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch b/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch deleted file mode 100644 index d5dbc8d7b30e..000000000000 --- a/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html b/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html -index a376837bf66ec95609e0e5f3763fdf694d135b04..7b701374696c423df986d5c76428aee65b332354 100644 ---- a/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html -+++ b/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html -@@ -169,6 +169,7 @@ - #doneButton { - width : 32px; - } -+ .banner { visibility: hidden; } - - @media (forced-colors: none) { - #backButton { diff --git a/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch index 554b230e25e5..e774767d8d8e 100644 --- a/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch +++ b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts -index 0f0d5484537291e379d2ac041b4662df9e7320da..69c51f2e4031000b211473c78282892db23801d9 100644 +index a784f86abf49545002b951a890a4416a6f26b614..fae8a847f091a4a5807833b032aaa5211530431d 100644 --- a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts +++ b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts -@@ -95,6 +95,7 @@ export class ProfilePickerMainViewElement extends +@@ -101,6 +101,7 @@ export class ProfilePickerMainViewElement extends if (!isProfileCreationAllowed()) { this.$.addProfile.style.display = 'none'; } + this.$.addProfile.style.borderRadius = '8px'; this.addEventListener('view-enter-finish', this.onViewEnterFinish_); - } + diff --git a/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch b/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch index 5e6e99fa2e25..8342cdd6f2f3 100644 --- a/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch +++ b/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc -index b2dfcf36935bf11bb0eaf8b4f00588a37fee488a..fc3b731acb03b7fc07f74f2dbd2956e7d7deafb2 100644 +index bc867180d9429702b7613a3c2f7789949c936ea1..0e418fcf8b5782f81733f89b8433fe47815b2068 100644 --- a/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc +++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc -@@ -296,6 +296,7 @@ void CheckClientDownloadRequestBase::OnRequestBuilt( +@@ -290,6 +290,7 @@ void CheckClientDownloadRequestBase::OnRequestBuilt( std::unique_ptr request) { client_download_request_ = std::move(request); SanitizeRequest(); diff --git a/patches/chrome-browser-signin-account_consistency_mode_manager.cc.patch b/patches/chrome-browser-signin-account_consistency_mode_manager.cc.patch index 6ff57a09c668..5456954e19d2 100644 --- a/patches/chrome-browser-signin-account_consistency_mode_manager.cc.patch +++ b/patches/chrome-browser-signin-account_consistency_mode_manager.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc -index a7853cc014069560f3f21077243599d32364a4e5..5fd431fd299fbf8f8ab86c590854885c6f325f05 100644 +index c495783de021a0984e30edaef6227cdcbf783839..2704a2d7b09f5b2f6845deb080fc014f2c0df2ab 100644 --- a/chrome/browser/signin/account_consistency_mode_manager.cc +++ b/chrome/browser/signin/account_consistency_mode_manager.cc @@ -185,6 +185,7 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod( diff --git a/patches/chrome-browser-sync-sync_service_factory.cc.patch b/patches/chrome-browser-sync-sync_service_factory.cc.patch index 88e52212a4cf..dc293121fb5b 100644 --- a/patches/chrome-browser-sync-sync_service_factory.cc.patch +++ b/patches/chrome-browser-sync-sync_service_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/sync/sync_service_factory.cc b/chrome/browser/sync/sync_service_factory.cc -index 4d6fd63391bfdc8410a99c28e1c5fe752750ebb7..1ff9a9c392a16596645ae8007a95fe8c3fef28aa 100644 +index b86e3e287da427eb01465fba438e5c54a0e49799..5444ccfdc3c8e9f72cb88ef735f326c83ecf8608 100644 --- a/chrome/browser/sync/sync_service_factory.cc +++ b/chrome/browser/sync/sync_service_factory.cc -@@ -165,7 +165,7 @@ std::unique_ptr BuildSyncService( +@@ -170,7 +170,7 @@ std::unique_ptr BuildSyncService( } auto sync_service = diff --git a/patches/chrome-browser-themes-theme_service_factory.cc.patch b/patches/chrome-browser-themes-theme_service_factory.cc.patch index 84137958474a..9f2578ad129b 100644 --- a/patches/chrome-browser-themes-theme_service_factory.cc.patch +++ b/patches/chrome-browser-themes-theme_service_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc -index ebf39789109595eb74c7b1f10f2e9d01f4c0b01a..f97aa7deeacf9bbaa2bd84306d9686b532fe57b5 100644 +index 879bbeef4037b9292e6a563ee9deb3c73dabc247..5c149fce515c27f0177ec1c1bcb36451c950cdb7 100644 --- a/chrome/browser/themes/theme_service_factory.cc +++ b/chrome/browser/themes/theme_service_factory.cc -@@ -102,6 +102,7 @@ ThemeServiceFactory::~ThemeServiceFactory() = default; +@@ -103,6 +103,7 @@ ThemeServiceFactory::~ThemeServiceFactory() = default; KeyedService* ThemeServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { diff --git a/patches/chrome-browser-ui-BUILD.gn.patch b/patches/chrome-browser-ui-BUILD.gn.patch index 5754933d39bb..fc965dfa2ccf 100644 --- a/patches/chrome-browser-ui-BUILD.gn.patch +++ b/patches/chrome-browser-ui-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn -index d7bb16c28835bbfdf1d095ed743f621af5e2613f..5842a7e8588802604cec5b89215c136fbe9c5ce0 100644 +index cc4fbda7ddfa830909de196359217c82182331de..f725e33eb318d880b6001d64396151b77fc2ebf0 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -787,6 +787,7 @@ static_library("ui") { +@@ -694,6 +694,7 @@ static_library("ui") { "//chrome/browser/profiling_host", "//chrome/browser/ui/webui:configs", ] @@ -10,7 +10,7 @@ index d7bb16c28835bbfdf1d095ed743f621af5e2613f..5842a7e8588802604cec5b89215c136f if (enable_vr && is_win) { deps += [ "//chrome/browser/vr:vr_base" ] -@@ -4257,10 +4258,13 @@ static_library("ui") { +@@ -4296,10 +4297,13 @@ static_library("ui") { ] deps += [ "//chrome/updater/app/server/win:updater_legacy_idl_idl" ] } else { diff --git a/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch b/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch index 7501b23c706d..7c93dcd52203 100644 --- a/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch +++ b/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/BUILD.gn b/chrome/browser/ui/android/appmenu/internal/BUILD.gn -index 9a6496a110a8b5c8fc0eb7792eae158f1b87c8d5..814e8196b35bc45fa2e0f62a8822559e2ecf3ced 100644 +index 950d1b91a63ffb5d809b463e71e3a0bc3598b3a7..0ec2d6076f7de292cae054ab3ee8007cad48d464 100644 --- a/chrome/browser/ui/android/appmenu/internal/BUILD.gn +++ b/chrome/browser/ui/android/appmenu/internal/BUILD.gn @@ -21,6 +21,7 @@ android_library("java") { diff --git a/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch b/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch index b6563af94c5d..c3ce6984b1b7 100644 --- a/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch +++ b/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java -index 726e0f37df49b810365464eb41315cc5bf1cea5c..177b7f3dc52d44ac461d595ecdb6d5bef2754ea2 100644 +index 270267ef3fdd1680666fb757341b4b28e9bcd88b..c129c8542b7a3fe0251faf79702ed960e1c8a92e 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java @@ -219,6 +219,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler diff --git a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch index 3a99bab39b36..653e90635be5 100644 --- a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch +++ b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn -index 605b0ecb320195780296f59e28ec0a74707b4a91..0a969a3eccf60fdcd657832d22276b70db936bc2 100644 +index 74a50a599c2a5af1508e449a67be91adc7b865e1..3bc269d5c78fc376e9a557855e056f2b84548ea4 100644 --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn @@ -116,6 +116,7 @@ android_library("java") { diff --git a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch index ba365b44c5d2..fe5f69c72b12 100644 --- a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch +++ b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -index 9552479e7b8ed48d3ba3270b5e331160c14fa3ae..8bd4efb83f5b960f65f5bc1bf1e8732d6c76999a 100644 +index a8da4613ffecb0084870a6399a265de2ec7323ac..2563251f0b56941deb65d811ece74d75bdf49284 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -@@ -389,6 +389,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -397,6 +397,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC if (mOptionalButtonCoordinator != null) { mOptionalButtonCoordinator.setBackgroundColorFilter(color); } @@ -10,7 +10,7 @@ index 9552479e7b8ed48d3ba3270b5e331160c14fa3ae..8bd4efb83f5b960f65f5bc1bf1e8732d } private void updateModernLocationBarCorners() { -@@ -560,6 +561,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -568,6 +569,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC EventConstants.PARTNER_HOME_PAGE_BUTTON_PRESSED); } } @@ -18,7 +18,7 @@ index 9552479e7b8ed48d3ba3270b5e331160c14fa3ae..8bd4efb83f5b960f65f5bc1bf1e8732d } @Override -@@ -1011,6 +1013,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -1019,6 +1021,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC * New Tab Page. */ private void updateLocationBarLayoutForExpansionAnimation() { @@ -26,7 +26,7 @@ index 9552479e7b8ed48d3ba3270b5e331160c14fa3ae..8bd4efb83f5b960f65f5bc1bf1e8732d TraceEvent.begin("ToolbarPhone.updateLocationBarLayoutForExpansionAnimation"); if (isInTabSwitcherMode()) return; -@@ -1333,6 +1336,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -1358,6 +1361,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC canvas.restore(); } @@ -34,7 +34,7 @@ index 9552479e7b8ed48d3ba3270b5e331160c14fa3ae..8bd4efb83f5b960f65f5bc1bf1e8732d // Draw the tab stack button and associated text if necessary. if (mTabSwitcherAnimationTabStackDrawable != null && mToggleTabStackButton != null && mUrlExpansionFraction != 1f) { -@@ -2086,6 +2090,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -2111,6 +2115,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC } else { populateUrlClearExpansionAnimatorSet(animators); } diff --git a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch index 085800954f2c..634cc98955ed 100644 --- a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch +++ b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java -index ac497a8f2ce78152f3d5cab8df2d1961ec357545..28c2d06786a6b3475df6f79d1d76477f52aa9354 100644 +index ba62ac8e2b7e70109d30cf45a78d819af708d025..739bf1be65effc4c8660a1e6a94cb93d671fcd5f 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java @@ -375,10 +375,12 @@ public class ToolbarTablet diff --git a/patches/chrome-browser-ui-browser.cc.patch b/patches/chrome-browser-ui-browser.cc.patch index b8446d39a894..f7de5c7d5e2e 100644 --- a/patches/chrome-browser-ui-browser.cc.patch +++ b/patches/chrome-browser-ui-browser.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 9125b6d7e3e8771458eaa1675bf0dac8f53f7be2..7f8f6c43ba5d00d50193f62f3c92c2004e13b364 100644 +index c5aefe534dcd1a26cb9faef723e832b95b27eca4..a29ed9ca173f303cdee0456c049d77a8a8ff07d4 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -452,6 +452,7 @@ Browser* Browser::Create(const CreateParams& params) { +@@ -446,6 +446,7 @@ Browser* Browser::Create(const CreateParams& params) { // not possible, e.g. using the wrong profile or during shutdown. The caller // should handle this; see e.g. crbug.com/1141608 and crbug.com/1261628. CHECK_EQ(CreationStatus::kOk, GetCreationStatusForProfile(params.profile)); @@ -10,7 +10,7 @@ index 9125b6d7e3e8771458eaa1675bf0dac8f53f7be2..7f8f6c43ba5d00d50193f62f3c92c200 return new Browser(params); } -@@ -462,7 +463,7 @@ Browser::Browser(const CreateParams& params) +@@ -456,7 +457,7 @@ Browser::Browser(const CreateParams& params) window_(nullptr), tab_strip_model_delegate_( std::make_unique(this)), diff --git a/patches/chrome-browser-ui-browser_navigator.cc.patch b/patches/chrome-browser-ui-browser_navigator.cc.patch index cd3e922e61f8..683214ae6f91 100644 --- a/patches/chrome-browser-ui-browser_navigator.cc.patch +++ b/patches/chrome-browser-ui-browser_navigator.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc -index d4f4ba7efd1becb6e4e68ee363bb466d293a48a6..5e9642a73d792bcba7a1a989fd1626c8dd7b5583 100644 +index 88edd87bcb2d0bb6eb0cb2d9d9b281d6655cbb18..a7ca18e18acd35a8cb95b843ac24a1b2bcedf102 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -590,6 +590,7 @@ base::WeakPtr Navigate(NavigateParams* params) { @@ -10,7 +10,7 @@ index d4f4ba7efd1becb6e4e68ee363bb466d293a48a6..5e9642a73d792bcba7a1a989fd1626c8 // Open System Apps in their standalone window if necessary. // TODO(crbug.com/1096345): Remove this code after we integrate with intent -@@ -896,6 +897,7 @@ base::WeakPtr Navigate(NavigateParams* params) { +@@ -910,6 +911,7 @@ base::WeakPtr Navigate(NavigateParams* params) { bool IsHostAllowedInIncognito(const GURL& url) { std::string scheme = url.scheme(); base::StringPiece host = url.host_piece(); diff --git a/patches/chrome-browser-ui-browser_ui_prefs.cc.patch b/patches/chrome-browser-ui-browser_ui_prefs.cc.patch index 0bce05c84e74..7bfb138221ad 100644 --- a/patches/chrome-browser-ui-browser_ui_prefs.cc.patch +++ b/patches/chrome-browser-ui-browser_ui_prefs.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc -index 31af7b49a5d3f03a353df160050fabe84d48ed7a..df676d6c1faba5bf97e0a8e3a646502a4fce6c0f 100644 +index 28732e323ec2e105bcd6675e9e339d8343f21c86..e3c6a53062a02a3b16f445b8d8ab634a0c4e09ba 100644 --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc @@ -78,7 +78,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { diff --git a/patches/chrome-browser-ui-chrome_pages.cc.patch b/patches/chrome-browser-ui-chrome_pages.cc.patch index a88732a5c35a..7aeac58fc15f 100644 --- a/patches/chrome-browser-ui-chrome_pages.cc.patch +++ b/patches/chrome-browser-ui-chrome_pages.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc -index a5466937ff77f6591896919a2df969b833786ae4..be4d2e7ac9d003887a72b2037f358036fe0eb638 100644 +index b36ca5df10936fa6972d1e41adc769b0ad7a0b06..3ea029a73dee70ff8e3f5d678899fadfbd205f99 100644 --- a/chrome/browser/ui/chrome_pages.cc +++ b/chrome/browser/ui/chrome_pages.cc -@@ -340,7 +340,7 @@ void ShowSlow(Browser* browser) { +@@ -344,7 +344,7 @@ void ShowSlow(Browser* browser) { #endif } diff --git a/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch b/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch index 79ecfef87e9c..0f71719b0250 100644 --- a/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch +++ b/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/cocoa/main_menu_builder.mm b/chrome/browser/ui/cocoa/main_menu_builder.mm -index 710d4da0e72f99ecb7abbe758b8b4a5acd89a9fe..4f47c4059222010e45c46754cc693d8e2611dad2 100644 +index 698dc218f583dd0516f2deb386e2f0befa1290ef..6562e010879266b137bb57845aaf75da8259d2f3 100644 --- a/chrome/browser/ui/cocoa/main_menu_builder.mm +++ b/chrome/browser/ui/cocoa/main_menu_builder.mm -@@ -113,6 +113,7 @@ NSMenuItem* BuildFileMenu(NSApplication* nsapp, +@@ -109,6 +109,7 @@ NSMenuItem* BuildFileMenu(NSApplication* nsapp, Item(IDS_NEW_INCOGNITO_WINDOW_MAC) .command_id(IDC_NEW_INCOGNITO_WINDOW) .remove_if(is_pwa), @@ -10,7 +10,7 @@ index 710d4da0e72f99ecb7abbe758b8b4a5acd89a9fe..4f47c4059222010e45c46754cc693d8e Item(IDS_REOPEN_CLOSED_TABS_MAC) .command_id(IDC_RESTORE_TAB) .remove_if(is_pwa), -@@ -483,6 +484,7 @@ NSMenuItem* BuildHelpMenu(NSApplication* nsapp, +@@ -479,6 +480,7 @@ NSMenuItem* BuildHelpMenu(NSApplication* nsapp, #if BUILDFLAG(GOOGLE_CHROME_BRANDING) Item(IDS_FEEDBACK_MAC).command_id(IDC_FEEDBACK), #endif diff --git a/patches/chrome-browser-ui-color-BUILD.gn.patch b/patches/chrome-browser-ui-color-BUILD.gn.patch index b26ec6d6b614..ec73b7ff5726 100644 --- a/patches/chrome-browser-ui-color-BUILD.gn.patch +++ b/patches/chrome-browser-ui-color-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn -index 3dba3ad26c4770bfe4320625357b05b49f0e9c46..7a3db7510317c1c59af938d028b6da8e0d8d65f2 100644 +index 0b42bdc5e5e818deb52bc7fe5d476401bcbf77e9..245ad0a93320e5bce088bb195d19df2d0a05f567 100644 --- a/chrome/browser/ui/color/BUILD.gn +++ b/chrome/browser/ui/color/BUILD.gn -@@ -53,6 +53,7 @@ source_set("mixers") { +@@ -57,6 +57,7 @@ source_set("mixers") { "//ui/color:color", "//ui/color:mixers", ] diff --git a/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.cc.patch b/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.cc.patch index 319582552ab7..1cc03e1230d9 100644 --- a/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.cc.patch +++ b/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc -index f0be13b7a0a1f7644bbca96041289115a75f1385..ca227b463aedf3bbb6effa8b93327fa941363a47 100644 +index 2a4de33fb97a91c8835ff9e171946dedbcb96c4a..b1def6b8dc9f48cac528bb0893e609ccbb1fbc6c 100644 --- a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc +++ b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc -@@ -171,6 +171,7 @@ void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) { +@@ -190,6 +190,7 @@ void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) { gfx::ImageSkiaRep rep = skia.GetRepresentation(canvas->image_scale()); if (rep.scale() != canvas->image_scale()) { skia.AddRepresentation( @@ -10,7 +10,7 @@ index f0be13b7a0a1f7644bbca96041289115a75f1385..ca227b463aedf3bbb6effa8b93327fa9 ScaleImageSkiaRep(rep, extensions::ExtensionAction::ActionIconSize(), canvas->image_scale())); } -@@ -181,6 +182,7 @@ void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) { +@@ -200,6 +201,7 @@ void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) { (size().width() - extensions::ExtensionAction::ActionIconSize()) / 2.0); int y_offset = std::floor( (size().height() - extensions::ExtensionAction::ActionIconSize()) / 2.0); diff --git a/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch b/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch index 1021e8e213f5..df179f90052b 100644 --- a/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch +++ b/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc -index acc14f6a6d94a860f1ddf4022923a8f64d7f4dd6..c5522201cefc6ea3a068509a8b813a08861af9af 100644 +index d298f64756f263e7ad61573f33de1da35fa4883a..19ea349d295aaa273d898db7111e3601738cd652 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -395,6 +395,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch( +@@ -396,6 +396,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch( welcome_enabled = welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) diff --git a/patches/chrome-browser-ui-tab_helpers.cc.patch b/patches/chrome-browser-ui-tab_helpers.cc.patch index 9f904af7814c..359173df7a96 100644 --- a/patches/chrome-browser-ui-tab_helpers.cc.patch +++ b/patches/chrome-browser-ui-tab_helpers.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc -index b2b6330f5dbe5781919be02e933d1a115aef0399..a0b0fe8766451347c5901fe58cb635aed3e9df77 100644 +index 1ec9817a39d4a15fe1b97d23dd5d0898133756ed..2cf3fa328035d0b7f4d8bab9ecdf081856f98b0a 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -713,4 +713,5 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -743,4 +743,5 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { // This is common code for all of us. PLEASE DO YOUR PART to keep it tidy and // organized. diff --git a/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch b/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch index f1be36d75024..94ca5e004976 100644 --- a/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch +++ b/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h -index 0f19f2bbd945a49e3c5dce182fe6de16775e4c21..f83e4c13cada2be0b8b28f723c74cdcd41d918d3 100644 +index a584cad57ba3264f944b180072613d61cc201207..455a4f573d9198ef1b38721f67217dafb58187ae 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.h +++ b/chrome/browser/ui/tabs/tab_strip_model.h -@@ -581,6 +581,7 @@ class TabStripModel : public TabGroupController { +@@ -582,6 +582,7 @@ class TabStripModel : public TabGroupController { // Serialise this object into a trace. void WriteIntoTrace(perfetto::TracedValue context) const; diff --git a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.cc.patch b/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.cc.patch index fe0c4f551a4a..23dfb5093e48 100644 --- a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.cc.patch +++ b/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.cc.patch @@ -1,13 +1,12 @@ diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc -index e698cc345ad9c148382c431a07e12bac071d2237..dbb293dfeecccb465e8406768c8282ea32ae3608 100644 +index 3360fdefa3d26a7cc323d57743b02849d920ec2d..a5c4af887c48f11f7cffca56fc53d4263785a444 100644 --- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc +++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc -@@ -438,6 +438,8 @@ void RecentTabsSubMenuModel::BuildTabsFromOtherDevices() { - k < std::min(tabs_in_session.size(), kMaxTabsPerSessionToShow); ++k) { - BuildOtherDevicesTabItem(session_tag, *tabs_in_session[k]); - } // for all tabs in one session -+ -+ BRAVE_BUILD_TABS_FROM_OTHER_DEVICES +@@ -472,6 +472,7 @@ void RecentTabsSubMenuModel::BuildTabsFromOtherDevices() { + ++k) { + BuildOtherDevicesTabItem(this, session_tag, *tabs_in_session[k]); + } // for all tabs in one session ++ BRAVE_BUILD_TABS_FROM_OTHER_DEVICES + } ++num_sessions_added; } // for all sessions - diff --git a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.h.patch b/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.h.patch deleted file mode 100644 index edcc5f0c2b07..000000000000 --- a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h -index c39400b0dfcad06a4061da7bb3933691667dbf1e..2b9fe25a68efa941d92cb5131dbf63b7777bcbeb 100644 ---- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h -+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h -@@ -78,6 +78,7 @@ class RecentTabsSubMenuModel : public ui::SimpleMenuModel, - ui::Accelerator* accelerator) const override; - void ExecuteCommand(int command_id, int event_flags) override; - -+ BRAVE_RECENT_TABS_SUB_MENU_MODEL_H_ - private: - struct TabNavigationItem; - using TabNavigationItems = std::map; diff --git a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model_unittest.cc.patch b/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model_unittest.cc.patch index cf1547aa0353..1beebee606c1 100644 --- a/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model_unittest.cc.patch +++ b/patches/chrome-browser-ui-toolbar-recent_tabs_sub_menu_model_unittest.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc -index bfaa95d9bc1302d872b42f5c9750b36ea95c6a5f..319bc449e57307c471eb5f9fbab8b9687b10c5f1 100644 +index b12ca875746ef64c05cbc9a1de0769a8f3c65f47..b6631a139856938ce38c81d8ddefe0e3899d0ccb 100644 --- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc +++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc -@@ -554,6 +554,7 @@ TEST_F(RecentTabsSubMenuModelTest, MaxTabsPerSessionAndRecency) { +@@ -612,6 +612,7 @@ TEST_F(RecentTabsSubMenuModelTest, MaxTabsPerSessionAndRecency) { {ui::MenuModel::TYPE_COMMAND, true}, // // max tabs per sessions is 4, so only the 4 most tabs will show, // independent of which window they came from. diff --git a/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch b/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch index 6b99db0bb243..82fab4dedfd1 100644 --- a/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch +++ b/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc -index a5782751aa88915fe994c8efd2268ec1670b08e6..188941480c6f8bde7bef226ffd31df0759898ca6 100644 +index d29e63dcccce0d71542febb1144a6611e16d2957..9fdccb7619d79a972332fea547e1a31b839ef1e9 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc -@@ -1095,6 +1095,7 @@ void BookmarkBarView::Layout() { +@@ -1120,6 +1120,7 @@ void BookmarkBarView::Layout() { x = next_x; } } diff --git a/patches/chrome-browser-ui-views-bookmarks-bookmark_bubble_view.cc.patch b/patches/chrome-browser-ui-views-bookmarks-bookmark_bubble_view.cc.patch index 14dd1ed2731d..7ae7fe39db67 100644 --- a/patches/chrome-browser-ui-views-bookmarks-bookmark_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-views-bookmarks-bookmark_bubble_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc -index 8dfa343e77332d6139bc0dcebc72d7655b85a7fe..cf9697faa6514d513f84c2d866a90befea81b518 100644 +index 3209a9a3c8e195dc60f2a4920e78751bd781c312..8589b281f6077e814804260b53f91282a23cd188 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc -@@ -346,6 +346,7 @@ void BookmarkBubbleView::ShowBubble( +@@ -411,6 +411,7 @@ void BookmarkBubbleView::ShowBubble( dialog_model_builder.Build(), anchor_view, views::BubbleBorder::TOP_RIGHT); bookmark_bubble_ = bubble.get(); diff --git a/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch b/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch index 3d7ad7838fb1..59d58f733f03 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc -index 8fd6c6b955e7e170ee5c691e64e7cb24cad07749..7dfdde8ffd62de221aa967417e6ba75c72a7786c 100644 +index 83e19c00add9fb15101735925b279aedf45785ce..1fa7b9eb731c1b94d0f88d6f38600485737233aa 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -729,6 +729,7 @@ void LocationBarView::Layout() { +@@ -754,6 +754,7 @@ void LocationBarView::Layout() { } }; + BRAVE_LAYOUT_TRAILING_DECORATIONS - add_trailing_decoration(page_action_icon_container_); + add_trailing_decoration(page_action_icon_container_, + /*intra_item_padding=*/0); for (ContentSettingImageView* view : base::Reversed(content_setting_views_)) { - add_trailing_decoration(view); diff --git a/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch b/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch index 0bdcaa2e7c6b..dcc7775c18fa 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h -index 3b1d93cee8e3792734724a5e283c7e4b169ac4a0..466bfbfa3a0006959496e2c95fd54db93d38b895 100644 +index 6fd3631dc90b578ca1adaef3d69b97611734ebf0..a0ab959e60515842c5b7ee77edf7c822f737dfb7 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h @@ -109,6 +109,7 @@ class LocationBarView : public LocationBar, diff --git a/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch b/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch index b4467dca60c3..abc26658b324 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc -index f049ff08788fe6170dfd2ed3720e8d54ff58bb11..c14161f95ae338e9bea26f75111dfe760853e3a4 100644 +index 0c4e36949a5f6251fa25f1a4c5a2e66a5a26ee58..5b5c7c81a70cff2ef883123e123555ab1bdd2f51 100644 --- a/chrome/browser/ui/views/location_bar/location_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc -@@ -186,6 +186,7 @@ bool LocationIconView::GetShowText() const { +@@ -166,6 +166,7 @@ bool LocationIconView::GetShowText() const { const auto* location_bar_model = delegate_->GetLocationBarModel(); const GURL& url = location_bar_model->GetURL(); if (url.SchemeIs(content::kChromeUIScheme) || diff --git a/patches/chrome-browser-ui-views-omnibox-omnibox_popup_view_views.cc.patch b/patches/chrome-browser-ui-views-omnibox-omnibox_popup_view_views.cc.patch deleted file mode 100644 index a918a0486807..000000000000 --- a/patches/chrome-browser-ui-views-omnibox-omnibox_popup_view_views.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc -index 56747e2757ecdb2743d340b2e830b96df9f0ece0..114876bbdb05b59ca47329189d0c05438d056e0c 100644 ---- a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc -+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc -@@ -485,7 +485,7 @@ void OmniboxPopupViewViews::UpdateChildViews() { - if (children().size() == i) { - AddChildView(std::make_unique( - i, edit_model_, -- std::make_unique(this, edit_model_, i), -+ std::make_unique(this, edit_model_, i), - pref_service)); - } - diff --git a/patches/chrome-browser-ui-views-overlay-video_overlay_window_views.cc.patch b/patches/chrome-browser-ui-views-overlay-video_overlay_window_views.cc.patch index a0c03980d8e2..249b9aa4dcdf 100644 --- a/patches/chrome-browser-ui-views-overlay-video_overlay_window_views.cc.patch +++ b/patches/chrome-browser-ui-views-overlay-video_overlay_window_views.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 311d0835a9a713b3e8ec6f0061ef0867baed730e..eb60395147e8837c4998e342fe191677c9cd419f 100644 +index 9e5e40c912c00b70d921d422ce141cd9d4a5bcd3..1211fb980fc28cc3fa8a6805846288edb27b3fbd 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -@@ -639,6 +639,7 @@ void VideoOverlayWindowViews::UpdateMaxSize(const gfx::Rect& work_area) { +@@ -666,6 +666,7 @@ void VideoOverlayWindowViews::UpdateMaxSize(const gfx::Rect& work_area) { max_size_ = new_max_size; diff --git a/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch b/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch index ee2c38e6f62a..f8605153da3f 100644 --- a/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch +++ b/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc -index 9800155375fa4fb592a0e7ddc041b669b3f9bc98..7b8e1ca57504f9ca04238b057ed7095164b3793b 100644 +index f076917a8c9135f0c4c8cab129ee73fcbc3527f9..f4bf49cbe475d588f93d53e674657b238347b9d8 100644 --- a/chrome/browser/ui/views/page_info/page_info_main_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc -@@ -554,6 +554,7 @@ gfx::Size PageInfoMainView::CalculatePreferredSize() const { +@@ -507,6 +507,7 @@ gfx::Size PageInfoMainView::CalculatePreferredSize() const { if (site_settings_view_) { width = std::max(width, site_settings_view_->GetPreferredSize().width()); width = std::max(width, permissions_view_->GetPreferredSize().width()); diff --git a/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch b/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch index 2f1a96026ae6..5494e741e39d 100644 --- a/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch +++ b/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -index 3525faa7224099b6944a0cb6aaf929edd87e973c..cc7e514eb6b17af0c39aee848680ae2b885904e1 100644 +index c5a69cea384b4ab55b24dc9e16e499d45b4e1e88..5f09dbaff10ac0c1bc56dabac056972d8c7e8f03 100644 --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -@@ -397,6 +397,7 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -409,6 +409,7 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( const gfx::VectorIcon* icon = &gfx::kNoneIcon; switch (info.type) { diff --git a/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch b/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch index 86fae6932bfd..2e11fd0d98af 100644 --- a/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch +++ b/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc -index 849787d262d12abc3ee073ef360d9ced54731aba..7c67a68d6dd7c48698ccb73c9de17f970291a381 100644 +index eac30a8386acea27f7b3133b0480d3ab65e1d5ab..a6747fa7c17671d52f1196131e490d6fcbe4bea4 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc -@@ -240,6 +240,7 @@ SidePanelRegistry* SidePanelCoordinator::GetGlobalSidePanelRegistry( +@@ -247,6 +247,7 @@ SidePanelRegistry* SidePanelCoordinator::GetGlobalSidePanelRegistry( void SidePanelCoordinator::Show( absl::optional entry_id, absl::optional open_trigger) { @@ -10,7 +10,7 @@ index 849787d262d12abc3ee073ef360d9ced54731aba..7c67a68d6dd7c48698ccb73c9de17f97 if (entry_id.has_value()) { Show(SidePanelEntry::Key(entry_id.value()), open_trigger); } else { -@@ -700,6 +701,7 @@ std::unique_ptr SidePanelCoordinator::CreateHeader() { +@@ -737,6 +738,7 @@ std::unique_ptr SidePanelCoordinator::CreateHeader() { ChromeDistanceMetric::DISTANCE_SIDE_PANEL_HEADER_VECTOR_ICON_SIZE))); header_close_button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS); diff --git a/patches/chrome-browser-ui-views-tabs-new_tab_button.h.patch b/patches/chrome-browser-ui-views-tabs-new_tab_button.h.patch index 5a2e70c201f1..fff30ba4ca21 100644 --- a/patches/chrome-browser-ui-views-tabs-new_tab_button.h.patch +++ b/patches/chrome-browser-ui-views-tabs-new_tab_button.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/new_tab_button.h b/chrome/browser/ui/views/tabs/new_tab_button.h -index 6f882fa3f2a81d52408499fc4d12453428e63fd7..fe6405971c097ef23d9aad6e474fe85dd6ccdce8 100644 +index 924823dfd64f110824127144e9d47ae55c172aa9..866c0eda97c22756ced5e96a80b2fd0b5005295e 100644 --- a/chrome/browser/ui/views/tabs/new_tab_button.h +++ b/chrome/browser/ui/views/tabs/new_tab_button.h -@@ -49,6 +49,7 @@ class NewTabButton : public views::ImageButton, +@@ -50,6 +50,7 @@ class NewTabButton : public views::ImageButton, void AddLayerToRegion(ui::Layer* new_layer, views::LayerRegion region) override; void RemoveLayerFromRegions(ui::Layer* old_layer) override; diff --git a/patches/chrome-browser-ui-views-tabs-tab.cc.patch b/patches/chrome-browser-ui-views-tabs-tab.cc.patch index 8c8b25842b9f..ea5e209c67c0 100644 --- a/patches/chrome-browser-ui-views-tabs-tab.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc -index 4dd15dfd0464cf374c864406e116884284e3e468..b004345d84ef15c8310fe673d27268072cd09f00 100644 +index 6cfde5828cb0fbe1ea0c39d3bbec1267016b4eb5..f420905f286f5180be1ebcf36aa92b0802584034 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc -@@ -393,6 +393,7 @@ void Tab::Layout() { +@@ -402,6 +402,7 @@ void Tab::Layout() { int title_right = contents_rect.right(); if (showing_alert_indicator_) { title_right = alert_indicator_button_->x() - after_title_padding; @@ -10,7 +10,7 @@ index 4dd15dfd0464cf374c864406e116884284e3e468..b004345d84ef15c8310fe673d2726807 } else if (showing_close_button_) { // Allow the title to overlay the close button's empty border padding. title_right = close_x - after_title_padding; -@@ -1013,6 +1014,7 @@ void Tab::UpdateIconVisibility() { +@@ -1021,6 +1022,7 @@ void Tab::UpdateIconVisibility() { available_width -= favicon_width; showing_close_button_ = large_enough_for_close_button; diff --git a/patches/chrome-browser-ui-views-tabs-tab_group_views.cc.patch b/patches/chrome-browser-ui-views-tabs-tab_group_views.cc.patch index 1a74e0440edf..46b8c5e1542b 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_group_views.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_group_views.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/tab_group_views.cc b/chrome/browser/ui/views/tabs/tab_group_views.cc -index bbd00aec2b10a397596afa383c796df2d4f203a6..b1b3ac2a045d0652d41b9b62f6669bfeece4f4fc 100644 +index 9d4de2ba573617c36fc93228aea87185ec19f4ce..b5010f91ac832c71f1c9a05f8cc359568688abef 100644 --- a/chrome/browser/ui/views/tabs/tab_group_views.cc +++ b/chrome/browser/ui/views/tabs/tab_group_views.cc -@@ -178,6 +178,7 @@ TabGroupViews::GetLeadingTrailingGroupViews( +@@ -165,6 +165,7 @@ TabGroupViews::GetLeadingTrailingGroupViews( views::View* trailing_child = nullptr; gfx::Rect trailing_child_widget_bounds; diff --git a/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch b/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch index fcbdf07c7632..38817da80a27 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h -index e32d2be55f20a5faf1d9a38e3b07366676f0859e..0ed46e747e4d10d87f5fc81a398dadd2aeebeb5e 100644 +index 9accd372c00fa25af82098358ac3d9e905fac8ab..729aee615aa1416341789391a755c9382b194147 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h @@ -71,6 +71,7 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView { @@ -9,4 +9,4 @@ index e32d2be55f20a5faf1d9a38e3b07366676f0859e..0ed46e747e4d10d87f5fc81a398dadd2 + BRAVE_TAB_HOVER_CARD_BUBBLE_VIEW_H_ private: FRIEND_TEST_ALL_PREFIXES(TabHoverCardInteractiveUiTest, - HoverCardFooterUpdates); + HoverCardDoesNotHaveFooterView); diff --git a/patches/chrome-browser-ui-views-tabs-tab_strip.cc.patch b/patches/chrome-browser-ui-views-tabs-tab_strip.cc.patch index 4fe267964658..eb730768dea7 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_strip.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_strip.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc -index 51d81029a8a569434c0014cbdec4b473a15c329c..7ab351f036361820920886f071ae65df743ce7f4 100644 +index da7ae74dc5f212b6b8b17311751abc6269a71da1..2de5eb3c5656f3998e6b0a481e09b6bbcfb6603d 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc -@@ -495,6 +495,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, +@@ -496,6 +496,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, std::vector CalculateBoundsForDraggedViews( const std::vector& views) override { @@ -10,7 +10,7 @@ index 51d81029a8a569434c0014cbdec4b473a15c329c..7ab351f036361820920886f071ae65df DCHECK(!views.empty()); std::vector bounds; -@@ -670,6 +671,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, +@@ -671,6 +672,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, // index. std::stable_sort(orderable_children.begin(), orderable_children.end()); @@ -18,7 +18,7 @@ index 51d81029a8a569434c0014cbdec4b473a15c329c..7ab351f036361820920886f071ae65df for (const ZOrderableTabContainerElement& child : orderable_children) child.view()->Paint(paint_info); } -@@ -761,6 +763,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, +@@ -762,6 +764,7 @@ class TabStrip::TabDragContextImpl : public TabDragContext, continue; } diff --git a/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch b/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch index 4472c1788416..b2cc2933500d 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/ui/views/tabs/tab_style_views.cc b/chrome/browser/ui/views/tabs/tab_style_views.cc -index 202e116be8fb3bd6dc948de9d725eaa14941d81e..c0a1f1287ea497a5cc8388eb457ea4568571f134 100644 +index 6987eaf6eda6cdafd2dd90de62c6152ebf11ba45..420b583c85c99d38a2648ff535450679ff2ac6a0 100644 --- a/chrome/browser/ui/views/tabs/tab_style_views.cc +++ b/chrome/browser/ui/views/tabs/tab_style_views.cc -@@ -126,6 +126,7 @@ class GM2TabStyleViews : public TabStyleViews { - const Tab* other_tab) const; +@@ -135,6 +135,7 @@ class GM2TabStyleViews : public TabStyleViews { + TabStyle::TabSelectionState GetSelectionState() const; private: + BRAVE_GM2_TAB_STYLE_H // Gets the bounds for the leading and trailing separators for a tab. TabStyle::SeparatorBounds GetSeparatorBounds(float scale) const; -@@ -274,6 +275,7 @@ SkPath GM2TabStyleViews::GetPath(TabStyle::PathType path_type, +@@ -289,6 +290,7 @@ SkPath GM2TabStyleViews::GetPath(TabStyle::PathType path_type, const ShapeModifier shape_modifier = GetShapeModifier(path_type); const bool extend_left_to_bottom = shape_modifier & kNoLowerLeftArc; const bool extend_right_to_bottom = shape_modifier & kNoLowerRightArc; @@ -18,17 +18,19 @@ index 202e116be8fb3bd6dc948de9d725eaa14941d81e..c0a1f1287ea497a5cc8388eb457ea456 SkPath path; -@@ -548,8 +550,7 @@ TabStyle::SeparatorBounds GM2TabStyleViews::GetSeparatorBounds( +@@ -606,9 +608,10 @@ TabStyle::SeparatorBounds GM2TabStyleViews::GetSeparatorBounds( + TabStyle::SeparatorBounds separator_bounds; + + const int extra_vertical_space = ++ 2 * ( + aligned_bounds.height() - + (separator_size.height() + separator_margin.bottom() + +- separator_margin.top()); ++ separator_margin.top())); + + separator_bounds.leading = gfx::RectF( aligned_bounds.x() + corner_radius - separator_margin.right() - - separator_size.width(), - aligned_bounds.y() + (aligned_bounds.height() - separator_size.height() - -- separator_margin.bottom()) / -- 2, -+ separator_margin.bottom()), - separator_size.width(), separator_size.height()); - - separator_bounds.trailing = separator_bounds.leading; -@@ -923,12 +924,16 @@ void GM2TabStyleViews::PaintSeparators(gfx::Canvas* canvas) const { +@@ -1023,14 +1026,18 @@ void GM2TabStyleViews::PaintSeparators(gfx::Canvas* canvas) const { SK_AlphaOPAQUE)); }; @@ -39,11 +41,13 @@ index 202e116be8fb3bd6dc948de9d725eaa14941d81e..c0a1f1287ea497a5cc8388eb457ea456 cc::PaintFlags flags; flags.setAntiAlias(true); flags.setColor(separator_color(separator_opacities.left)); -- canvas->DrawRect(separator_bounds.leading, flags); -+ canvas->DrawRoundRect(separator_bounds.leading, separator_radius, flags); + canvas->DrawRoundRect(separator_bounds.leading, +- tab_style()->GetSeparatorCornerRadius() * scale, flags); ++ separator_radius, flags); flags.setColor(separator_color(separator_opacities.right)); -- canvas->DrawRect(separator_bounds.trailing, flags); -+ canvas->DrawRoundRect(separator_bounds.trailing, separator_radius, flags); + canvas->DrawRoundRect(separator_bounds.trailing, +- tab_style()->GetSeparatorCornerRadius() * scale, flags); ++ separator_radius, flags); } float GM2TabStyleViews::GetTopCornerRadiusForWidth(int width) const { diff --git a/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch b/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch index d0ec8fd9dd60..9caa2e01d867 100644 --- a/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch +++ b/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc -index c9e50271f27162f10f20fe15e09ca7b4545d58d5..a4b489cad4cc8d909e236448e1ce61b04ee62f3f 100644 +index 619f741f150975e1a93a32783f9bbfe78e9bee15..a0a09d22c024a5bacd27dfa60ae026ac0c09146b 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -441,6 +441,7 @@ void ToolbarView::Init() { +@@ -461,6 +461,7 @@ void ToolbarView::Init() { container_view_->AddChildView(std::move(side_panel_button)); } diff --git a/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch b/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch index bd0666cd95c0..33f5c53c3d3b 100644 --- a/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch +++ b/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -index 1fe6c2242c11fcab42a8a3bb698dfdb17ae6cb2d..b7c647f7edf8b66349593854c345bbe05f716b5d 100644 +index 75ab7f0bbbeedb05a8b82f9e80e5200a5f89575e..0b4b93522f6007868c14849528c8226a17dde1a2 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -982,6 +982,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( +@@ -988,6 +988,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( // static ChromeWebUIControllerFactory* ChromeWebUIControllerFactory::GetInstance() { diff --git a/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch b/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch index 83101a08f7ce..21b5c6e3cdcb 100644 --- a/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/downloads/downloads_ui.cc b/chrome/browser/ui/webui/downloads/downloads_ui.cc -index adf8f9b3fdf7a4280649106427515651cb9e753a..1bc92762ea3fa6559bcdb3a59c400b779e563fd2 100644 +index aa26b88ebba2e3765623675519d71335ded67660..e0573ca48104112bbab625ae9e412816a7993bbb 100644 --- a/chrome/browser/ui/webui/downloads/downloads_ui.cc +++ b/chrome/browser/ui/webui/downloads/downloads_ui.cc -@@ -59,6 +59,7 @@ namespace { +@@ -60,6 +60,7 @@ namespace { content::WebUIDataSource* CreateAndAddDownloadsUIHTMLSource(Profile* profile) { content::WebUIDataSource* source = content::WebUIDataSource::CreateAndAdd( profile, chrome::kChromeUIDownloadsHost); diff --git a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch index 8bbbf934084c..dde3a2199d28 100644 --- a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc -index e7abdf55abaf79904201886cec4efe2cb24f2ad0..8444faf4f4580343fe27682cbd4c2035815f3904 100644 +index 625352ca9ae74c09ecab797571b2075727717757..d4111c2a45895914675252b3c1c05b52a42b7062 100644 --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc -@@ -421,6 +421,7 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -433,6 +433,7 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, "safetyCheckShowReviewPanel", base::FeatureList::IsEnabled(features::kSafetyCheckExtensions)); diff --git a/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch b/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch index 6054b8b0b4a8..c8da616fdd2d 100644 --- a/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc -index 77ebeea4178df00b03d61163e489c4a9112481e2..90a75584a90871f8b25cffb11fdb7aa855d89712 100644 +index 32cc442c8bf1e6cf1e86b156697231839799898b..a5946468ff148195e81e33c4200acd9106360b85 100644 --- a/chrome/browser/ui/webui/settings/people_handler.cc +++ b/chrome/browser/ui/webui/settings/people_handler.cc -@@ -890,6 +890,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync_service) { +@@ -875,6 +875,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync_service) { void PeopleHandler::BeforeUnloadDialogCancelled() { // The before unload dialog is only shown during the first sync setup. @@ -10,7 +10,7 @@ index 77ebeea4178df00b03d61163e489c4a9112481e2..90a75584a90871f8b25cffb11fdb7aa8 DCHECK(IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount( signin::ConsentLevel::kSync)); syncer::SyncService* service = GetSyncService(); -@@ -939,6 +940,7 @@ base::Value::Dict PeopleHandler::GetSyncStatusDictionary() const { +@@ -924,6 +925,7 @@ base::Value::Dict PeopleHandler::GetSyncStatusDictionary() const { service && !disallowed_by_policy && service->IsSetupInProgress() && !service->GetUserSettings()->IsInitialSyncFeatureSetupComplete() && identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSync)); @@ -18,7 +18,7 @@ index 77ebeea4178df00b03d61163e489c4a9112481e2..90a75584a90871f8b25cffb11fdb7aa8 const SyncStatusLabels status_labels = GetSyncStatusLabels(profile_); // TODO(crbug.com/1027467): Consider unifying some of the fields below to -@@ -1102,6 +1104,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { +@@ -1086,6 +1088,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { } bool PeopleHandler::IsProfileAuthNeededOrHasErrors() { diff --git a/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch b/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch index 7ad451238487..1034f7e5c96b 100644 --- a/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -index ba144779fd63d84fdb0279944fc32f0032a2d431..4c77f2bbab4ac63bf5ca69976905f38ca2ef0126 100644 +index 2c54740738d1fbaf977eb150e91428596ff9ed94..aea9364a758b4efa90e14c8a2f4a6ea886d9d511 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -3634,6 +3634,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3710,6 +3710,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); diff --git a/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch b/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch index 57947b25e0f0..9527a53ac2b1 100644 --- a/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc -index 0bc74c27f994f0a3ddd034bd6a97f4d6ab5eca33..6b403ab004fa0c7b6c37b1c890698687fc56c0c5 100644 +index 0fa6df3882ca180c0ecfa89f8294b48f1adde711..57c4a4541449cc261607fadfaa9f7494a7b2da0c 100644 --- a/chrome/browser/ui/webui/settings/site_settings_helper.cc +++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc -@@ -195,6 +195,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { - nullptr}, - {ContentSettingsType::THIRD_PARTY_STORAGE_PARTITIONING, nullptr}, +@@ -199,6 +199,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { {ContentSettingsType::ALL_SCREEN_CAPTURE, nullptr}, + {ContentSettingsType::COOKIE_CONTROLS_METADATA, nullptr}, + {ContentSettingsType::TPCD_SUPPORT, nullptr}, + BRAVE_CONTENT_SETTINGS_TYPE_GROUP_NAMES_LIST }; static_assert(std::size(kContentSettingsTypeGroupNames) == -@@ -485,6 +486,7 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -491,6 +492,7 @@ bool HasRegisteredGroupName(ContentSettingsType type) { } ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { diff --git a/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch b/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch index d8c26de135d5..57b7e88936f7 100644 --- a/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch +++ b/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm b/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm -index fad13598b124905c1fb1ded7d8f8daac1259fd48..ac02be17de0fdb2d4e25ce46e9408c18c1837771 100644 +index 68964b425cec5cdc07f22d07c8bd2bf04bf64d53..79aa75fadaecc58424d95e67134bae3d123eecc4 100644 --- a/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm +++ b/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm -@@ -1017,6 +1017,7 @@ base::FilePath GetChromeAppsFolder() { +@@ -1171,6 +1171,7 @@ base::FilePath GetChromeAppsFolder() { if (path.empty()) return path; diff --git a/patches/chrome-common-BUILD.gn.patch b/patches/chrome-common-BUILD.gn.patch index b65c65b62f5d..cc7879743927 100644 --- a/patches/chrome-common-BUILD.gn.patch +++ b/patches/chrome-common-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn -index 02843c8fd37a25326f9f5e8edfeba8e72ad4eae5..41bcfe313dc58906f0946a08b9e31dc1d4cc535d 100644 +index c3ec18003787c0ea08eb6ecf741e485ef7ffbfb3..033f9e51e253303b5ef82679addb4bec5fd1808b 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -98,6 +98,7 @@ source_set("channel_info") { +@@ -97,6 +97,7 @@ source_set("channel_info") { } else if (is_fuchsia) { sources += [ "channel_info_fuchsia.cc" ] } @@ -10,7 +10,7 @@ index 02843c8fd37a25326f9f5e8edfeba8e72ad4eae5..41bcfe313dc58906f0946a08b9e31dc1 } source_set("ini_parser") { -@@ -289,6 +290,7 @@ static_library("common_lib") { +@@ -272,6 +273,7 @@ static_library("common_lib") { if (enable_ppapi) { public_deps += [ "//ppapi/shared_impl" ] } @@ -18,7 +18,7 @@ index 02843c8fd37a25326f9f5e8edfeba8e72ad4eae5..41bcfe313dc58906f0946a08b9e31dc1 if (enable_extensions) { sources += [ -@@ -557,6 +559,7 @@ static_library("non_code_constants") { +@@ -540,6 +542,7 @@ static_library("non_code_constants") { "//printing/buildflags", "//ui/base:buildflags", ] diff --git a/patches/chrome-common-extensions-api-developer_private.idl.patch b/patches/chrome-common-extensions-api-developer_private.idl.patch index c4c9114f2987..80699bbf0f40 100644 --- a/patches/chrome-common-extensions-api-developer_private.idl.patch +++ b/patches/chrome-common-extensions-api-developer_private.idl.patch @@ -1,5 +1,5 @@ diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl -index 02c9e6bdb14d247bb5d6da561704c9ad7703c25a..e26cb8bf667f6f03ae86862e49be3f134d920391 100644 +index b733a36ef4a8ff7d8a82415fc78e2079351bf885..d57ebbfe4cf01050b0e1eaec576416f07dc0a960 100644 --- a/chrome/common/extensions/api/developer_private.idl +++ b/chrome/common/extensions/api/developer_private.idl @@ -241,6 +241,7 @@ namespace developerPrivate { diff --git a/patches/chrome-installer-mac-BUILD.gn.patch b/patches/chrome-installer-mac-BUILD.gn.patch index f565d152b6da..7043db6f9303 100644 --- a/patches/chrome-installer-mac-BUILD.gn.patch +++ b/patches/chrome-installer-mac-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/mac/BUILD.gn b/chrome/installer/mac/BUILD.gn -index a559e3b0d0a5648d228514c421bc1c82049507e2..16b831df45724ca03806a054c850aa8acb49c2ed 100644 +index 59632e3433849608356269bdbb462078d7b42550..18e0f81bce6d2a099bf233ca901e0d528eeb3e9f 100644 --- a/chrome/installer/mac/BUILD.gn +++ b/chrome/installer/mac/BUILD.gn @@ -19,7 +19,8 @@ group("mac") { diff --git a/patches/chrome-installer-mac-signing-config.py.patch b/patches/chrome-installer-mac-signing-config.py.patch index 47683a5e5181..d4d468329e69 100644 --- a/patches/chrome-installer-mac-signing-config.py.patch +++ b/patches/chrome-installer-mac-signing-config.py.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/mac/signing/config.py b/chrome/installer/mac/signing/config.py -index c9ee6c3254d016cb46133896ee0deaa86163a582..6632c9c9002c4b3bfd685aa4ef72d4998f569603 100644 +index f6742e27288f584a06e8891aefeb6f1e33a8b6df..8293197c31601a0e0d6957d25b686b98986ed9f7 100644 --- a/chrome/installer/mac/signing/config.py +++ b/chrome/installer/mac/signing/config.py -@@ -231,4 +231,4 @@ class CodeSignConfig(object): +@@ -218,4 +218,4 @@ class CodeSignConfig(object): @property def packaging_dir(self): """Returns the path to the packaging and installer tools.""" diff --git a/patches/chrome-installer-mac-signing-model.py.patch b/patches/chrome-installer-mac-signing-model.py.patch index fc32233ba1fb..4d44a832350f 100644 --- a/patches/chrome-installer-mac-signing-model.py.patch +++ b/patches/chrome-installer-mac-signing-model.py.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/mac/signing/model.py b/chrome/installer/mac/signing/model.py -index 46e437e71537f234ab0f8a7053da59f304cf722a..c4f35fdfd78df691b890137df7f6ac965503d18a 100644 +index 3d5ced94d94073e0c56c7c899f7fa1806b224ed2..95d1606ffb51869392dcc94cc6ddf881b0dbda70 100644 --- a/chrome/installer/mac/signing/model.py +++ b/chrome/installer/mac/signing/model.py -@@ -424,7 +424,7 @@ class Paths(object): +@@ -415,7 +415,7 @@ class Paths(object): Returns: Path to the packaging directory. """ diff --git a/patches/chrome-installer-mac-signing-pipeline.py.patch b/patches/chrome-installer-mac-signing-pipeline.py.patch index 4e135a5a0cba..b54c3c9f76b6 100644 --- a/patches/chrome-installer-mac-signing-pipeline.py.patch +++ b/patches/chrome-installer-mac-signing-pipeline.py.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/mac/signing/pipeline.py b/chrome/installer/mac/signing/pipeline.py -index 978c15a6fb0d11308504ff2b09242294dd412e42..d170e86a4ec4cce974d46b395e9b5eb8cd666973 100644 +index 18517f91a1025abd6e680e491c9a3d38a5665720..b26c2884e3b17c1e981b790ef3c8ba563eff05af 100644 --- a/chrome/installer/mac/signing/pipeline.py +++ b/chrome/installer/mac/signing/pipeline.py @@ -691,6 +691,9 @@ def sign_all(orig_paths, diff --git a/patches/chrome-installer-util-shell_util.cc.patch b/patches/chrome-installer-util-shell_util.cc.patch index c47d29c0c876..fee85f0f9830 100644 --- a/patches/chrome-installer-util-shell_util.cc.patch +++ b/patches/chrome-installer-util-shell_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc -index d32b663370c0a568928579560cef97bd4aff8d3d..6b2716b6f8fb008d3b583ad123cb9de1dbe6db18 100644 +index 595d30a92a0994015b1f9b3d7d425f96677f4a0c..e6b5eb9770ab4dabfb366ac03a62fe1de2a73d2b 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc -@@ -365,6 +365,7 @@ void GetChromeProgIdEntries( +@@ -370,6 +370,7 @@ void GetChromeProgIdEntries( app_info.delegate_clsid = install_static::GetLegacyCommandExecuteImplClsid(); GetProgIdEntries(app_info, entries); @@ -10,7 +10,7 @@ index d32b663370c0a568928579560cef97bd4aff8d3d..6b2716b6f8fb008d3b583ad123cb9de1 if (!app_info.delegate_clsid.empty()) { auto delegate_execute_entries = -@@ -461,6 +462,7 @@ void GetShellIntegrationEntries( +@@ -465,6 +466,7 @@ void GetShellIntegrationEntries( const std::wstring html_prog_id(GetBrowserProgId(suffix)); for (int i = 0; ShellUtil::kPotentialFileAssociations[i] != nullptr; i++) { @@ -18,7 +18,7 @@ index d32b663370c0a568928579560cef97bd4aff8d3d..6b2716b6f8fb008d3b583ad123cb9de1 entries->push_back(std::make_unique( capabilities + L"\\FileAssociations", ShellUtil::kPotentialFileAssociations[i], html_prog_id)); -@@ -485,6 +487,7 @@ void GetAppExtRegistrationEntries( +@@ -489,6 +491,7 @@ void GetAppExtRegistrationEntries( std::wstring key_name = base::StrCat({ShellUtil::kRegClasses, kFilePathSeparator, ext, kFilePathSeparator, ShellUtil::kRegOpenWithProgids}); @@ -26,7 +26,7 @@ index d32b663370c0a568928579560cef97bd4aff8d3d..6b2716b6f8fb008d3b583ad123cb9de1 entries->push_back( std::make_unique(key_name, prog_id, std::wstring())); } -@@ -1740,8 +1743,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { +@@ -1742,8 +1745,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { L".htm", L".html", L".pdf", L".shtml", L".svg", L".xht", L".xhtml", L".webp", nullptr}; const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"http", L"https", diff --git a/patches/chrome-renderer-BUILD.gn.patch b/patches/chrome-renderer-BUILD.gn.patch index d2cd924167af..da1e270ef2c4 100644 --- a/patches/chrome-renderer-BUILD.gn.patch +++ b/patches/chrome-renderer-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn -index 76f0adaaa659d23fff483cf2461f1ac890b3c93f..977464f59cfe354d1839dc7971692dc0146e8955 100644 +index 5bf67204d500609ba0d431ac7e28c1c569f46790..82fff891b240fe493f8c4ed41129bc672faf1203 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn @@ -233,6 +233,7 @@ static_library("renderer") { diff --git a/patches/chrome-renderer-chrome_content_renderer_client.cc.patch b/patches/chrome-renderer-chrome_content_renderer_client.cc.patch index e58673c8d840..4fa1693afa7f 100644 --- a/patches/chrome-renderer-chrome_content_renderer_client.cc.patch +++ b/patches/chrome-renderer-chrome_content_renderer_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 43fc365662842d453189bc60b98abc46678b802e..bd69a8172af2ac67f6e24d8041725b60a0e8a096 100644 +index 8d02ca21674b13dd2ae11cb79b8d85dfcc4cb217..d1b90c854d669475aa0640b745612f07d1fa4aa7 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -579,7 +579,7 @@ void ChromeContentRendererClient::RenderFrameCreated( +@@ -584,7 +584,7 @@ void ChromeContentRendererClient::RenderFrameCreated( ChromeExtensionsRendererClient::GetInstance()->extension_dispatcher()); #endif content_settings::ContentSettingsAgentImpl* content_settings = @@ -11,7 +11,7 @@ index 43fc365662842d453189bc60b98abc46678b802e..bd69a8172af2ac67f6e24d8041725b60 render_frame, should_allow_for_content_settings, std::move(content_settings_delegate)); if (chrome_observer_.get()) { -@@ -766,6 +766,7 @@ void ChromeContentRendererClient::RenderFrameCreated( +@@ -756,6 +756,7 @@ void ChromeContentRendererClient::RenderFrameCreated( render_frame)); } #endif diff --git a/patches/chrome-test-BUILD.gn.patch b/patches/chrome-test-BUILD.gn.patch index b5da56704046..13ecbcdf6834 100644 --- a/patches/chrome-test-BUILD.gn.patch +++ b/patches/chrome-test-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 1029220fce0773fffc4fd8259f09e3659daa1979..adfea16cb844ca865cc32f8f95ba1151007c7e07 100644 +index ace4311233360c2a2e200f244d414e7f0da673e1..8188d03fa18460691ebc398f33d6d7c87c590659 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -405,6 +405,7 @@ static_library("test_support") { +@@ -428,6 +428,7 @@ static_library("test_support") { "//ui/gl", ] diff --git a/patches/chrome-test-data-webui-settings-BUILD.gn.patch b/patches/chrome-test-data-webui-settings-BUILD.gn.patch index ba321e86a8f0..e8a36e90eb53 100644 --- a/patches/chrome-test-data-webui-settings-BUILD.gn.patch +++ b/patches/chrome-test-data-webui-settings-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/test/data/webui/settings/BUILD.gn b/chrome/test/data/webui/settings/BUILD.gn -index b2029e2bc47b0cf44f89514e56451550b71c4bc9..001d095368a14029b75f89500cef1ababd1e2cc9 100644 +index 97f10c465bba72b320183814e360a004473fb5a6..b6e75653b4ca0762597ebb0d1c3ed9da8f15bc78 100644 --- a/chrome/test/data/webui/settings/BUILD.gn +++ b/chrome/test/data/webui/settings/BUILD.gn -@@ -234,6 +234,7 @@ build_webui_tests("build") { +@@ -226,6 +226,7 @@ build_webui_tests("build") { ts_definitions += [ "//tools/typescript/definitions/quick_unlock_private.d.ts" ] } diff --git a/patches/chrome-test-include_js_tests.gni.patch b/patches/chrome-test-include_js_tests.gni.patch index d9bf8fd50c35..f5e417d832ae 100644 --- a/patches/chrome-test-include_js_tests.gni.patch +++ b/patches/chrome-test-include_js_tests.gni.patch @@ -1,11 +1,13 @@ diff --git a/chrome/test/include_js_tests.gni b/chrome/test/include_js_tests.gni -index 72a439884d2be78df848ceaddca6fe7237f30a6c..67212f0a7b902bec22a89d0fc56999fc7a510b6c 100644 +index 68ffc11592f831374447b4bbb47af37e52203028..68ed67a1bb5955e868cd14f19892c31e81bc808d 100644 --- a/chrome/test/include_js_tests.gni +++ b/chrome/test/include_js_tests.gni -@@ -3,5 +3,6 @@ import("//build/config/sanitizers/sanitizers.gni") +@@ -1,7 +1,7 @@ + import("//build/config/sanitizers/sanitizers.gni") + if (!is_android) { - # js_tests don't work in cross builds, https://crbug.com/1010561 - include_js_tests = -+ false && - !(is_asan || is_msan || is_tsan || is_cfi || (is_win && host_os != "win")) - } +- include_js_tests = !(is_asan || is_msan || is_tsan || is_cfi) ++ include_js_tests = false && !(is_asan || is_msan || is_tsan || is_cfi) + + # Tests using js2gtest don't work in cross builds, https://crbug.com/1010561 + include_js2gtest_tests = include_js_tests && !(is_win && host_os != "win") diff --git a/patches/chrome-tools-build-mac-infoplist_strings_util.cc.patch b/patches/chrome-tools-build-mac-infoplist_strings_util.cc.patch index d7c397ff1a8c..e11f7611e932 100644 --- a/patches/chrome-tools-build-mac-infoplist_strings_util.cc.patch +++ b/patches/chrome-tools-build-mac-infoplist_strings_util.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/tools/build/mac/infoplist_strings_util.cc b/chrome/tools/build/mac/infoplist_strings_util.cc -index c4a8d53cf967f4905e0dd435c706fe8f5ce442d4..5d8bc93df7bbadfa5c2ecf8d8692131a7271b714 100644 +index 57c5b13e8aefe45122ac9d4e47e2f2bdf0bac709..c1f6f661b0ab6b6d773aad96c3d453ef617e015d 100644 --- a/chrome/tools/build/mac/infoplist_strings_util.cc +++ b/chrome/tools/build/mac/infoplist_strings_util.cc @@ -153,6 +153,7 @@ int main(int argc, char* const argv[]) { diff --git a/patches/chrome-utility-BUILD.gn.patch b/patches/chrome-utility-BUILD.gn.patch index efdbc96e2edc..7e4b4547a951 100644 --- a/patches/chrome-utility-BUILD.gn.patch +++ b/patches/chrome-utility-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn -index fc868ad0b5299938f27fd42c138e708d501fa090..c765751a3d54cc1d1a6689b6c545f24c3caabbdc 100644 +index bf29364c22715208cf40701e3ec7102d7d120cde..e0521460a6c6fba865c3d443f9b183e3d323747f 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn @@ -72,6 +72,8 @@ static_library("utility") { diff --git a/patches/components-bookmarks-browser-bookmark_model.h.patch b/patches/components-bookmarks-browser-bookmark_model.h.patch index 58cb3087c167..9c2c4af85bc1 100644 --- a/patches/components-bookmarks-browser-bookmark_model.h.patch +++ b/patches/components-bookmarks-browser-bookmark_model.h.patch @@ -1,5 +1,5 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h -index 8258c2b992e8ceafa4dcb7a7906ad8d7dc063c3d..976921b7061126d1fa32de2a6607432d1be4bc1d 100644 +index 815a6cf5f7c4f69618747ab6f5726d3e91995aca..baf5eb9f889ad021d79adce8eb01a309d5b46265 100644 --- a/components/bookmarks/browser/bookmark_model.h +++ b/components/bookmarks/browser/bookmark_model.h @@ -385,6 +385,7 @@ class BookmarkModel final : public BookmarkUndoProvider, diff --git a/patches/components-browser_ui-settings-android-BUILD.gn.patch b/patches/components-browser_ui-settings-android-BUILD.gn.patch index 085b24e66fb0..d10153d1c609 100644 --- a/patches/components-browser_ui-settings-android-BUILD.gn.patch +++ b/patches/components-browser_ui-settings-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/settings/android/BUILD.gn b/components/browser_ui/settings/android/BUILD.gn -index 55fd2ccd2e56af0ec8a46eff8946d42ffb0d96a4..94205e8a0cc4b90d4e5f037e1d49e4dd6d687200 100644 +index 2fa1b261017fca82b35adf3902f9e9420d840322..c4d3de22f9b12ad195af4cfca423f7ebbb6403c1 100644 --- a/components/browser_ui/settings/android/BUILD.gn +++ b/components/browser_ui/settings/android/BUILD.gn @@ -48,6 +48,7 @@ android_library("java") { diff --git a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch index 9f44efd0271f..8088bf31c88a 100644 --- a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch +++ b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch @@ -1,8 +1,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -index 55326fff2442efd47d08491fc495d41308e4f956..6a401b0e2ed9db7ecb5435965081c9e8dd9a9732 100644 +index e71790e5af9a111938135cbf2a67dd4376192bcc..d47e7a099c9fd8f258c03a4d7052cbc0e748bd4e 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -513,7 +513,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment +@@ -518,7 +518,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment if (queryHasChanged) getInfoForOrigins(); return true; } diff --git a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch index 91d2ab1febb5..a32e2b661b8c 100644 --- a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch +++ b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch @@ -1,26 +1,26 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java -index 57be3c740517a3a9259f73b964bbc2d71a2ed0ef..1811dd966f7a9ee578737fe891eec714b6a6459e 100644 +index cc2951ae1d3a7694b5b2f2691ddd76e436d715bc..1cbb9a2a67b35d9b53db23262c4b71ad0dca1d7c 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java @@ -47,7 +47,7 @@ public class SiteSettingsCategory { Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API, Type.THIRD_PARTY_COOKIES, Type.SITE_DATA, Type.ANTI_ABUSE, -- Type.NUM_ENTRIES}) -+ Type.NUM_ENTRIES, Type.AUTOPLAY, Type.BRAVE_GOOGLE_SIGN_IN, Type.BRAVE_LOCALHOST_ACCESS}) +- Type.ZOOM, Type.NUM_ENTRIES}) ++ Type.ZOOM, Type.NUM_ENTRIES, Type.AUTOPLAY, Type.BRAVE_GOOGLE_SIGN_IN, Type.BRAVE_LOCALHOST_ACCESS}) @Retention(RetentionPolicy.SOURCE) public @interface Type { // All updates here must also be reflected in {@link #preferenceKey(int) -@@ -81,10 +81,11 @@ public class SiteSettingsCategory { - int THIRD_PARTY_COOKIES = 26; +@@ -82,10 +82,11 @@ public class SiteSettingsCategory { int SITE_DATA = 27; int ANTI_ABUSE = 28; -+ int AUTOPLAY = 29; int BRAVE_GOOGLE_SIGN_IN = 30; int BRAVE_LOCALHOST_ACCESS = 31; + int ZOOM = 29; ++ int AUTOPLAY = 30; int BRAVE_GOOGLE_SIGN_IN = 31; int BRAVE_LOCALHOST_ACCESS = 32; /** * Number of handled categories used for calculating array sizes. */ -- int NUM_ENTRIES = 29; -+ int NUM_ENTRIES = 32; +- int NUM_ENTRIES = 30; ++ int NUM_ENTRIES = 33; } private final BrowserContextHandle mBrowserContextHandle; diff --git a/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch b/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch index 19a9870f45dd..fcbb5105833a 100644 --- a/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch +++ b/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/widget/android/java/res/values/dimens.xml b/components/browser_ui/widget/android/java/res/values/dimens.xml -index ec3c953c61ec6316ea14f0c3cfc9d7c537e0e65c..8eafeed2663a84609d1be6959f2912e0e2e1e1ab 100644 +index 289a377417fcac7f34ec54617af76b8843625ff2..3cdaa7139a3f565c90518bca6d49f2b6575cf378 100644 --- a/components/browser_ui/widget/android/java/res/values/dimens.xml +++ b/components/browser_ui/widget/android/java/res/values/dimens.xml @@ -78,7 +78,7 @@ found in the LICENSE file. diff --git a/patches/components-content_settings-browser-page_specific_content_settings.cc.patch b/patches/components-content_settings-browser-page_specific_content_settings.cc.patch index 8f566cdb1e2e..204a6803b05a 100644 --- a/patches/components-content_settings-browser-page_specific_content_settings.cc.patch +++ b/patches/components-content_settings-browser-page_specific_content_settings.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/browser/page_specific_content_settings.cc b/components/content_settings/browser/page_specific_content_settings.cc -index c8518b79647cf14d34575b64ac2a6841479f3810..dc0a0366b0f139fed65c604d902504c289878200 100644 +index a2539cadc25f467745595226d7687e4bd2d62849..722355773763413a7bd0b8903c2cc70252d5aba2 100644 --- a/components/content_settings/browser/page_specific_content_settings.cc +++ b/components/content_settings/browser/page_specific_content_settings.cc -@@ -671,6 +671,7 @@ bool PageSpecificContentSettings::IsContentBlocked( +@@ -771,6 +771,7 @@ bool PageSpecificContentSettings::IsContentBlocked( content_type == ContentSettingsType::ADS || content_type == ContentSettingsType::SOUND || content_type == ContentSettingsType::CLIPBOARD_READ_WRITE || @@ -10,7 +10,7 @@ index c8518b79647cf14d34575b64ac2a6841479f3810..dc0a0366b0f139fed65c604d902504c2 content_type == ContentSettingsType::SENSORS || content_type == ContentSettingsType::GEOLOCATION) { const auto& it = content_settings_status_.find(content_type); -@@ -695,6 +696,7 @@ bool PageSpecificContentSettings::IsContentAllowed( +@@ -796,6 +797,7 @@ bool PageSpecificContentSettings::IsContentAllowed( content_type != ContentSettingsType::MEDIASTREAM_CAMERA && content_type != ContentSettingsType::MIDI_SYSEX && content_type != ContentSettingsType::CLIPBOARD_READ_WRITE && diff --git a/patches/components-content_settings-core-browser-BUILD.gn.patch b/patches/components-content_settings-core-browser-BUILD.gn.patch index 9bc018dec55f..4bf331f3ca62 100644 --- a/patches/components-content_settings-core-browser-BUILD.gn.patch +++ b/patches/components-content_settings-core-browser-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn -index 978c739d7e2a88764bc594fc775451bcaad29d4a..f323181c27a5b35bfe1b2d369158c8b9703d2b4b 100644 +index 03c3d6a249733817074f8663b9eeb31e797a7282..e5e668aee61d877d1f3822ed521ece908e95e102 100644 --- a/components/content_settings/core/browser/BUILD.gn +++ b/components/content_settings/core/browser/BUILD.gn -@@ -83,6 +83,7 @@ static_library("browser") { +@@ -85,6 +85,7 @@ static_library("browser") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch b/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch index 5c0f7159669f..cab4be1f0ad9 100644 --- a/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch @@ -1,11 +1,11 @@ diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc -index baff459f7fc37af49fd5edb2772802cb47b9ffc8..bf0a76d7a7d1b3c161e0f67b986f6d909aced6fa 100644 +index 226720a6d80fef873dd78acef84d0905c94ec422..0af999981980ee5271d0772a6c027e64987c5bb6 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc -@@ -360,6 +360,7 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() { - } - prefs_->ClearPref(kDeprecatedEnableDRM); - #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +@@ -335,6 +335,7 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() { + prefs_->ClearPref(kObsoletePpapiBrokerDefaultPref); + #endif // !BUILDFLAG(IS_ANDROID) + #endif // !BUILDFLAG(IS_IOS) +BRAVE_DISCARD_OR_MIGRATE_OBSOLETE_PREFERENCES } diff --git a/patches/components-content_settings-core-browser-content_settings_policy_provider.cc.patch b/patches/components-content_settings-core-browser-content_settings_policy_provider.cc.patch index 505742b4c3ce..5be01c521790 100644 --- a/patches/components-content_settings-core-browser-content_settings_policy_provider.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_policy_provider.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/content_settings/core/browser/content_settings_policy_provider.cc b/components/content_settings/core/browser/content_settings_policy_provider.cc -index 273e541ee6922aa42a9dd108723f2f7c8a25cfda..a63dc2c1be408579b420d5e2e0fdfdcd1714ac7c 100644 +index 575dfe06dc0ec861246698bc4a9a15eaba542e01..679a5c51518ccc8aebcd854f85293ca06a95c734 100644 --- a/components/content_settings/core/browser/content_settings_policy_provider.cc +++ b/components/content_settings/core/browser/content_settings_policy_provider.cc @@ -34,6 +34,7 @@ struct PrefsForManagedContentSettingsMapEntry { @@ -10,7 +10,7 @@ index 273e541ee6922aa42a9dd108723f2f7c8a25cfda..a63dc2c1be408579b420d5e2e0fdfdcd {prefs::kManagedCookiesAllowedForUrls, ContentSettingsType::COOKIES, CONTENT_SETTING_ALLOW}, {prefs::kManagedCookiesBlockedForUrls, ContentSettingsType::COOKIES, -@@ -112,6 +113,7 @@ constexpr PrefsForManagedContentSettingsMapEntry +@@ -116,6 +117,7 @@ constexpr PrefsForManagedContentSettingsMapEntry }; constexpr const char* kManagedPrefs[] = { diff --git a/patches/components-content_settings-core-browser-content_settings_pref.cc.patch b/patches/components-content_settings-core-browser-content_settings_pref.cc.patch index db216afe0608..4dbd901eb4ff 100644 --- a/patches/components-content_settings-core-browser-content_settings_pref.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_pref.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/content_settings_pref.cc b/components/content_settings/core/browser/content_settings_pref.cc -index f580cf89bc35cf4335cdda73a640fce51d271a3b..aa8f0b6cb7125cb10a77267352301356942fc74e 100644 +index 4e7b1a90b41149f13ebed02ce6b75824aeab4045..79a3e81f595b4a2b9a41d0a3edc00684cd350dad 100644 --- a/components/content_settings/core/browser/content_settings_pref.cc +++ b/components/content_settings/core/browser/content_settings_pref.cc -@@ -191,6 +191,7 @@ void ContentSettingsPref::SetWebsiteSetting( +@@ -200,6 +200,7 @@ void ContentSettingsPref::SetWebsiteSetting( DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(prefs_); DCHECK(primary_pattern != ContentSettingsPattern::Wildcard() || diff --git a/patches/components-content_settings-core-browser-content_settings_pref_provider.h.patch b/patches/components-content_settings-core-browser-content_settings_pref_provider.h.patch index 49593a53f9d4..75b9685c9d88 100644 --- a/patches/components-content_settings-core-browser-content_settings_pref_provider.h.patch +++ b/patches/components-content_settings-core-browser-content_settings_pref_provider.h.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_provider.h b/components/content_settings/core/browser/content_settings_pref_provider.h -index bf8fd6bc47424aea608f642d051909eb93fbbc86..6088b688c5bf599e5b4a54c75a168d455575da02 100644 +index 35d4908d5c6d571c302faf196fec97e648f3e5fa..bd29072a4ac8ed079a82fdcf54075e4e20866dc0 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.h +++ b/components/content_settings/core/browser/content_settings_pref_provider.h -@@ -69,6 +69,7 @@ class PrefProvider : public UserModifiableProvider { +@@ -78,6 +78,7 @@ class PrefProvider : public UserModifiableProvider { ContentSettingsPref* GetPref(ContentSettingsType type) const; private: diff --git a/patches/components-content_settings-core-browser-content_settings_registry.cc.patch b/patches/components-content_settings-core-browser-content_settings_registry.cc.patch index 574890f5e749..38f4b0f04fad 100644 --- a/patches/components-content_settings-core-browser-content_settings_registry.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_registry.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc -index cdf28d4c1aa2a7605eb6fb5475caf074df18e88f..cc2b91c0a6ad83b3c6721411f9d877e63ac3a44c 100644 +index fe872eb3a92a26e93b40150d0d76e1b6bbb734f3..a209e0df989046137778821cdf115c1ff8be37ac 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -598,6 +598,7 @@ void ContentSettingsRegistry::Init() { +@@ -609,6 +609,7 @@ void ContentSettingsRegistry::Init() { WebsiteSettingsRegistry::ALL_PLATFORMS, ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); diff --git a/patches/components-content_settings-core-browser-content_settings_uma_util.cc.patch b/patches/components-content_settings-core-browser-content_settings_uma_util.cc.patch index 73d34fe15422..ff36b2d7d89e 100644 --- a/patches/components-content_settings-core-browser-content_settings_uma_util.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_uma_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/content_settings_uma_util.cc b/components/content_settings/core/browser/content_settings_uma_util.cc -index 762454cfa1fcb627508694d3856b2f51917195b9..c9bd16ece008c27179ec23a93ec57e68e5922574 100644 +index 6516306b9d9adf454a78542d22301ba54296c1db..775cd641d837806490acf9e2917759a068273016 100644 --- a/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/components/content_settings/core/browser/content_settings_uma_util.cc -@@ -118,6 +118,7 @@ constexpr auto kHistogramValue = base::MakeFixedFlatMapGet(type); diff --git a/patches/components-content_settings-core-browser-cookie_settings.cc.patch b/patches/components-content_settings-core-browser-cookie_settings.cc.patch deleted file mode 100644 index 2202dac0bc41..000000000000 --- a/patches/components-content_settings-core-browser-cookie_settings.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc -index 5ae664478680d5f8537f1be4e71c89cb76791f7f..08978712fd1d4b070203e9d92b1e8c49b7497e19 100644 ---- a/components/content_settings/core/browser/cookie_settings.cc -+++ b/components/content_settings/core/browser/cookie_settings.cc -@@ -229,6 +229,7 @@ ContentSetting CookieSettings::GetCookieSettingInternal( - !first_party_url.SchemeIs(extension_scheme_); - - bool block = block_third && is_third_party_request; -+ BRAVE_COOKIE_SETTINGS_GET_COOKIES_SETTINGS_INTERNAL - - if (!block) { - FireStorageAccessHistogram( diff --git a/patches/components-content_settings-core-common-content_settings_types.h.patch b/patches/components-content_settings-core-common-content_settings_types.h.patch index 6c977a1c684f..ab092a6e9f5d 100644 --- a/patches/components-content_settings-core-common-content_settings_types.h.patch +++ b/patches/components-content_settings-core-common-content_settings_types.h.patch @@ -1,10 +1,10 @@ diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h -index e238be9d538dd257f74101c413cbb69cf04f39f5..fdede737f382949a667b56301edaf618af09f2db 100644 +index 3fe2cfc56bb5b6fb1007be87e7f30ac791b12f85..b2f89bacb86acfeca04612c1932285e0e1f8d8b6 100644 --- a/components/content_settings/core/common/content_settings_types.h +++ b/components/content_settings/core/common/content_settings_types.h -@@ -331,6 +331,22 @@ enum class ContentSettingsType : int32_t { - // https://github.com/screen-share/capture-all-screens - ALL_SCREEN_CAPTURE, +@@ -343,6 +343,22 @@ enum class ContentSettingsType : int32_t { + // Setting for supporting 3PCD. + TPCD_SUPPORT, + BRAVE_START, + BRAVE_ADS = BRAVE_START, diff --git a/patches/components-content_settings-core-common-cookie_settings_base.cc.patch b/patches/components-content_settings-core-common-cookie_settings_base.cc.patch new file mode 100644 index 000000000000..4a992d3200de --- /dev/null +++ b/patches/components-content_settings-core-common-cookie_settings_base.cc.patch @@ -0,0 +1,12 @@ +diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/components/content_settings/core/common/cookie_settings_base.cc +index d24f6bf106a8a181881535108f008364349a2fb2..1adf1889a46cf82bd4ea2404e7fa0a274d1bb962 100644 +--- a/components/content_settings/core/common/cookie_settings_base.cc ++++ b/components/content_settings/core/common/cookie_settings_base.cc +@@ -253,6 +253,7 @@ CookieSettingsBase::GetCookieSettingInternal( + ShouldBlockThirdPartyCookies() && + !IsThirdPartyCookiesAllowedScheme(first_party_url.scheme()); + ++ BRAVE_COOKIE_SETTINGS_BASE_GET_COOKIES_SETTINGS_INTERNAL + if (IsAllowed(setting) && !block_third) { + FireStorageAccessHistogram( + net::cookie_util::StorageAccessResult::ACCESS_ALLOWED); diff --git a/patches/components-content_settings-core-common-cookie_settings_base.h.patch b/patches/components-content_settings-core-common-cookie_settings_base.h.patch index 701e212bc77e..6ff8766aea64 100644 --- a/patches/components-content_settings-core-common-cookie_settings_base.h.patch +++ b/patches/components-content_settings-core-common-cookie_settings_base.h.patch @@ -1,13 +1,13 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.h b/components/content_settings/core/common/cookie_settings_base.h -index b5623da8c1ea26ff1fa6afd1c9df203ccfe95d46..86acd8b6f6bdab13bf80f5fae366902a9d7c8f09 100644 +index 566f5b36433c4a62891e31812ec6467bdcd93a2c..870f3e2c8d69897578a97704800a5b97de7b663d 100644 --- a/components/content_settings/core/common/cookie_settings_base.h +++ b/components/content_settings/core/common/cookie_settings_base.h -@@ -73,7 +73,7 @@ class CookieSettingsBase { +@@ -72,7 +72,7 @@ class CookieSettingsBase { CookieSettingsBase(const CookieSettingsBase&) = delete; CookieSettingsBase& operator=(const CookieSettingsBase&) = delete; - virtual ~CookieSettingsBase() = default; + virtual ~CookieSettingsBase(); - // Returns true if the cookie associated with |domain| should be deleted - // on exit. + // An enum that represents the scope of cookies to which the user's + // third-party-cookie-blocking setting applies, in a given context. diff --git a/patches/components-crash-core-app-breakpad_linux.cc.patch b/patches/components-crash-core-app-breakpad_linux.cc.patch index 14a18489d14e..097ab1e327fd 100644 --- a/patches/components-crash-core-app-breakpad_linux.cc.patch +++ b/patches/components-crash-core-app-breakpad_linux.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 22477fdfcc7aa9ce6ab5ddefe55ce278c5ede23f..a47ccb8750a5caded81edc45af60f5135cc64b6a 100644 +index 39f93b1d3a26eb5f6c7b3172ffca4ed0905be67b..68e45b47382077516f30fb994fccab8147f83abc 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -1462,7 +1462,7 @@ bool IsValidCrashReportId(const char* buf, size_t bytes_read, @@ -11,7 +11,7 @@ index 22477fdfcc7aa9ce6ab5ddefe55ce278c5ede23f..a47ccb8750a5caded81edc45af60f513 return false; } return true; -@@ -1957,7 +1957,7 @@ void HandleCrashDump(const BreakpadInfo& info) { +@@ -1954,7 +1954,7 @@ void HandleCrashDump(const BreakpadInfo& info) { if (upload_child > 0) { IGNORE_RET(sys_close(fds[1])); // Close write end of pipe. diff --git a/patches/components-crash-core-app-crash_reporter_client.cc.patch b/patches/components-crash-core-app-crash_reporter_client.cc.patch index 11a2a1e20cc0..ed6a2adce6fc 100644 --- a/patches/components-crash-core-app-crash_reporter_client.cc.patch +++ b/patches/components-crash-core-app-crash_reporter_client.cc.patch @@ -1,12 +1,12 @@ diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index 284dd099122df85d2cebf467cdb3a54b45a343eb..89d593d4d9f175d661eb0934aad40ca35b034975 100644 +index 3f3ed53d48fc4b19642cae847e69982782790e31..fa3edf874203d4d386bda4d862559cc645858dbb 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc -@@ -194,6 +194,7 @@ void CrashReporterClient::GetSanitizationInformation( +@@ -190,6 +190,7 @@ void CrashReporterClient::GetSanitizationInformation( #endif std::string CrashReporterClient::GetUploadUrl() { + BRAVE_CRASH_REPORTER_CLIENT_GET_UPLOAD_URL - #if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD) - // Only allow the possibility of report upload in official builds. This - // crash server won't have symbols for any other build types. + return kDefaultUploadUrl; + } + diff --git a/patches/components-embedder_support-user_agent_utils.cc.patch b/patches/components-embedder_support-user_agent_utils.cc.patch index f56bb05f47e1..f1ef993a343f 100644 --- a/patches/components-embedder_support-user_agent_utils.cc.patch +++ b/patches/components-embedder_support-user_agent_utils.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc -index 456414fea977bfdc9f41a620e626014e2e499fb4..f0a4cb5b3de06f7a66eff39ee23450b5a8c97bc6 100644 +index 2ab34ff2fc8a55da4e6403ac957ef90d30fc3bdf..c16504877a64f1ff322d67246c04aa83be6d06a5 100644 --- a/components/embedder_support/user_agent_utils.cc +++ b/components/embedder_support/user_agent_utils.cc @@ -248,6 +248,7 @@ const blink::UserAgentBrandList GetUserAgentBrandList( diff --git a/patches/components-favicon-core-favicon_database.cc.patch b/patches/components-favicon-core-favicon_database.cc.patch index 1f948747df85..3f439fc40a12 100644 --- a/patches/components-favicon-core-favicon_database.cc.patch +++ b/patches/components-favicon-core-favicon_database.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/favicon/core/favicon_database.cc b/components/favicon/core/favicon_database.cc -index 1e71a09d8c8f7626a05b08912283fe8b2a05f7ed..043768fa22ba38d9ddb742a4861dee171496cb44 100644 +index 788cc58a8d04f366d1afd228128e3abbcb3179a4..840298c001ddeec4d033dcaecfa9ed900805867d 100644 --- a/components/favicon/core/favicon_database.cc +++ b/components/favicon/core/favicon_database.cc @@ -445,6 +445,7 @@ FaviconBitmapID FaviconDatabase::AddFaviconBitmap( diff --git a/patches/components-history-core-browser-BUILD.gn.patch b/patches/components-history-core-browser-BUILD.gn.patch index ee7dcfc930c7..886b33e23335 100644 --- a/patches/components-history-core-browser-BUILD.gn.patch +++ b/patches/components-history-core-browser-BUILD.gn.patch @@ -1,10 +1,10 @@ diff --git a/components/history/core/browser/BUILD.gn b/components/history/core/browser/BUILD.gn -index 6a8274d040f7a51c05dcfb4dcdfa932c9210c4d4..8bad047a94f96524c2a4af22ca854c981bd4023f 100644 +index 8db9ac9378ea2f979ab7a8e6beb33987a704c795..7f3682b60eda9def297efdacb1f198281f996946 100644 --- a/components/history/core/browser/BUILD.gn +++ b/components/history/core/browser/BUILD.gn -@@ -159,6 +159,7 @@ static_library("browser") { - if (is_ios) { - deps += [ "//base/ios" ] +@@ -155,6 +155,7 @@ static_library("browser") { + "android/visit_sql_handler.h", + ] } + import("//brave/components/history/core/browser/sources.gni") sources += brave_components_history_core_browser_sources deps += brave_components_history_core_browser_deps } diff --git a/patches/components-history-core-browser-history_types.h.patch b/patches/components-history-core-browser-history_types.h.patch index 0f935a80464b..f0a593bdcad1 100644 --- a/patches/components-history-core-browser-history_types.h.patch +++ b/patches/components-history-core-browser-history_types.h.patch @@ -1,5 +1,5 @@ diff --git a/components/history/core/browser/history_types.h b/components/history/core/browser/history_types.h -index e76ea472f14ca1f00dbe6b2746714053873e5eb5..8153c95433489ea48202de460dda20c0ab595cc5 100644 +index 9923f0516c6227888c2b364361ce1c6d04ed70fa..d3c8cc06c81270845f39c776e7a270158cd27f1c 100644 --- a/components/history/core/browser/history_types.h +++ b/components/history/core/browser/history_types.h @@ -54,6 +54,8 @@ enum VisitSource { diff --git a/patches/components-history-core-browser-sync-typed_url_sync_bridge_unittest.cc.patch b/patches/components-history-core-browser-sync-typed_url_sync_bridge_unittest.cc.patch index 70b2a85377de..4f86ea7dd416 100644 --- a/patches/components-history-core-browser-sync-typed_url_sync_bridge_unittest.cc.patch +++ b/patches/components-history-core-browser-sync-typed_url_sync_bridge_unittest.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/history/core/browser/sync/typed_url_sync_bridge_unittest.cc b/components/history/core/browser/sync/typed_url_sync_bridge_unittest.cc -index f6af2402541425a9f53b2b6eade70216177d1582..04b100ab9e9c2db0657489e1129f176af52a47e1 100644 +index b396a2de48c821dcee672403709a179021cbe601..c223995a7a7920c8794fae293e32defb463070be 100644 --- a/components/history/core/browser/sync/typed_url_sync_bridge_unittest.cc +++ b/components/history/core/browser/sync/typed_url_sync_bridge_unittest.cc -@@ -346,6 +346,7 @@ class TypedURLSyncBridgeTest : public testing::Test { +@@ -347,6 +347,7 @@ class TypedURLSyncBridgeTest : public testing::Test { typed_url_sync_bridge_->Init(); typed_url_sync_bridge_->history_backend_observation_.Reset(); fake_history_backend_->SetTypedURLSyncBridgeForTest(std::move(bridge)); @@ -10,7 +10,7 @@ index f6af2402541425a9f53b2b6eade70216177d1582..04b100ab9e9c2db0657489e1129f176a } void TearDown() override { fake_history_backend_->Closing(); } -@@ -553,6 +554,7 @@ class TypedURLSyncBridgeTest : public testing::Test { +@@ -554,6 +555,7 @@ class TypedURLSyncBridgeTest : public testing::Test { scoped_refptr fake_history_backend_; raw_ptr typed_url_sync_bridge_ = nullptr; NiceMock mock_processor_; diff --git a/patches/components-infobars-core-infobar_delegate.h.patch b/patches/components-infobars-core-infobar_delegate.h.patch index 0af2eb901e43..dee4e60a7aef 100644 --- a/patches/components-infobars-core-infobar_delegate.h.patch +++ b/patches/components-infobars-core-infobar_delegate.h.patch @@ -1,11 +1,11 @@ diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h -index b73ffcb9031c88906841fa30925623d101c23964..10795a2f2b4c0d9f2e31293a6d120cdbfba06334 100644 +index be20a21aa17688c9635d13a6b591cd817715c164..be3a6a526f47ed2fcd739452ecd8c8e1ba4e7912 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h -@@ -185,6 +185,7 @@ class InfoBarDelegate { - TAILORED_SECURITY_SERVICE_INFOBAR_DELEGATE = 111, - CHROME_FOR_TESTING_INFOBAR_DELEGATE = 112, - EXTENSIONS_WEB_AUTH_FLOW_INFOBAR_DELEGATE = 113, +@@ -188,6 +188,7 @@ class InfoBarDelegate { + TAB_PICKUP_INFOBAR_DELEGATE = 114, + LOCAL_TEST_POLICIES_APPLIED_INFOBAR = 115, + BIDDING_AND_AUCTION_CONSENTED_DEBUGGING_DELEGATE = 116, + BRAVE_INFOBAR_DELEGATE_IDENTIFIERS }; diff --git a/patches/components-metrics-BUILD.gn.patch b/patches/components-metrics-BUILD.gn.patch index f31286091889..0da9bb4e73e3 100644 --- a/patches/components-metrics-BUILD.gn.patch +++ b/patches/components-metrics-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn -index 1f192146092457ae47797cb78497ed681c5c1003..dc53f11d6c580c729d1b1774a27020cc936cab58 100644 +index 1997a0da0c24ea8d0e231d67eb4a09bc50315d34..a4e20e6d7f5997d9871486b8c5187a658d8de98c 100644 --- a/components/metrics/BUILD.gn +++ b/components/metrics/BUILD.gn -@@ -285,6 +285,7 @@ if (!is_cronet_build || is_ios) { +@@ -283,6 +283,7 @@ if (!is_cronet_build || is_ios) { "motherboard_metrics_provider.h", ] } diff --git a/patches/components-omnibox-browser-BUILD.gn.patch b/patches/components-omnibox-browser-BUILD.gn.patch index f9e3d9762ceb..a622c0707642 100644 --- a/patches/components-omnibox-browser-BUILD.gn.patch +++ b/patches/components-omnibox-browser-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn -index 5c5d8a0ff5b526754830627fc8a7860c0c5fffda..a63d5f26b771eab2facd726655cb2cf26a3a5527 100644 +index 4698daaed87d15cba95c5be596b618c7bf531483..f2fe7df58d73938ab38d626e857aa27355b5f6a6 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn -@@ -379,6 +379,7 @@ static_library("browser") { +@@ -382,6 +382,7 @@ static_library("browser") { "//ui/base", "//ui/gfx", ] diff --git a/patches/components-omnibox-browser-autocomplete_controller.cc.patch b/patches/components-omnibox-browser-autocomplete_controller.cc.patch index c5d89b7c833c..ae4bfe954e1e 100644 --- a/patches/components-omnibox-browser-autocomplete_controller.cc.patch +++ b/patches/components-omnibox-browser-autocomplete_controller.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc -index 0352c0916353be8c708bad47520e7652eb1526af..217d11297ee9e352c74b90b9d79e684b4bcc1d5e 100644 +index 1af55724187f046bb687e1c0b12b8cfbb92f081d..df4b329fa8130191894d49b5572ea6866743f4e3 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc -@@ -850,6 +850,7 @@ void AutocompleteController::InitializeAsyncProviders(int provider_types) { +@@ -859,6 +859,7 @@ void AutocompleteController::InitializeAsyncProviders(int provider_types) { if (provider_types & AutocompleteProvider::TYPE_SEARCH) { search_provider_ = new SearchProvider(provider_client_.get(), this); providers_.push_back(search_provider_.get()); @@ -10,7 +10,7 @@ index 0352c0916353be8c708bad47520e7652eb1526af..217d11297ee9e352c74b90b9d79e684b } // Providers run in the order they're added. Add `HistoryURLProvider` after // `SearchProvider` because: -@@ -1132,6 +1133,7 @@ void AutocompleteController::SortCullAndAnnotateResult( +@@ -1143,6 +1144,7 @@ void AutocompleteController::SortCullAndAnnotateResult( absl::optional default_match_to_preserve) { result_.SortAndCull(input_, template_url_service_, triggered_feature_service_, default_match_to_preserve); diff --git a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch index 2bd3968a0c06..4f8481f5fac7 100644 --- a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch +++ b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch @@ -1,10 +1,10 @@ diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc -index f5bd5af7905c9c81b575e3b280a770e01587c1be..acb23a7517a209bac868709f351c23b96315e85f 100644 +index 52a4ae976393b99ee36f9382e4b870ef57c0bed3..138f335c70f01a264b84a67dbd9ce2b92fabcbdf 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc -@@ -520,6 +520,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, +@@ -526,6 +526,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, (*text == display_text_ || *text == url_for_editing_)) { - *url_from_text = client()->GetLocationBarModel()->GetURL(); + *url_from_text = controller_->client()->GetLocationBarModel()->GetURL(); *write_url = true; + BRAVE_ADJUST_TEXT_FOR_COPY diff --git a/patches/components-os_crypt-sync-BUILD.gn.patch b/patches/components-os_crypt-sync-BUILD.gn.patch index 4848c4bfd80b..162f2f549555 100644 --- a/patches/components-os_crypt-sync-BUILD.gn.patch +++ b/patches/components-os_crypt-sync-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn -index 7ed10085264af6f50b05e51dd93c49e3828d5b3b..278ef956d677827684c650834f78b17efd8d4b3c 100644 +index c4bca6fca7c990222b0bf65087d14b21b01c1b5f..979307d85621264c7ede4c8e74007e1afb8bd6c3 100644 --- a/components/os_crypt/sync/BUILD.gn +++ b/components/os_crypt/sync/BUILD.gn -@@ -89,6 +89,7 @@ component("os_crypt") { +@@ -88,6 +88,7 @@ component("os_crypt") { defines += [ "USE_KWALLET" ] } } diff --git a/patches/components-os_crypt-sync-keychain_password_mac.mm.patch b/patches/components-os_crypt-sync-keychain_password_mac.mm.patch index 0c50e00dd538..6cc88f39a2bf 100644 --- a/patches/components-os_crypt-sync-keychain_password_mac.mm.patch +++ b/patches/components-os_crypt-sync-keychain_password_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/components/os_crypt/sync/keychain_password_mac.mm b/components/os_crypt/sync/keychain_password_mac.mm -index e62a56a505e364dff7e1a9eb3043c01c2e3bc39f..cbd3de438c3a6ee0d4ae32e3963f26173eff19ba 100644 +index f6269925af68ce3ef9fb684bf4a1662874becae9..241910b44514e5121bc6cf7107e3d469675ff0ce 100644 --- a/components/os_crypt/sync/keychain_password_mac.mm +++ b/components/os_crypt/sync/keychain_password_mac.mm -@@ -68,12 +68,14 @@ std::string AddRandomPasswordToKeychain(const AppleKeychain& keychain, +@@ -64,12 +64,14 @@ std::string AddRandomPasswordToKeychain(const AppleKeychain& keychain, // static KeychainPassword::KeychainNameType& KeychainPassword::GetServiceName() { diff --git a/patches/components-page_info-BUILD.gn.patch b/patches/components-page_info-BUILD.gn.patch index 2352647d158c..614965dfec37 100644 --- a/patches/components-page_info-BUILD.gn.patch +++ b/patches/components-page_info-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/page_info/BUILD.gn b/components/page_info/BUILD.gn -index 406825c8b4ea02241738a68af2880f243a292cab..79caa561fd3bb5bd3d3bdeaac0743bc96000b35a 100644 +index 7178afd20e20ff1dabdc12e0f8ae1a971e4334d4..f146bdfee73f120d990e03fab769747fbd6d61f8 100644 --- a/components/page_info/BUILD.gn +++ b/components/page_info/BUILD.gn @@ -46,6 +46,7 @@ static_library("page_info") { diff --git a/patches/components-page_info-page_info.cc.patch b/patches/components-page_info-page_info.cc.patch index c69822715545..5c0468e5329f 100644 --- a/patches/components-page_info-page_info.cc.patch +++ b/patches/components-page_info-page_info.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc -index 68340f351dd3d24b5ec9d1f363d1bac5bea69897..c6e38c010b419bae75dc5647534d96bcc50c9795 100644 +index 18dd31f524a094def51ec750d5258b228c51a272..067a1176474a980acb2583614581b024372a74db 100644 --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -1191,6 +1191,7 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1230,6 +1230,7 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { diff --git a/patches/components-password_manager-core-browser-login_database.cc.patch b/patches/components-password_manager-core-browser-login_database.cc.patch index 9c9ad6ab61c9..d8a6234a68d1 100644 --- a/patches/components-password_manager-core-browser-login_database.cc.patch +++ b/patches/components-password_manager-core-browser-login_database.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc -index 56bc0ddcc04277c8dfcf273cf263090d67b1d2bb..e9d5145981d23583cde430051c6965ad7e0a2a5c 100644 +index bd141902d35c85d8e946703b7b327bd855ccca6f..7299efc480dba1f22fe69028e8ee7745c4bd37f8 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc -@@ -2067,6 +2067,7 @@ FormRetrievalResult LoginDatabase::StatementToForms( +@@ -2145,6 +2145,7 @@ FormRetrievalResult LoginDatabase::StatementToForms( EncryptionResult result = InitPasswordFormFromStatement( *statement, /*decrypt_and_fill_password_value=*/true, new_form.get()); diff --git a/patches/components-password_manager-core-browser-password_form_filling.cc.patch b/patches/components-password_manager-core-browser-password_form_filling.cc.patch index e83fa85749be..3e358131713f 100644 --- a/patches/components-password_manager-core-browser-password_form_filling.cc.patch +++ b/patches/components-password_manager-core-browser-password_form_filling.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/password_manager/core/browser/password_form_filling.cc b/components/password_manager/core/browser/password_form_filling.cc -index 5892761f953cd2c091ebed202ab90e30fcf90d90..51a355390cb5ce081251894e126caa95358bf780 100644 +index 144a61f883521a181c98357e62e248e3d9904277..699babdeb0b1ed98cfc30d1a0ed4cb0fc9da5c38 100644 --- a/components/password_manager/core/browser/password_form_filling.cc +++ b/components/password_manager/core/browser/password_form_filling.cc -@@ -254,6 +254,7 @@ LikelyFormFilling SendFillInformationToRenderer( +@@ -252,6 +252,7 @@ LikelyFormFilling SendFillInformationToRenderer( bool wait_for_username = wait_for_username_reason != WaitForUsernameReason::kDontWait; diff --git a/patches/components-permissions-BUILD.gn.patch b/patches/components-permissions-BUILD.gn.patch index c3f4f65167d6..799adb1a156f 100644 --- a/patches/components-permissions-BUILD.gn.patch +++ b/patches/components-permissions-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/BUILD.gn b/components/permissions/BUILD.gn -index 96b0d921480d6d6ac6f154d777f8de6edf58b6ba..676f8d61189018182b5bb8ad0afbbf01da788f6d 100644 +index cba0ed139ae181b4ed5295b5b0f1a20bf4016e9f..0e3905a7c31c8a52d81f6c233cba0c23ca519a07 100644 --- a/components/permissions/BUILD.gn +++ b/components/permissions/BUILD.gn -@@ -142,6 +142,7 @@ source_set("permissions") { +@@ -138,6 +138,7 @@ source_set("permissions") { "contexts/geolocation_permission_context_system.h", ] } diff --git a/patches/components-permissions-android-BUILD.gn.patch b/patches/components-permissions-android-BUILD.gn.patch index e96a4518a90c..cd99b95c288a 100644 --- a/patches/components-permissions-android-BUILD.gn.patch +++ b/patches/components-permissions-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/permissions/android/BUILD.gn b/components/permissions/android/BUILD.gn -index 3f4b6423884abe927947020bc5cd3c2ff486cc08..4a879a1df18268525a0c32042666bea91bca45d4 100644 +index 519d89d616047a40bea707edd6234a10010cb2d2..e5adbbe6e58da5670bfcc03bb6d17efb854dbcac 100644 --- a/components/permissions/android/BUILD.gn +++ b/components/permissions/android/BUILD.gn @@ -113,6 +113,7 @@ android_library("java") { diff --git a/patches/components-permissions-permission_manager.cc.patch b/patches/components-permissions-permission_manager.cc.patch index dbddf7288289..067a30951fac 100644 --- a/patches/components-permissions-permission_manager.cc.patch +++ b/patches/components-permissions-permission_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/permission_manager.cc b/components/permissions/permission_manager.cc -index 128fb3a8b1a99d5be25f67c77de29899076720a8..2680b741bc458c3c5f2bf97191e53d454046ce84 100644 +index 354f19020944438c7f9e4ef61cb78b63031e1d70..b35b49d9540240f06f93cb41466ace22f1c6fa60 100644 --- a/components/permissions/permission_manager.cc +++ b/components/permissions/permission_manager.cc -@@ -324,6 +324,7 @@ void PermissionManager::RequestPermissionsFromCurrentDocument( +@@ -325,6 +325,7 @@ void PermissionManager::RequestPermissionsFromCurrentDocument( permission_status_callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); const GURL requesting_origin = @@ -10,7 +10,7 @@ index 128fb3a8b1a99d5be25f67c77de29899076720a8..2680b741bc458c3c5f2bf97191e53d45 PermissionUtil::GetLastCommittedOriginAsURL(render_frame_host); RequestPermissionsInternal(permissions_types, render_frame_host, requesting_origin, user_gesture, -@@ -374,6 +375,7 @@ PermissionManager::GetPermissionResultForCurrentDocument( +@@ -377,6 +378,7 @@ PermissionManager::GetPermissionResultForCurrentDocument( PermissionUtil::PermissionTypeToContentSettingType(permission); const GURL requesting_origin = diff --git a/patches/components-permissions-permission_uma_util.cc.patch b/patches/components-permissions-permission_uma_util.cc.patch index 06a04e9f18a8..fc33f7bef8ec 100644 --- a/patches/components-permissions-permission_uma_util.cc.patch +++ b/patches/components-permissions-permission_uma_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/permission_uma_util.cc b/components/permissions/permission_uma_util.cc -index cfadbd5701c8d47142ab7f7549bbeeba118033a0..d27a3aaa9cae1c2e0f45f1eb505292d41e57d9f5 100644 +index 87ea482d898b8b5fc546cbfe327d706f18b09a71..8f484532265a7b23f0d8e56e4bf2ac1e25e59b78 100644 --- a/components/permissions/permission_uma_util.cc +++ b/components/permissions/permission_uma_util.cc -@@ -126,6 +126,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { +@@ -122,6 +122,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { #endif case RequestType::kTopLevelStorageAccess: return RequestTypeForUma::PERMISSION_TOP_LEVEL_STORAGE_ACCESS; diff --git a/patches/components-permissions-request_type.cc.patch b/patches/components-permissions-request_type.cc.patch index 14be177fe1aa..75d26666efa6 100644 --- a/patches/components-permissions-request_type.cc.patch +++ b/patches/components-permissions-request_type.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/request_type.cc b/components/permissions/request_type.cc -index 1e1d23d40c3239c86e5810eb9978aaf51b0827f7..700b0668da1a69412ba0230a4aa1158d9df44ae6 100644 +index 26622d269e40c72329dcd5df28e397ed068e7660..47d478ce72f190b9d26f453c93bba3d202056780 100644 --- a/components/permissions/request_type.cc +++ b/components/permissions/request_type.cc -@@ -408,6 +408,7 @@ const char* PermissionKeyForRequestType(permissions::RequestType request_type) { +@@ -397,6 +397,7 @@ const char* PermissionKeyForRequestType(permissions::RequestType request_type) { return "window_placement"; } #endif diff --git a/patches/components-policy-tools-generate_policy_source.py.patch b/patches/components-policy-tools-generate_policy_source.py.patch index cb4a9584df09..882d1fc343b0 100644 --- a/patches/components-policy-tools-generate_policy_source.py.patch +++ b/patches/components-policy-tools-generate_policy_source.py.patch @@ -1,8 +1,8 @@ diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py -index 05976fd4c215a51496817f2e2d074047c11cbd3f..60279198e2f39a1711d06cc7c10a0f81aa0cb4a6 100755 +index e9d31053cb2eae737463004be9cb66e44bcd1058..5fc988331d4abf8eca9d0f84e713ecef4cf3a20d 100755 --- a/components/policy/tools/generate_policy_source.py +++ b/components/policy/tools/generate_policy_source.py -@@ -55,6 +55,7 @@ PLATFORM_STRINGS = { +@@ -43,6 +43,7 @@ PLATFORM_STRINGS = { 'chrome.win7': ['win'], } @@ -10,7 +10,7 @@ index 05976fd4c215a51496817f2e2d074047c11cbd3f..60279198e2f39a1711d06cc7c10a0f81 class PolicyDetails: """Parses a policy template and caches all its details.""" -@@ -368,6 +369,7 @@ def main(): +@@ -356,6 +357,7 @@ def main(): chrome_major_version = ParseVersionFile(version_path) template_file_contents = _LoadJSONFile(template_file_name) diff --git a/patches/components-safe_browsing-content-browser-safe_browsing_network_context.cc.patch b/patches/components-safe_browsing-content-browser-safe_browsing_network_context.cc.patch index 518c3d01bf07..db0c9ec5324c 100644 --- a/patches/components-safe_browsing-content-browser-safe_browsing_network_context.cc.patch +++ b/patches/components-safe_browsing-content-browser-safe_browsing_network_context.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/safe_browsing/content/browser/safe_browsing_network_context.cc b/components/safe_browsing/content/browser/safe_browsing_network_context.cc -index 8026565bb441413d69f700161a6b83a8c48faa2c..b1d5ee4dc2017e564bb223c803910b2b6c453102 100644 +index 05e440f325c121e4733b563fbb367dff7e38193a..85cc0e129e14679b7d1b909ae6c6e987ae6b5eab 100644 --- a/components/safe_browsing/content/browser/safe_browsing_network_context.cc +++ b/components/safe_browsing/content/browser/safe_browsing_network_context.cc -@@ -85,8 +85,8 @@ class SafeBrowsingNetworkContext::SharedURLLoaderFactory +@@ -81,8 +81,8 @@ class SafeBrowsingNetworkContext::SharedURLLoaderFactory override { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); GetURLLoaderFactory()->CreateLoaderAndStart( diff --git a/patches/components-safe_browsing-core-browser-db-v4_local_database_manager.cc.patch b/patches/components-safe_browsing-core-browser-db-v4_local_database_manager.cc.patch deleted file mode 100644 index 4e2f0263a9c7..000000000000 --- a/patches/components-safe_browsing-core-browser-db-v4_local_database_manager.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/components/safe_browsing/core/browser/db/v4_local_database_manager.cc b/components/safe_browsing/core/browser/db/v4_local_database_manager.cc -index 29d6a3f47f19abd54adf670264cbac5f319f94eb..8343f2ce04680ff46ea954e2fc226081fa5544c5 100644 ---- a/components/safe_browsing/core/browser/db/v4_local_database_manager.cc -+++ b/components/safe_browsing/core/browser/db/v4_local_database_manager.cc -@@ -109,7 +109,7 @@ ListInfos GetListInfos() { - SB_THREAT_TYPE_BLOCKLISTED_RESOURCE), - ListInfo(kSyncAlways, "UrlBilling.store", GetUrlBillingId(), - SB_THREAT_TYPE_BILLING), -- ListInfo(kSyncOnChromeDesktopBuilds, "UrlCsdDownloadAllowlist.store", -+ ListInfo(kSyncOnDesktopBuilds, "UrlCsdDownloadAllowlist.store", - GetUrlCsdDownloadAllowlistId(), SB_THREAT_TYPE_UNUSED), - ListInfo(kSyncOnChromeDesktopBuilds || kSyncOnIos, - "UrlCsdAllowlist.store", GetUrlCsdAllowlistId(), diff --git a/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch b/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch index 8a457a7319d8..e1bf4bd45d61 100644 --- a/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch +++ b/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc -index 46efd8f5202cc6ba5661f0e42e14333699302c70..e309f77d998bcaf1caa51fcb6557a78a018bb4c3 100644 +index 82c62b25c6bbb8b10db41fb6925c0fb227383e14..5f95a9d91de81bd1e9a3808d0ade4c3683950d2e 100644 --- a/components/safe_browsing/core/common/safe_browsing_prefs.cc +++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc -@@ -170,6 +170,7 @@ bool IsSafeBrowsingEnabled(const PrefService& prefs) { +@@ -181,6 +181,7 @@ bool IsSafeBrowsingEnabled(const PrefService& prefs) { } bool IsEnhancedProtectionEnabled(const PrefService& prefs) { diff --git a/patches/components-search_engines-BUILD.gn.patch b/patches/components-search_engines-BUILD.gn.patch index 6de3e4e3d9ef..62f85a0c1c10 100644 --- a/patches/components-search_engines-BUILD.gn.patch +++ b/patches/components-search_engines-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn -index 889f7cffc9773a897708aca1a7f3835068e96912..a08fbd168b03def482eef7870f3d8f100ae32fbd 100644 +index 991a802ea030f48a90aac32527cd1acbfff8fc88..dfff183a44e95cbf2e4ade44ca6e210fe15a6f31 100644 --- a/components/search_engines/BUILD.gn +++ b/components/search_engines/BUILD.gn -@@ -203,6 +203,7 @@ json_to_struct("prepopulated_engines") { +@@ -210,6 +210,7 @@ json_to_struct("prepopulated_engines") { schema_file = "prepopulated_engines_schema.json" namespace = "TemplateURLPrepopulateData" deps = [ ":search_engine_type" ] diff --git a/patches/components-signin-internal-identity_manager-BUILD.gn.patch b/patches/components-signin-internal-identity_manager-BUILD.gn.patch index a52a316ce80a..584696f769a0 100644 --- a/patches/components-signin-internal-identity_manager-BUILD.gn.patch +++ b/patches/components-signin-internal-identity_manager-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/signin/internal/identity_manager/BUILD.gn b/components/signin/internal/identity_manager/BUILD.gn -index 9f60b61bfeef79f411ac2c9d31ea83a034b3f572..bc6ac5c17fcbb7104dd8007c162c61ab19f12375 100644 +index 34e06e715719d2f4590e2156022667dd4c3df5a8..426aac7a3a2ba7267401e2f233064c53c4461e60 100644 --- a/components/signin/internal/identity_manager/BUILD.gn +++ b/components/signin/internal/identity_manager/BUILD.gn -@@ -141,6 +141,7 @@ source_set("identity_manager") { +@@ -142,6 +142,7 @@ source_set("identity_manager") { "device_accounts_synchronizer_impl.h", ] } diff --git a/patches/components-sync-BUILD.gn.patch b/patches/components-sync-BUILD.gn.patch index 835f004a0fd9..93f53ee085c7 100644 --- a/patches/components-sync-BUILD.gn.patch +++ b/patches/components-sync-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn -index f11539877c432ec62736519704e71e81a5ce7562..4909a81874006930a2ba8fa3165af5ed3fcef77e 100644 +index 3e5ddf17284657f02db00e29ed9b9cfa16cc3657..adb231245aebc918015632732e612d304039201d 100644 --- a/components/sync/BUILD.gn +++ b/components/sync/BUILD.gn -@@ -19,6 +19,7 @@ group("sync") { +@@ -16,6 +16,7 @@ group("sync") { if (is_chromeos) { public_deps += [ "//components/sync/chromeos" ] } diff --git a/patches/components-sync-engine-model_type_worker.h.patch b/patches/components-sync-engine-model_type_worker.h.patch index a4eebf018e37..b5052c565e19 100644 --- a/patches/components-sync-engine-model_type_worker.h.patch +++ b/patches/components-sync-engine-model_type_worker.h.patch @@ -1,5 +1,5 @@ diff --git a/components/sync/engine/model_type_worker.h b/components/sync/engine/model_type_worker.h -index cb78cb60db3a77aecca94edba4569372b0406ed3..2343005a548ddff0f5c1bf4c26ade696c389d44a 100644 +index 008c09fac6d231d1e9d9a21d4928bc17f84d9ee2..9f97f203b5d85d8d766d8bd2d3c55f2918c47f91 100644 --- a/components/sync/engine/model_type_worker.h +++ b/components/sync/engine/model_type_worker.h @@ -207,6 +207,7 @@ class ModelTypeWorker : public UpdateHandler, diff --git a/patches/components-sync-engine-syncer_proto_util.cc.patch b/patches/components-sync-engine-syncer_proto_util.cc.patch index 73d72402afcb..a680de620805 100644 --- a/patches/components-sync-engine-syncer_proto_util.cc.patch +++ b/patches/components-sync-engine-syncer_proto_util.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/sync/engine/syncer_proto_util.cc b/components/sync/engine/syncer_proto_util.cc -index 2a174e799e26e2b8e9f447ec52246174d2c61153..42824bfa3812f62fc480ef60864655d70fdbe1e8 100644 +index 26e45bfa0c09d378ce97e76bb37082125586625a..1d46c0a228c29c9a395cf44ec9b50f7fab051e7e 100644 --- a/components/sync/engine/syncer_proto_util.cc +++ b/components/sync/engine/syncer_proto_util.cc @@ -290,6 +290,7 @@ SyncerError SyncerProtoUtil::HandleClientToServerMessageResponse( diff --git a/patches/components-sync-protocol-device_info_specifics.proto.patch b/patches/components-sync-protocol-device_info_specifics.proto.patch index fc0de6021402..11da99e4f963 100644 --- a/patches/components-sync-protocol-device_info_specifics.proto.patch +++ b/patches/components-sync-protocol-device_info_specifics.proto.patch @@ -1,5 +1,5 @@ diff --git a/components/sync/protocol/device_info_specifics.proto b/components/sync/protocol/device_info_specifics.proto -index d14dec2b4aca53a69da5612bfb42e9585bd00834..36720b0f758a90f9e6c26db91ef84598c0219c09 100644 +index 19f5e12ec2155d5d9c24f6f9d0c6ce327c632245..68a09002c0ef8afe863ab9c4f0c5b066582b55be 100644 --- a/components/sync/protocol/device_info_specifics.proto +++ b/components/sync/protocol/device_info_specifics.proto @@ -17,6 +17,7 @@ option optimize_for = LITE_RUNTIME; diff --git a/patches/components-sync-protocol-proto_visitors.h.patch b/patches/components-sync-protocol-proto_visitors.h.patch index 3a12e536e687..94b9f5a61b41 100644 --- a/patches/components-sync-protocol-proto_visitors.h.patch +++ b/patches/components-sync-protocol-proto_visitors.h.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/protocol/proto_visitors.h b/components/sync/protocol/proto_visitors.h -index 60553dcf9308c1ffa178e4ce47f3dfd041a5b649..03e09fcefcdb767175ba1c9cbf2f2dceecdeb00e 100644 +index b477edb0805791b699839adecca1685c2dce1c24..f09307cd27aca7f120eee5a08f88559294220fe2 100644 --- a/components/sync/protocol/proto_visitors.h +++ b/components/sync/protocol/proto_visitors.h -@@ -494,6 +494,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { +@@ -507,6 +507,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { VISIT(manufacturer); VISIT(last_updated_timestamp); VISIT(feature_fields); @@ -10,7 +10,7 @@ index 60553dcf9308c1ffa178e4ce47f3dfd041a5b649..03e09fcefcdb767175ba1c9cbf2f2dce VISIT(sharing_fields); VISIT(invalidation_fields); VISIT(paask_fields); -@@ -508,6 +509,7 @@ VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) { +@@ -521,6 +522,7 @@ VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) { VISIT(send_tab_to_self_receiving_enabled); } diff --git a/patches/components-sync-protocol-protocol_sources.gni.patch b/patches/components-sync-protocol-protocol_sources.gni.patch index e8f48e5b9691..85446a2dd604 100644 --- a/patches/components-sync-protocol-protocol_sources.gni.patch +++ b/patches/components-sync-protocol-protocol_sources.gni.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/protocol/protocol_sources.gni b/components/sync/protocol/protocol_sources.gni -index 483b80bffb296d4dbaa86666371a0a7bc519eb98..6bd427d5aa055e08d746ca87b2195c646fa84018 100644 +index 13edaddd17cd780ee4e3a854e3007576ae4527a6..ca8ac5a8938aee605b3b27a16e542bc43274d00d 100644 --- a/components/sync/protocol/protocol_sources.gni +++ b/components/sync/protocol/protocol_sources.gni -@@ -75,3 +75,4 @@ sync_protocol_sources = [ +@@ -76,3 +76,4 @@ sync_protocol_sources = [ "wifi_configuration_specifics.proto", "workspace_desk_specifics.proto", ] diff --git a/patches/components-sync-service-BUILD.gn.patch b/patches/components-sync-service-BUILD.gn.patch index b06dcfe2a2c6..972f26eb5ca2 100644 --- a/patches/components-sync-service-BUILD.gn.patch +++ b/patches/components-sync-service-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/service/BUILD.gn b/components/sync/service/BUILD.gn -index 0fbf33de51893436331a9339982778a626709f54..1b46935333c7a0929cbfdce30b37644ba966b6ac 100644 +index 3b894c1bbb78911076b7efc4b43beb61621b51c8..af60a0e06a4d765d1da099c0efc638f4ec00f826 100644 --- a/components/sync/service/BUILD.gn +++ b/components/sync/service/BUILD.gn -@@ -108,4 +108,5 @@ static_library("service") { +@@ -112,4 +112,5 @@ static_library("service") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patches/components-sync-service-sync_service_impl.h.patch b/patches/components-sync-service-sync_service_impl.h.patch index baba98a1e718..c61e71343572 100644 --- a/patches/components-sync-service-sync_service_impl.h.patch +++ b/patches/components-sync-service-sync_service_impl.h.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/service/sync_service_impl.h b/components/sync/service/sync_service_impl.h -index 38ef28056d8622857adcc9adfbda40741343bb3b..c1e0662bdbb2a5daa568e48adfd3124729432120 100644 +index 398c5c2d25f2e45f3a273533bf8324b554a1a311..5264879e900a5c8c2482a9f2f287628653c659b8 100644 --- a/components/sync/service/sync_service_impl.h +++ b/components/sync/service/sync_service_impl.h -@@ -251,6 +251,7 @@ class SyncServiceImpl : public SyncService, +@@ -247,6 +247,7 @@ class SyncServiceImpl : public SyncService, bool IsSyncFeatureConsideredRequested() const override; private: diff --git a/patches/components-sync_device_info-BUILD.gn.patch b/patches/components-sync_device_info-BUILD.gn.patch index aad8bc71770f..6dc2ec7d23d1 100644 --- a/patches/components-sync_device_info-BUILD.gn.patch +++ b/patches/components-sync_device_info-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/sync_device_info/BUILD.gn b/components/sync_device_info/BUILD.gn -index f8530dd2472012d7c3e93e52166e8b612e74a89f..87de713b7b7cfcff5dc0f6d3bdd5cc178ebce93f 100644 +index a5dd5cb4fa5f78b600f825e25e7f699102f8d425..f42f8e91e95775e4b5d4d28f50cec667e723e967 100644 --- a/components/sync_device_info/BUILD.gn +++ b/components/sync_device_info/BUILD.gn -@@ -95,6 +95,7 @@ static_library("sync_device_info") { +@@ -92,6 +92,7 @@ static_library("sync_device_info") { if (is_chromeos_ash) { deps += [ "//chromeos/ash/components/system" ] } diff --git a/patches/components-sync_device_info-device_info.h.patch b/patches/components-sync_device_info-device_info.h.patch index 4950b05b348f..f32308aabd20 100644 --- a/patches/components-sync_device_info-device_info.h.patch +++ b/patches/components-sync_device_info-device_info.h.patch @@ -1,8 +1,8 @@ diff --git a/components/sync_device_info/device_info.h b/components/sync_device_info/device_info.h -index 4dc748c01dbb9a364677edf112b563f44d337743..a801a93ece680e7d965101192a028ddf5d0264bf 100644 +index cf7df62bce7bcefcb83f34e5b8a49f0bc52bdcdc..74d557dc18ac3f5258d723b14acfa2a263582544 100644 --- a/components/sync_device_info/device_info.h +++ b/components/sync_device_info/device_info.h -@@ -135,6 +135,7 @@ class DeviceInfo { +@@ -145,6 +145,7 @@ class DeviceInfo { DeviceInfo(const DeviceInfo&) = delete; DeviceInfo& operator=(const DeviceInfo&) = delete; diff --git a/patches/components-sync_device_info-device_info_sync_bridge.cc.patch b/patches/components-sync_device_info-device_info_sync_bridge.cc.patch index 4e1350a95200..81973646a92f 100644 --- a/patches/components-sync_device_info-device_info_sync_bridge.cc.patch +++ b/patches/components-sync_device_info-device_info_sync_bridge.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/sync_device_info/device_info_sync_bridge.cc b/components/sync_device_info/device_info_sync_bridge.cc -index fe25228141fe95062c77a310307a79e559ce2b10..db381a3801c6a6c7f5bad85a9a835d3e0840e7e5 100644 +index 5cf60ddb5a503ab81f3648dfe4cdda4ff368ffc0..2b37bdda4f05db9b8548b2668268a0b5950e4735 100644 --- a/components/sync_device_info/device_info_sync_bridge.cc +++ b/components/sync_device_info/device_info_sync_bridge.cc -@@ -273,6 +273,7 @@ std::unique_ptr MakeLocalDeviceSpecifics( +@@ -275,6 +275,7 @@ std::unique_ptr MakeLocalDeviceSpecifics( GetSpecificsFieldNumberFromModelType(data_type)); } @@ -10,7 +10,7 @@ index fe25228141fe95062c77a310307a79e559ce2b10..db381a3801c6a6c7f5bad85a9a835d3e return specifics; } -@@ -448,6 +449,7 @@ absl::optional DeviceInfoSyncBridge::ApplyIncrementalSyncChanges( +@@ -477,6 +478,7 @@ absl::optional DeviceInfoSyncBridge::ApplyIncrementalSyncChanges( for (const std::unique_ptr& change : entity_changes) { const std::string guid = change->storage_key(); @@ -18,7 +18,7 @@ index fe25228141fe95062c77a310307a79e559ce2b10..db381a3801c6a6c7f5bad85a9a835d3e // Reupload local device if it was deleted from the server. if (local_cache_guid_ == guid && change->type() == EntityChange::ACTION_DELETE) { -@@ -458,7 +460,7 @@ absl::optional DeviceInfoSyncBridge::ApplyIncrementalSyncChanges( +@@ -487,7 +489,7 @@ absl::optional DeviceInfoSyncBridge::ApplyIncrementalSyncChanges( // Ignore any remote changes that have a cache guid that is or was this // local device. if (device_info_prefs_->IsRecentLocalCacheGuid(guid)) { @@ -27,7 +27,7 @@ index fe25228141fe95062c77a310307a79e559ce2b10..db381a3801c6a6c7f5bad85a9a835d3e } if (change->type() == EntityChange::ACTION_DELETE) { -@@ -716,6 +718,7 @@ void DeviceInfoSyncBridge::OnReadAllMetadata( +@@ -747,6 +749,7 @@ void DeviceInfoSyncBridge::OnReadAllMetadata( return; } @@ -35,7 +35,7 @@ index fe25228141fe95062c77a310307a79e559ce2b10..db381a3801c6a6c7f5bad85a9a835d3e // In the regular case for sync being disabled, wait for MergeFullSyncData() // before initializing the LocalDeviceInfoProvider. if (!syncer::IsInitialSyncDone( -@@ -949,6 +952,7 @@ DeviceInfoSyncBridge::CountActiveDevicesByType() const { +@@ -981,6 +984,7 @@ DeviceInfoSyncBridge::CountActiveDevicesByType() const { } void DeviceInfoSyncBridge::ExpireOldEntries() { diff --git a/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch b/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch deleted file mode 100644 index 06124f75e947..000000000000 --- a/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/components/translate/content/renderer/per_frame_translate_agent.cc b/components/translate/content/renderer/per_frame_translate_agent.cc -index b0347531a46e2c621c19112f9c4c88c639651db9..994c8f0b98ed199e2de2fcaf4e6d016a53b62197 100644 ---- a/components/translate/content/renderer/per_frame_translate_agent.cc -+++ b/components/translate/content/renderer/per_frame_translate_agent.cc -@@ -50,7 +50,7 @@ const int kTranslateInitCheckDelayMs = 150; - - // The maximum number of times we'll check to see if the translate library - // injected in the page is ready. --const int kMaxTranslateInitCheckAttempts = 5; -+const int kMaxTranslateInitCheckAttempts = 11; - - // The delay we wait in milliseconds before checking whether the translation has - // finished. diff --git a/patches/components-translate-content-renderer-translate_agent.cc.patch b/patches/components-translate-content-renderer-translate_agent.cc.patch index 781d9a8722f1..9631e4f75985 100644 --- a/patches/components-translate-content-renderer-translate_agent.cc.patch +++ b/patches/components-translate-content-renderer-translate_agent.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/translate/content/renderer/translate_agent.cc b/components/translate/content/renderer/translate_agent.cc -index b6b78387b1cc79bb1232c90ade8b2e2c61d7210f..69b7c66453af4fcfaee6e829e93bf1653fc104dc 100644 +index a7a63086627289983cf7f19b7a236e09683185d1..d6d333d270e2d5e5014d71ba8ffa56b14887dbf7 100644 --- a/components/translate/content/renderer/translate_agent.cc +++ b/components/translate/content/renderer/translate_agent.cc @@ -57,7 +57,7 @@ const int kTranslateInitCheckDelayMs = 150; diff --git a/patches/components-variations-variations_seed_store.cc.patch b/patches/components-variations-variations_seed_store.cc.patch index 9f58a5d52632..f16bc764eb1f 100644 --- a/patches/components-variations-variations_seed_store.cc.patch +++ b/patches/components-variations-variations_seed_store.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/variations/variations_seed_store.cc b/components/variations/variations_seed_store.cc -index eadc6c3b03696d4ab220d907dc14f36d401f4063..fe038faeb86edcdfea9cca0e37d3cf260a6137b6 100644 +index 823d77d73aa641949258ed5a00e2cc4e58a418f6..b4f6286b1ee37064240f06a20cfca70118b212d7 100644 --- a/components/variations/variations_seed_store.cc +++ b/components/variations/variations_seed_store.cc @@ -51,6 +51,7 @@ const base::FeatureParam kVariationsAsyncProcessing{ diff --git a/patches/content-browser-browser_main_loop.h.patch b/patches/content-browser-browser_main_loop.h.patch index 19d26ebe6a48..74a4cbc818dc 100644 --- a/patches/content-browser-browser_main_loop.h.patch +++ b/patches/content-browser-browser_main_loop.h.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h -index 6323c7b924eba2980c090eaa88e3752aafa1bfae..5f3160ebf936fae916e1deb6351c33e886f54a02 100644 +index b25487927b523592c5097b6b8bb818350f81603a..3b70575d29fe2338ba49dcb212ee7aae0cfcfc79 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h -@@ -159,6 +159,7 @@ class CONTENT_EXPORT BrowserMainLoop { +@@ -160,6 +160,7 @@ class CONTENT_EXPORT BrowserMainLoop { void RunMainMessageLoop(); // Performs the pre-shutdown steps. diff --git a/patches/content-browser-dom_storage-dom_storage_context_wrapper.cc.patch b/patches/content-browser-dom_storage-dom_storage_context_wrapper.cc.patch index 6c0d54454259..9746213d2585 100644 --- a/patches/content-browser-dom_storage-dom_storage_context_wrapper.cc.patch +++ b/patches/content-browser-dom_storage-dom_storage_context_wrapper.cc.patch @@ -1,5 +1,5 @@ diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc -index 68493c5922b30fb45ba6fbf8baed0b7bdf82e45c..43b536b15848f289594e5e3b4eae18b14681f19e 100644 +index 1a75aeec24e730fe1797a176be06da7868915b64..b6df80e5a8ab9bc5f92ae2f97261e09cc06e5f17 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc @@ -309,6 +309,7 @@ bool DOMStorageContextWrapper::IsRequestValid( diff --git a/patches/content-browser-gpu-gpu_internals_ui.cc.patch b/patches/content-browser-gpu-gpu_internals_ui.cc.patch index bf3b881ad75a..b00aea3de582 100644 --- a/patches/content-browser-gpu-gpu_internals_ui.cc.patch +++ b/patches/content-browser-gpu-gpu_internals_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc -index c3e7751db333499525bf10c9e73e41f5cce6698c..1d771c2817e1bb5c6f1e06240aae8e75231ec85b 100644 +index 90811bf43cbd1c9959799738c655e8adbbdf0008..a3685d52fbcf86d917e0c009117fed6733334c57 100644 --- a/content/browser/gpu/gpu_internals_ui.cc +++ b/content/browser/gpu/gpu_internals_ui.cc -@@ -807,6 +807,7 @@ base::Value::Dict GpuMessageHandler::GetClientInfo() { +@@ -838,6 +838,7 @@ base::Value::Dict GpuMessageHandler::GetClientInfo() { std::string("Skia/" STRINGIZE(SK_MILESTONE) " " SKIA_COMMIT_HASH)); dict.Set("revision_identifier", GPU_LISTS_VERSION); diff --git a/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch b/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch index d2191582a332..80afdf7ffadb 100644 --- a/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch +++ b/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc -index cedea5349cad993fce63cc5a0391b5bf6bb1435e..1c528de8483c9c74730108c23c9244bc5ebdf0d3 100644 +index af9f3a0744d1bfd5471bbf42aa7b8498e5fcd8bc..e671837f3e93c30c8c649dfe209ef70a87d0bca8 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc -@@ -3573,16 +3573,17 @@ base::WeakPtr NavigationControllerImpl::NavigateWithoutEntry( +@@ -3591,16 +3591,17 @@ base::WeakPtr NavigationControllerImpl::NavigateWithoutEntry( // Note: we intentionally leave the pending entry in place for renderer debug // URLs, unlike the cases below where we clear it if the navigation doesn't // proceed. diff --git a/patches/content-browser-renderer_host-navigation_request.cc.patch b/patches/content-browser-renderer_host-navigation_request.cc.patch index 03c8ec5253fb..7e230028d413 100644 --- a/patches/content-browser-renderer_host-navigation_request.cc.patch +++ b/patches/content-browser-renderer_host-navigation_request.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index a09b5bc4973fc3abdfc02627be515f7eaf87f2c1..04c56d9f1652fd41b6af737c60e48a405f833915 100644 +index da87a4f823d6fa36589b6efc7e3b381fdd07b11c..366c4fd83d4a15aa2cd0de3dcccc03fff8a30a53 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -3153,6 +3153,7 @@ void NavigationRequest::OnRequestRedirected( +@@ -3192,6 +3192,7 @@ void NavigationRequest::OnRequestRedirected( common_params_->url = redirect_info.new_url; common_params_->method = redirect_info.new_method; common_params_->referrer->url = GURL(redirect_info.new_referrer); @@ -10,7 +10,7 @@ index a09b5bc4973fc3abdfc02627be515f7eaf87f2c1..04c56d9f1652fd41b6af737c60e48a40 common_params_->referrer = Referrer::SanitizeForRequest( common_params_->url, *common_params_->referrer); -@@ -4761,6 +4762,7 @@ void NavigationRequest::OnStartChecksComplete( +@@ -4807,6 +4808,7 @@ void NavigationRequest::OnStartChecksComplete( headers.MergeFrom(TakeModifiedRequestHeaders()); begin_params_->headers = headers.ToString(); diff --git a/patches/content-browser-renderer_host-render_frame_host_impl.cc.patch b/patches/content-browser-renderer_host-render_frame_host_impl.cc.patch index 3a78928a89a7..314c18bd34eb 100644 --- a/patches/content-browser-renderer_host-render_frame_host_impl.cc.patch +++ b/patches/content-browser-renderer_host-render_frame_host_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 23f8f5f1042cbc85e630d57e26624963d9cbc71c..555111c8e972fd5d38b5c4d08138218ca9bf6ee3 100644 +index c8f45445a6028207b9dcd157bb04536388f4ab42..fd88e84bb6dc4a8394e5d5ad260ed6cf8f967139 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7892,6 +7892,8 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -8114,6 +8114,8 @@ void RenderFrameHostImpl::CreateNewWindow( dom_storage_context, params->session_storage_namespace_id); } diff --git a/patches/content-browser-resources-gpu-info_view.ts.patch b/patches/content-browser-resources-gpu-info_view.ts.patch index c52ae9c3d192..ed5025bedbaa 100644 --- a/patches/content-browser-resources-gpu-info_view.ts.patch +++ b/patches/content-browser-resources-gpu-info_view.ts.patch @@ -1,5 +1,5 @@ diff --git a/content/browser/resources/gpu/info_view.ts b/content/browser/resources/gpu/info_view.ts -index 04621af27197fa87ae0760480274a320057d3bfd..45638ca99b7a37d55fdf4cf2bf3040d46037add3 100644 +index 0b91cc130f46ffe135b6ef10760c5fa08e7736ad..696c48e7aef95f8b77b33b86e6fd2193b6053a3a 100644 --- a/content/browser/resources/gpu/info_view.ts +++ b/content/browser/resources/gpu/info_view.ts @@ -91,6 +91,7 @@ export class InfoViewElement extends CustomElement { diff --git a/patches/content-browser-web_contents-web_contents_impl.cc.patch b/patches/content-browser-web_contents-web_contents_impl.cc.patch index d0c14cfd717c..f56646ef2036 100644 --- a/patches/content-browser-web_contents-web_contents_impl.cc.patch +++ b/patches/content-browser-web_contents-web_contents_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c9b13be94c531a528cdbc8046d80d43fe704ef36..9834590dfe7e7b390f9b4b65b309cdb7e897beba 100644 +index b5bb5e16086d47130f5e810d1b30538ca818b908..ff47a6d9f69a1b86ad810cf96d9ebb8d2491e52d 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4223,7 +4223,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4320,7 +4320,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( // Save the window for later if we're not suppressing the opener (since it // will be shown immediately). diff --git a/patches/content-browser-zygote_host-zygote_host_impl_linux.cc.patch b/patches/content-browser-zygote_host-zygote_host_impl_linux.cc.patch index 29b7e2783234..678290ce35df 100644 --- a/patches/content-browser-zygote_host-zygote_host_impl_linux.cc.patch +++ b/patches/content-browser-zygote_host-zygote_host_impl_linux.cc.patch @@ -1,5 +1,5 @@ diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc -index 482e33baf0055bc22bba865c4e93931f27d40094..3c4012a99957c2cf834379a24594783a573f3437 100644 +index 0abcec6608a310b16512061a8bf380e4bc6d4303..35423e718472bd800873a009238126f6f9467607 100644 --- a/content/browser/zygote_host/zygote_host_impl_linux.cc +++ b/content/browser/zygote_host/zygote_host_impl_linux.cc @@ -125,6 +125,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& command_line) { diff --git a/patches/content-common-BUILD.gn.patch b/patches/content-common-BUILD.gn.patch index 2dc97d922259..46cfa9ef4b7f 100644 --- a/patches/content-common-BUILD.gn.patch +++ b/patches/content-common-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index aa1ae523aee045fb1db412a42af8aadb97e9ee2a..c8bcd750bf4bcabade9552efa83e84d386b86906 100644 +index dce27cfa39b52e39a95cee658584ed80ab1953ef..430b46e1c632a9812f080e7f6e547b11748c046b 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -67,6 +67,7 @@ source_set("common") { diff --git a/patches/content-common-frame.mojom.patch b/patches/content-common-frame.mojom.patch index 8bb5d6271f39..1ed5b36bbcd9 100644 --- a/patches/content-common-frame.mojom.patch +++ b/patches/content-common-frame.mojom.patch @@ -1,8 +1,8 @@ diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index 033780b477965e6915fc808cb468598f55050f2b..caba76d250af811415b8f8758ee4071eadb9e4fc 100644 +index a1757960b139dea126e34776e9ec7768d9e3d89d..aa93ae3c923a2cbb7c67a53654cec777b635d31e 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -560,6 +560,7 @@ struct CreateNewWindowParams { +@@ -582,6 +582,7 @@ struct CreateNewWindowParams { // Whether the opener will be suppressed in the new window, in which case // scripting the new window is not allowed. bool opener_suppressed; diff --git a/patches/content-public-browser-content_browser_client.h.patch b/patches/content-public-browser-content_browser_client.h.patch index 70d9d5a15ba7..8ff81e9e09a8 100644 --- a/patches/content-public-browser-content_browser_client.h.patch +++ b/patches/content-public-browser-content_browser_client.h.patch @@ -1,8 +1,8 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index fe0b1b96209c48d298a0de2041e2841083f891a9..bbc00e22277fc57c2f43600c7de54e46a15c8bbf 100644 +index 5fec5acd6fac364e815014ac0166c6f241acae37..8b8264c307ee5059570ed99c17b307e392c89ef7 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -2174,6 +2174,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2196,6 +2196,7 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ui::AXMode GetAXModeForBrowserContext( BrowserContext* browser_context); diff --git a/patches/content-renderer-render_frame_impl.cc.patch b/patches/content-renderer-render_frame_impl.cc.patch index 141c330c7a2a..9977255e81d7 100644 --- a/patches/content-renderer-render_frame_impl.cc.patch +++ b/patches/content-renderer-render_frame_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 556f5310719f9a9e56bb3a34d75a529b8b26f839..b79afa234670bff937f71ed957548a9eb62a80cb 100644 +index 7d1b1613a465500dc0d3b4b6633a6c0656997221..be0a83da4a26dafe6074bf19ee1187a5ed064c9a 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4495,6 +4495,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { +@@ -4531,6 +4531,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { // Temporarily return early and fix properly as part of // https://crbug.com/426555. if (web_view->MainFrame()->IsWebRemoteFrame()) diff --git a/patches/content-renderer-render_thread_impl.cc.patch b/patches/content-renderer-render_thread_impl.cc.patch index 17bb395ed56b..29aeec9585d5 100644 --- a/patches/content-renderer-render_thread_impl.cc.patch +++ b/patches/content-renderer-render_thread_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index b1ad4bd6c61089badd7eda1d95592f3f5b190a1b..b0436da5dbec26bd2886312b2127852cba094cd8 100644 +index d1f8638d390858b0872c56a62168acb7eef04db4..04a021b958eff1271718f372a88ec09930c63ffd 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -945,6 +945,7 @@ void RenderThreadImpl::InitializeRenderer( +@@ -942,6 +942,7 @@ void RenderThreadImpl::InitializeRenderer( } void RenderThreadImpl::RegisterSchemes() { diff --git a/patches/crypto-unexportable_key_metrics.cc.patch b/patches/crypto-unexportable_key_metrics.cc.patch index 1de01cd19fcd..a13af7dae759 100644 --- a/patches/crypto-unexportable_key_metrics.cc.patch +++ b/patches/crypto-unexportable_key_metrics.cc.patch @@ -1,5 +1,5 @@ diff --git a/crypto/unexportable_key_metrics.cc b/crypto/unexportable_key_metrics.cc -index cd4ed606447ee4f5b0aa0580496f8d844310773a..4791e2ed910b760e86557dfa3ba4aadbe8a7f6e2 100644 +index 2b4b9a95e6086095a8ca7c668764be665d3c7516..5868d24b6dba3f9ca2da7eecc7ee393a6255dfca 100644 --- a/crypto/unexportable_key_metrics.cc +++ b/crypto/unexportable_key_metrics.cc @@ -28,6 +28,7 @@ enum class KeyType { diff --git a/patches/extensions-browser-api-web_request-extension_web_request_event_router.cc.patch b/patches/extensions-browser-api-web_request-extension_web_request_event_router.cc.patch new file mode 100644 index 000000000000..b2b59125e81e --- /dev/null +++ b/patches/extensions-browser-api-web_request-extension_web_request_event_router.cc.patch @@ -0,0 +1,12 @@ +diff --git a/extensions/browser/api/web_request/extension_web_request_event_router.cc b/extensions/browser/api/web_request/extension_web_request_event_router.cc +index 7a29adc72df19d359272bb37fa55d8b9b5cb9912..6eff2126c6a85481be86fcb3526eb224e5b20119 100644 +--- a/extensions/browser/api/web_request/extension_web_request_event_router.cc ++++ b/extensions/browser/api/web_request/extension_web_request_event_router.cc +@@ -1168,6 +1168,7 @@ ExtensionWebRequestEventRouter::OnAuthRequired( + const net::AuthChallengeInfo& auth_info, + AuthCallback callback, + net::AuthCredentials* credentials) { ++ BRAVE_EXTENSION_WEB_REQUEST_EVENT_ROUTER_ON_AUTH_REQUIRED + // No browser_context means that this is for authentication challenges in the + // system context. Skip in that case. Also skip sensitive requests. + if (!browser_context || diff --git a/patches/extensions-browser-api-web_request-web_request_api.cc.patch b/patches/extensions-browser-api-web_request-web_request_api.cc.patch deleted file mode 100644 index b44daf3cfaaf..000000000000 --- a/patches/extensions-browser-api-web_request-web_request_api.cc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc -index ca8c4159e10d0fac3f5a5302d6a0d829c51cb90f..1d132044a8abd7181190c6f590cb132a89f0e900 100644 ---- a/extensions/browser/api/web_request/web_request_api.cc -+++ b/extensions/browser/api/web_request/web_request_api.cc -@@ -1445,6 +1445,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired( - const net::AuthChallengeInfo& auth_info, - AuthCallback callback, - net::AuthCredentials* credentials) { -+ ClearSignaled(request->id, kOnBeforeSendHeaders); -+ ClearSignaled(request->id, kOnSendHeaders); -+ ClearSignaled(request->id, kOnHeadersReceived); - // No browser_context means that this is for authentication challenges in the - // system context. Skip in that case. Also skip sensitive requests. - if (!browser_context || diff --git a/patches/extensions-browser-extension_creator.cc.patch b/patches/extensions-browser-extension_creator.cc.patch index 9132e3f01b73..802eec2968a7 100644 --- a/patches/extensions-browser-extension_creator.cc.patch +++ b/patches/extensions-browser-extension_creator.cc.patch @@ -1,8 +1,8 @@ diff --git a/extensions/browser/extension_creator.cc b/extensions/browser/extension_creator.cc -index 32a4a80c7c08351572f01a14a2171baf92dd6c98..28ad2f03e722ffd9c18d5a5c2cac8df943e4d5ff 100644 +index 3f982183b3b457fa2c72f1893ac752b3fe4b302f..91de0968f32ec8f57780cfc25334810be7436050 100644 --- a/extensions/browser/extension_creator.cc +++ b/extensions/browser/extension_creator.cc -@@ -225,7 +225,7 @@ bool ExtensionCreator::CreateCrx( +@@ -223,7 +223,7 @@ bool ExtensionCreator::CreateCrx( result = crx_file::CreateCrxWithVerifiedContentsInHeader( crx_path, zip_path, private_key, compressed_verified_contents.value()); } else { diff --git a/patches/extensions-common-api-_api_features.json.patch b/patches/extensions-common-api-_api_features.json.patch index 587c5ac3562c..6939b73a68b0 100644 --- a/patches/extensions-common-api-_api_features.json.patch +++ b/patches/extensions-common-api-_api_features.json.patch @@ -1,8 +1,8 @@ diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json -index 9e44dacaad3c6392b3d5cc9e90e5cb8cb2f492c6..eef469a9a34dc1eb93749844fd2e50f6402933bb 100644 +index 0c8b15e7f7b7e46208e0d221beb64576482d3390..c02e373ba5d0ff14cf78731a66e781cd632bb997 100644 --- a/extensions/common/api/_api_features.json +++ b/extensions/common/api/_api_features.json -@@ -651,6 +651,7 @@ +@@ -634,6 +634,7 @@ "matches": [ "chrome://password-change/*", "chrome://file-manager/*" diff --git a/patches/ios-chrome-app-BUILD.gn.patch b/patches/ios-chrome-app-BUILD.gn.patch index bb2e8a5c7a86..541fe4bc90e1 100644 --- a/patches/ios-chrome-app-BUILD.gn.patch +++ b/patches/ios-chrome-app-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/app/BUILD.gn b/ios/chrome/app/BUILD.gn -index b961c304aa10fbf3f742c1e2fd567c6bb420ddf5..6ecdd8742703b0e4f4ec9927891e4649785a24a6 100644 +index 2408035d9a2e9aeb0a652b5a7f9feb19baceb928..06334ddd4279be6a37c024e1aee13c680896b44f 100644 --- a/ios/chrome/app/BUILD.gn +++ b/ios/chrome/app/BUILD.gn -@@ -739,8 +739,7 @@ ios_app_bundle("chrome") { +@@ -727,8 +727,7 @@ chrome_app("chrome") { # (see https://crbug.com/1394553 for details of the build failure). This # is a stop-gap solution. if (target_environment == "catalyst" || diff --git a/patches/ios-chrome-browser-net-BUILD.gn.patch b/patches/ios-chrome-browser-net-BUILD.gn.patch index 593eefe5e04a..259482783209 100644 --- a/patches/ios-chrome-browser-net-BUILD.gn.patch +++ b/patches/ios-chrome-browser-net-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/browser/net/BUILD.gn b/ios/chrome/browser/net/BUILD.gn -index 6a4edc57f2c2d9d32f62b379c75b374ed0db03fd..7d6bd4d1ece28392b4414891f16637daeb7a5889 100644 +index e4ad854eb4677d2a764aaf10756d044fc7256815..cdc00faba7771a5ebf97197b25016a93c5ca58ff 100644 --- a/ios/chrome/browser/net/BUILD.gn +++ b/ios/chrome/browser/net/BUILD.gn -@@ -42,6 +42,7 @@ source_set("net") { +@@ -41,6 +41,7 @@ source_set("net") { ":crurl", ":net_types", ] diff --git a/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch b/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch index 9167ca3e48ec..628fb6e04e0f 100644 --- a/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch +++ b/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/browser/net/ios_chrome_network_delegate.h b/ios/chrome/browser/net/ios_chrome_network_delegate.h -index 54c1fe97aeb809ade1f006c16b39accaf6c29d61..89651bcda50f462abff019ba52998f19f757d55e 100644 +index 9441a2b4b113799aed64bf800f403832e802751f..cf73f22d04efbc48260f890a55098be69e900798 100644 --- a/ios/chrome/browser/net/ios_chrome_network_delegate.h +++ b/ios/chrome/browser/net/ios_chrome_network_delegate.h -@@ -49,6 +49,7 @@ class IOSChromeNetworkDelegate : public net::NetworkDelegateImpl { +@@ -50,6 +50,7 @@ class IOSChromeNetworkDelegate : public net::NetworkDelegateImpl { PrefService* pref_service); private: diff --git a/patches/ios-chrome-browser-shared-model-prefs-browser_prefs.mm.patch b/patches/ios-chrome-browser-shared-model-prefs-browser_prefs.mm.patch index a8add605c601..b0856e33abd5 100644 --- a/patches/ios-chrome-browser-shared-model-prefs-browser_prefs.mm.patch +++ b/patches/ios-chrome-browser-shared-model-prefs-browser_prefs.mm.patch @@ -1,26 +1,26 @@ diff --git a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm -index e8f26ff23d5a4235b04a41492c5dbedd88ec7c03..b79a24ac865b276a5213e8544cbcd002b5ff8319 100644 +index 1fa0cd98c343546757fbbf08468e43eb786c250f..38744f944c6b95e1cb5fd04ef9e42724f20cea61 100644 --- a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm +++ b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm -@@ -260,6 +260,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { - // since a freshness signal of the Most Visited Sites. - registry->RegisterIntegerPref( - prefs::kIosMagicStackSegmentationMVTImpressionsSinceFreshness, -1); +@@ -299,6 +299,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { + prefs::kIosSafetyCheckManagerSafeBrowsingCheckResult, + NameForSafetyCheckState(SafeBrowsingSafetyCheckState::kDefault), + PrefRegistry::LOSSY_PREF); + BRAVE_REGISTER_LOCAL_STATE_PREFS } void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { -@@ -429,6 +430,7 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { - ntp_snippets::prefs::RegisterProfilePrefsForMigrationApril2023(registry); - - registry->RegisterBooleanPref(kDeprecatedReadingListHasUnseenEntries, false); +@@ -479,6 +480,7 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { + // Register pref used to detect addresses in web page + registry->RegisterBooleanPref(prefs::kDetectAddressesEnabled, true); + registry->RegisterBooleanPref(prefs::kDetectAddressesAccepted, false); + BRAVE_REGISTER_BROWSER_STATE_PREFS } // This method should be periodically pruned of year+ old migrations. -@@ -503,4 +505,5 @@ void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { - - // Added 04/2023. - ntp_snippets::prefs::MigrateObsoleteProfilePrefsApril2023(prefs); +@@ -567,4 +569,5 @@ void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { + invalidation::InvalidatorRegistrarWithMemory::ClearDeprecatedPrefs(prefs); + invalidation::PerUserTopicSubscriptionManager::ClearDeprecatedPrefs(prefs); + invalidation::FCMInvalidationService::ClearDeprecatedPrefs(prefs); + BRAVE_MIGRATE_OBSOLETE_BROWSER_STATE_PREFS } diff --git a/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch b/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch index edffce2eedb7..b9bc8194fd69 100644 --- a/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch +++ b/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/browser/sync/sync_service_factory.mm b/ios/chrome/browser/sync/sync_service_factory.mm -index ec559a4168be158ab7d484dbf1402c78a31441ca..b6d4880a49952e0d7ae3f4e6c3a2341a959898a7 100644 +index eba86ca628053db3fa07b231d30c9902589bc643..451fce16032a81256848a5908201e5e8c131c428 100644 --- a/ios/chrome/browser/sync/sync_service_factory.mm +++ b/ios/chrome/browser/sync/sync_service_factory.mm -@@ -163,7 +163,7 @@ std::unique_ptr SyncServiceFactory::BuildServiceInstanceFor( +@@ -170,7 +170,7 @@ std::unique_ptr SyncServiceFactory::BuildServiceInstanceFor( init_params.debug_identifier = browser_state->GetDebugName(); auto sync_service = diff --git a/patches/net-BUILD.gn.patch b/patches/net-BUILD.gn.patch index c65478a573d1..c8c0943eb9f6 100644 --- a/patches/net-BUILD.gn.patch +++ b/patches/net-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn -index ae9b0f4c88c58149d499898b871095a78991467d..2f7dd75f1597b0274b7361f82532767e05375c28 100644 +index a57b48653375fc907da68b94b5e87adcc95aa25a..e70785191f2faeaa764903e5658ac8e8fb6e6f6b 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1149,6 +1149,7 @@ component("net") { +@@ -1158,6 +1158,7 @@ component("net") { "reporting/reporting_uploader.h", ] } diff --git a/patches/net-cookies-canonical_cookie.cc.patch b/patches/net-cookies-canonical_cookie.cc.patch index 8744baa75d18..ed1ee12908f2 100644 --- a/patches/net-cookies-canonical_cookie.cc.patch +++ b/patches/net-cookies-canonical_cookie.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc -index 58f33fb56108f9d502054709a812594655401604..e37ef4982ffe3df111b3079e9c4b0f396b222de9 100644 +index edb3e8b305538be9e58dea5b3dd53e4aae30a67d..d9c6edf446226dde8b0c75f07e384ee12bd190da 100644 --- a/net/cookies/canonical_cookie.cc +++ b/net/cookies/canonical_cookie.cc -@@ -516,6 +516,7 @@ base::Time CanonicalCookie::ValidateAndAdjustExpiryDate( +@@ -514,6 +514,7 @@ base::Time CanonicalCookie::ValidateAndAdjustExpiryDate( // * network_handler.cc::MakeCookieFromProtocolValues fixed_creation_date = base::Time::Now(); } diff --git a/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch b/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch index ae0f8f69c12a..a633f04c4464 100644 --- a/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch +++ b/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/proxy_resolution/configured_proxy_resolution_service.cc b/net/proxy_resolution/configured_proxy_resolution_service.cc -index 2463ee9c9c2bd0bda48874014ca8f20597edb068..2f75532d718e0cf22dd586ba8ae2427fc017a67b 100644 +index 748e22105097a0cf8cdc1887c743f2bc86bdc308..3e2be523e92f946ca7ed21b5edfefa66fd1f29e3 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service.cc +++ b/net/proxy_resolution/configured_proxy_resolution_service.cc -@@ -976,6 +976,7 @@ int ConfiguredProxyResolutionService::TryToCompleteSynchronously( +@@ -982,6 +982,7 @@ int ConfiguredProxyResolutionService::TryToCompleteSynchronously( config_->value().proxy_rules().Apply(url, result); result->set_traffic_annotation( MutableNetworkTrafficAnnotationTag(config_->traffic_annotation())); diff --git a/patches/sandbox-policy-win-sandbox_win.cc.patch b/patches/sandbox-policy-win-sandbox_win.cc.patch index 7b7e192a8b48..ab6695829856 100644 --- a/patches/sandbox-policy-win-sandbox_win.cc.patch +++ b/patches/sandbox-policy-win-sandbox_win.cc.patch @@ -1,8 +1,8 @@ diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 490ecf09ab4736ef3bb30b63f50e25a4448df493..49d770ed7189a15c3f222f9e126fcc8f3eb5cac4 100644 +index 2ee0182088f41846f352fae0b67fc90448855355..1a093e5d75a3ccfae240ca493628e3c5ce762af3 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -702,6 +702,7 @@ ResultCode LaunchWithoutSandbox( +@@ -711,6 +711,7 @@ ResultCode LaunchWithoutSandbox( base::Process* process) { base::LaunchOptions options; options.handles_to_inherit = handles_to_inherit; diff --git a/patches/sandbox-win-BUILD.gn.patch b/patches/sandbox-win-BUILD.gn.patch index d5f7d95e4637..8766d547c9dc 100644 --- a/patches/sandbox-win-BUILD.gn.patch +++ b/patches/sandbox-win-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/sandbox/win/BUILD.gn b/sandbox/win/BUILD.gn -index 35acb314136dedd089a68e071a14ae78040a68c4..985804a223823dfe4cc75a44b72c9be3e5770590 100644 +index e9d67c43a84d6b1cf60743c4814b9e74e26a4e02..669883c32b824d615053dcc39823d320556b39d8 100644 --- a/sandbox/win/BUILD.gn +++ b/sandbox/win/BUILD.gn -@@ -173,6 +173,7 @@ static_library("sandbox") { +@@ -186,6 +186,7 @@ static_library("sandbox") { "ntdll.lib", "userenv.lib", ] diff --git a/patches/services-network-cookie_manager.cc.patch b/patches/services-network-cookie_manager.cc.patch index ab129b78a2c2..c7d5fca8d8fa 100644 --- a/patches/services-network-cookie_manager.cc.patch +++ b/patches/services-network-cookie_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/cookie_manager.cc b/services/network/cookie_manager.cc -index ad55d136252add1f85a53233d1063eb9ace3388c..0c64fb2e570f4bb092e882f5c9042878d7f9bf6b 100644 +index abe47939a03cec9aa08a46c49df569ff6c4c5763..988f7ba6bdefbc972ec78f8e445a4f575e7d62a2 100644 --- a/services/network/cookie_manager.cc +++ b/services/network/cookie_manager.cc -@@ -363,6 +363,7 @@ CookieDeletionInfo DeletionFilterToInfo(mojom::CookieDeletionFilterPtr filter) { +@@ -389,6 +389,7 @@ CookieDeletionInfo DeletionFilterToInfo(mojom::CookieDeletionFilterPtr filter) { delete_info.name = std::move(filter->cookie_name); delete_info.url = std::move(filter->url); delete_info.host = std::move(filter->host_name); diff --git a/patches/services-network-cookie_settings.cc.patch b/patches/services-network-cookie_settings.cc.patch deleted file mode 100644 index b73e8b230086..000000000000 --- a/patches/services-network-cookie_settings.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/services/network/cookie_settings.cc b/services/network/cookie_settings.cc -index ebb05ccaac10a42bbacfba194ea9e3be27b077c5..6e9f3dc89e5882eb437bf9d30290e9b2c119f3e8 100644 ---- a/services/network/cookie_settings.cc -+++ b/services/network/cookie_settings.cc -@@ -230,6 +230,7 @@ CookieSettings::GetCookieSettingWithMetadata( - storage_access_result = - net::cookie_util::StorageAccessResult::ACCESS_BLOCKED; - } -+ BRAVE_COOKIE_SETTINGS_GET_COOKIE_SETTINGS_INTERNAL - } - - if (cookie_setting != CONTENT_SETTING_BLOCK && !found_explicit_setting && diff --git a/patches/services-network-cors-cors_url_loader.cc.patch b/patches/services-network-cors-cors_url_loader.cc.patch index adb987fe46e9..afa5bc670188 100644 --- a/patches/services-network-cors-cors_url_loader.cc.patch +++ b/patches/services-network-cors-cors_url_loader.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/cors/cors_url_loader.cc b/services/network/cors/cors_url_loader.cc -index 71eba8cdc00f86e62550ba455b9448dc597be847..59a5537d57006a81ba8b2c9f399c04296863acb8 100644 +index d0614c83b2bb5b0fd58b497f69fdc7be2a54045d..505c29dc7a4d7e725a641845302e3c19eb1cae77 100644 --- a/services/network/cors/cors_url_loader.cc +++ b/services/network/cors/cors_url_loader.cc -@@ -732,6 +732,7 @@ void CorsURLLoader::StartRequest() { +@@ -805,6 +805,7 @@ void CorsURLLoader::StartRequest() { (fetch_cors_flag_ || (request_.method != net::HttpRequestHeaders::kGetMethod && request_.method != net::HttpRequestHeaders::kHeadMethod))) { diff --git a/patches/services-network-public-cpp-BUILD.gn.patch b/patches/services-network-public-cpp-BUILD.gn.patch index d215330ffba9..f154a68d3405 100644 --- a/patches/services-network-public-cpp-BUILD.gn.patch +++ b/patches/services-network-public-cpp-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn -index 3c49fcf0a1f9b936822d19a7206870bc14647ca7..f70da1ab4cec156a90897c335464975e92fd5d71 100644 +index 1ffcf713159f42639f664411471f2f2ffe135c97..45a8d8aededa7ee69fa72ccdd84d9a5034aa1bb3 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn -@@ -188,6 +188,7 @@ component("cpp") { +@@ -189,6 +189,7 @@ component("cpp") { "//services/proxy_resolver/public/mojom", ] diff --git a/patches/services-network-public-cpp-cors-cors.cc.patch b/patches/services-network-public-cpp-cors-cors.cc.patch index 7648c2d546b3..0f8814f521f7 100644 --- a/patches/services-network-public-cpp-cors-cors.cc.patch +++ b/patches/services-network-public-cpp-cors-cors.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/public/cpp/cors/cors.cc b/services/network/public/cpp/cors/cors.cc -index 56dcd2016f9fa38807165670ff63fa51504271f4..4bf496534bd4ece74558305f3788e3e63309aaa1 100644 +index e72cb977f6a29a3767f103ef29e3df2d31b23048..3fc6f27c4c2aad35319b7bf66a75372555d7de92 100644 --- a/services/network/public/cpp/cors/cors.cc +++ b/services/network/public/cpp/cors/cors.cc -@@ -322,6 +322,7 @@ bool IsCorsSafelistedHeader(const std::string& name, const std::string& value) { +@@ -326,6 +326,7 @@ bool IsCorsSafelistedHeader(const std::string& name, const std::string& value) { "sec-ch-ua-mobile", "sec-ch-ua-full-version", "sec-ch-ua-platform-version", diff --git a/patches/third_party-blink-common-client_hints-client_hints.cc.patch b/patches/third_party-blink-common-client_hints-client_hints.cc.patch index c373356d64a9..fe2a3fc0bac3 100644 --- a/patches/third_party-blink-common-client_hints-client_hints.cc.patch +++ b/patches/third_party-blink-common-client_hints-client_hints.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party/blink/common/client_hints/client_hints.cc -index 36f6a35286f197ac5fdbf8662e8fb5f545e22a29..c67af7e801462e33d1ea5d21f152c8d87afb8e1e 100644 +index 5c0d77d82bdd251d3c21d8ae594d2ede534255c1..8c566149df04fed84862b4e6cf020514f7f61236 100644 --- a/third_party/blink/common/client_hints/client_hints.cc +++ b/third_party/blink/common/client_hints/client_hints.cc -@@ -101,6 +101,7 @@ const PolicyFeatureToClientHintMap& GetPolicyFeatureToClientHintMap() { +@@ -103,6 +103,7 @@ const PolicyFeatureToClientHintMap& GetPolicyFeatureToClientHintMap() { } bool IsClientHintSentByDefault(network::mojom::WebClientHintsType type) { diff --git a/patches/third_party-blink-renderer-bindings-BUILD.gn.patch b/patches/third_party-blink-renderer-bindings-BUILD.gn.patch index 18c0da76d785..fce6cee38cf4 100644 --- a/patches/third_party-blink-renderer-bindings-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-bindings-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/bindings/BUILD.gn b/third_party/blink/renderer/bindings/BUILD.gn -index 01d5bdc58ddc5e2b4e13c86bf16c8ca8e577dc72..9f7ba12f895783aaa036386f0767b4893626c8f6 100644 +index df522f5c4245f754c0197c4181869202fabb43c0..ccc0b7db8c25be34da985bb6520ece22bd133f52 100644 --- a/third_party/blink/renderer/bindings/BUILD.gn +++ b/third_party/blink/renderer/bindings/BUILD.gn @@ -174,6 +174,7 @@ template("generate_bindings") { diff --git a/patches/third_party-blink-renderer-bindings-core-v8-v8_script_runner.cc.patch b/patches/third_party-blink-renderer-bindings-core-v8-v8_script_runner.cc.patch index 308043781797..752a222b9242 100644 --- a/patches/third_party-blink-renderer-bindings-core-v8-v8_script_runner.cc.patch +++ b/patches/third_party-blink-renderer-bindings-core-v8-v8_script_runner.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc b/third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc -index 141eebfb386c09bcac13a136fc05abe6e2afcaab..500c238c175a44190bea1249917e731935e5ddcb 100644 +index 996c19fc0df15b5abfe3a4a2eceb9bc8a2f3da31..89c0c7e83a0dc1a96fe15f927f699aa87c68aeb6 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc -@@ -216,7 +216,7 @@ int GetMicrotasksScopeDepth(v8::Isolate* isolate, +@@ -218,7 +218,7 @@ int GetMicrotasksScopeDepth(v8::Isolate* isolate, } // namespace @@ -11,7 +11,7 @@ index 141eebfb386c09bcac13a136fc05abe6e2afcaab..500c238c175a44190bea1249917e7319 ScriptState* script_state, const ClassicScript& classic_script, v8::ScriptOrigin origin, -@@ -260,7 +260,7 @@ v8::MaybeLocal V8ScriptRunner::CompileScript( +@@ -262,7 +262,7 @@ v8::MaybeLocal V8ScriptRunner::CompileScript( return script; } diff --git a/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch b/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch index e95bc657a673..618d9017204e 100644 --- a/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch +++ b/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni -index d479a0547c8e36bcc8500581b00cdf390b958972..c1c9a2a3465e8716620a4058683f2bb3e48c1683 100644 +index 3449b2d09007295513c10ef31a784c01e3d07f28..2be8e24aa9d3f0409ab09f4640bc8b640c0d681a 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni -@@ -2796,6 +2796,7 @@ generated_interface_sources_in_modules = [ +@@ -2822,6 +2822,7 @@ generated_interface_sources_in_modules = [ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_webgl_sub_image.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_webgl_sub_image.h", ] diff --git a/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch b/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch index f717f6e3b7b8..15025dc7b401 100644 --- a/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch +++ b/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch @@ -1,12 +1,12 @@ diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni -index 8ce8ec4fea79b204f11da261a3efe49aae762a54..459e036cc962337675d112ff55c7ffa0c5da81c5 100644 +index ac78d27520c8b54905a327eb1669937675e85b0f..a7699d0a44dd7cd4d5f0efc024da89495de9eb36 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni -@@ -1204,6 +1204,7 @@ static_idl_files_in_modules = get_path_info( - "//third_party/blink/renderer/modules/xr/xr_webgl_sub_image.idl", - ], - "abspath") -+static_idl_files_in_modules += get_path_info(brave_static_idl_files_in_modules, "abspath") +@@ -1210,6 +1210,7 @@ static_idl_files_in_modules = [ + "//third_party/blink/renderer/modules/xr/xr_webgl_layer_init.idl", + "//third_party/blink/renderer/modules/xr/xr_webgl_sub_image.idl", + ] ++static_idl_files_in_modules += brave_static_idl_files_in_modules # Direct Sockets # This uses target_os rather than current_os (which is what is_android is set diff --git a/patches/third_party-blink-renderer-bindings-scripts-bind_gen-interface.py.patch b/patches/third_party-blink-renderer-bindings-scripts-bind_gen-interface.py.patch index eea03680fdbd..cc95a63645d8 100644 --- a/patches/third_party-blink-renderer-bindings-scripts-bind_gen-interface.py.patch +++ b/patches/third_party-blink-renderer-bindings-scripts-bind_gen-interface.py.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py -index 70f6bd8a166c83fa629ec86a4b11bfb948fc88c2..102812a867d6931f03920ab8a1dc0956afd56018 100644 +index cfdef3a726650a9e800ae9315501358a81537e4a..3d18aacf5210341c016e1f4da938f6fe0b9edf70 100644 --- a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +++ b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py -@@ -8306,3 +8306,4 @@ def generate_interfaces(task_queue): +@@ -8314,3 +8314,4 @@ def generate_interfaces(task_queue): "InitIDLInterfacesForTesting", "init_idl_interfaces_for_testing", for_testing=True) diff --git a/patches/third_party-blink-renderer-bindings-scripts-bind_gen-task_queue.py.patch b/patches/third_party-blink-renderer-bindings-scripts-bind_gen-task_queue.py.patch index a2dbd47bfb72..a1f2f62709e4 100644 --- a/patches/third_party-blink-renderer-bindings-scripts-bind_gen-task_queue.py.patch +++ b/patches/third_party-blink-renderer-bindings-scripts-bind_gen-task_queue.py.patch @@ -1,12 +1,12 @@ diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py b/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py -index fad978bd8a1eb4905796377b4f4504c360054a18..ca58c2fb5ac3a4b68d252e908eff6d828e528be5 100644 +index 39e7f5eefa7da758409e45f4962c7ec0e4780808..6292c46c79051f4fedc868f2fa85584ccf6e1937 100644 --- a/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py +++ b/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py -@@ -34,6 +34,7 @@ class TaskQueue(object): +@@ -43,6 +43,7 @@ class TaskQueue(object): # TODO(crbug.com/1190269) - we can't use more than 56 # cores on Windows or Python3 may hang. self._pool_size = min(self._pool_size, 56) + from brave_task_queue_helper import limit_pool_size; limit_pool_size(self) self._pool = multiprocessing.Pool(self._pool_size, package_initializer().init) - self._requested_tasks = [] # List of (workload, func, args, kwargs) + self._requested_tasks = [] # List of _Task diff --git a/patches/third_party-blink-renderer-bindings-scripts-web_idl-composition_parts.py.patch b/patches/third_party-blink-renderer-bindings-scripts-web_idl-composition_parts.py.patch index 3aa6ee919d59..21a28e4d26f7 100644 --- a/patches/third_party-blink-renderer-bindings-scripts-web_idl-composition_parts.py.patch +++ b/patches/third_party-blink-renderer-bindings-scripts-web_idl-composition_parts.py.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/composition_parts.py b/third_party/blink/renderer/bindings/scripts/web_idl/composition_parts.py -index 9e3214af0354f44739f65478f6f97981d1d40339..b771d6f5550f433e99823187f7906d827932bdec 100644 +index 6d965b89b03d09860c0063251cf021424d3fe9a7..11c8c1697190c6d8795274acd7efc3381a6d5630 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/composition_parts.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/composition_parts.py @@ -157,6 +157,7 @@ class Location(object): diff --git a/patches/third_party-blink-renderer-core-BUILD.gn.patch b/patches/third_party-blink-renderer-core-BUILD.gn.patch index 41aa4adb74c6..329e46b80fcd 100644 --- a/patches/third_party-blink-renderer-core-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-core-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index d1ab6d45d519dd131a854b01b90295b5e7316d71..9a6630b21c9a2e272f9e8ef0dd8766eabddc6ffe 100644 +index 7b327be8a003ae01f79f71f00979ef0b2f45ac2a..2d8bee95575aabfcced665bbff548993ef2dfc1e 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -400,6 +400,7 @@ component("core") { +@@ -399,6 +399,7 @@ component("core") { "Carbon.framework", ] } diff --git a/patches/third_party-blink-renderer-core-dom-events-event_target.cc.patch b/patches/third_party-blink-renderer-core-dom-events-event_target.cc.patch index f48698750ac3..756e300bd323 100644 --- a/patches/third_party-blink-renderer-core-dom-events-event_target.cc.patch +++ b/patches/third_party-blink-renderer-core-dom-events-event_target.cc.patch @@ -1,20 +1,20 @@ diff --git a/third_party/blink/renderer/core/dom/events/event_target.cc b/third_party/blink/renderer/core/dom/events/event_target.cc -index e9e9eab7e1e75419eea085a19733d3a68be117a3..5d1039e77b3962b7ae630629ad2e6a380a8fdad6 100644 +index 606a43d2b5493e3f81c82d0a2396cbf3d7b63319..430f8a43c9bf24a70169a66da0a72b0c3567b9f1 100644 --- a/third_party/blink/renderer/core/dom/events/event_target.cc +++ b/third_party/blink/renderer/core/dom/events/event_target.cc @@ -478,6 +478,7 @@ bool EventTarget::AddEventListenerInternal( - bool added = EnsureEventTargetData().event_listener_map.Add( event_type, listener, options, ®istered_listener); if (added) { + CHECK(registered_listener); + BRAVE_EVENT_TARGET_ADD_EVENT_LISTENER_INTERNAL if (options->hasSignal()) { // Instead of passing the entire |options| here, which could create a // circular reference due to |options| holding a Member, just -@@ -639,6 +640,7 @@ bool EventTarget::RemoveEventListenerInternal( - &index_of_removed_listener, - ®istered_listener)) +@@ -638,6 +639,7 @@ bool EventTarget::RemoveEventListenerInternal( + ®istered_listener)) { return false; + } + BRAVE_EVENT_TARGET_REMOVE_EVENT_LISTENER_INTERNAL - // Notify firing events planning to invoke the listener at 'index' that - // they have one less listener to invoke. + CHECK(registered_listener); + RemovedEventListener(event_type, *registered_listener); diff --git a/patches/third_party-blink-renderer-core-frame-dom_window.h.patch b/patches/third_party-blink-renderer-core-frame-dom_window.h.patch index 2617aa580545..b0f8c35093b6 100644 --- a/patches/third_party-blink-renderer-core-frame-dom_window.h.patch +++ b/patches/third_party-blink-renderer-core-frame-dom_window.h.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/frame/dom_window.h b/third_party/blink/renderer/core/frame/dom_window.h -index 25642b379aa2f0ad45e9f8db5a3545df374f1df8..748bff51eabb2183b2eb54c3ca42be878d179fc1 100644 +index 6e86def1fd4a3f69704e79fe2fb2f041f9aeb655..1d09f2733477722489fcdc64993f0a9182de6861 100644 --- a/third_party/blink/renderer/core/frame/dom_window.h +++ b/third_party/blink/renderer/core/frame/dom_window.h -@@ -190,6 +190,7 @@ class CORE_EXPORT DOMWindow : public EventTargetWithInlineData { +@@ -191,6 +191,7 @@ class CORE_EXPORT DOMWindow : public EventTarget { void DisconnectFromFrame() { frame_ = nullptr; } diff --git a/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch b/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch index ebaadbbfb61b..08e19adc40c9 100644 --- a/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch +++ b/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -index 4798a082e34e28e8b55c86a2ed795843f8da9a65..c53b0f78a874133bc01a7d2326a7e2b22c84e5f5 100644 +index 72b4a15778f605209ff2ffd593277460c5a6a38a..5543294c041c430927f72d678cb2c8ac46ea5dd1 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc +++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -@@ -209,6 +209,7 @@ CanvasAsyncBlobCreator::CanvasAsyncBlobCreator( +@@ -207,6 +207,7 @@ CanvasAsyncBlobCreator::CanvasAsyncBlobCreator( src_data_.reset(info, src_data_.addr(), src_data_.rowBytes()); } } diff --git a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch index 2a5cd2698cd5..4abd460df913 100644 --- a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch +++ b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc -index ca9d0d350778c546d4e26bec2c19e11a72ace8cb..b7081455e1ed68d81726612e5e5e70d42bed01a5 100644 +index 7d8a59ea6e0d3983711e305ce98e99abbe0bc06a..e87dba4ae082bfdd36514e01dece759a28ccc236 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc -@@ -1166,6 +1166,7 @@ String HTMLCanvasElement::ToDataURLInternal( +@@ -1169,6 +1169,7 @@ String HTMLCanvasElement::ToDataURLInternal( if (!data_buffer) return String("data:,"); diff --git a/patches/third_party-blink-renderer-core-loader-mixed_content_checker.cc.patch b/patches/third_party-blink-renderer-core-loader-mixed_content_checker.cc.patch index 18c593cfd5f6..515040df363f 100644 --- a/patches/third_party-blink-renderer-core-loader-mixed_content_checker.cc.patch +++ b/patches/third_party-blink-renderer-core-loader-mixed_content_checker.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/loader/mixed_content_checker.cc b/third_party/blink/renderer/core/loader/mixed_content_checker.cc -index d611b09547bb871a13df9bdfd61d813f1d5ca62f..5b9879c3b74cb2332e228d4a8388b1213afcc646 100644 +index 9740fcb48303171f40192cab4e9087c28f6edb58..10761b01ecb4b7c24145002ba7d1726ca37b3335 100644 --- a/third_party/blink/renderer/core/loader/mixed_content_checker.cc +++ b/third_party/blink/renderer/core/loader/mixed_content_checker.cc @@ -270,6 +270,7 @@ bool RequestIsSubframeSubresource(Frame* frame) { diff --git a/patches/third_party-blink-renderer-core-loader-modulescript-module_script_loader.cc.patch b/patches/third_party-blink-renderer-core-loader-modulescript-module_script_loader.cc.patch index 49406d420479..e9cda20142ab 100644 --- a/patches/third_party-blink-renderer-core-loader-modulescript-module_script_loader.cc.patch +++ b/patches/third_party-blink-renderer-core-loader-modulescript-module_script_loader.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/loader/modulescript/module_script_loader.cc b/third_party/blink/renderer/core/loader/modulescript/module_script_loader.cc -index f58daab3916a364ad37ff9d625ada5a275eb4aa8..6656c48279f47e44581bdf314ca029d97492f5d5 100644 +index e6138a686984bac424dcbd3d36bd168578414e13..19b5520af9c6143b0ec7bc50005253462de0cc03 100644 --- a/third_party/blink/renderer/core/loader/modulescript/module_script_loader.cc +++ b/third_party/blink/renderer/core/loader/modulescript/module_script_loader.cc @@ -145,6 +145,7 @@ void ModuleScriptLoader::FetchInternal( diff --git a/patches/third_party-blink-renderer-core-loader-modulescript-module_tree_linker.cc.patch b/patches/third_party-blink-renderer-core-loader-modulescript-module_tree_linker.cc.patch index 0219df357ae0..d8b1d13aa07e 100644 --- a/patches/third_party-blink-renderer-core-loader-modulescript-module_tree_linker.cc.patch +++ b/patches/third_party-blink-renderer-core-loader-modulescript-module_tree_linker.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc -index 4de68c34765a435c5fc24915e12d222839501cf2..2ac0fbca2f307f3cc68d6703bbdb30e53de9b24e 100644 +index 75d4407e3ef566c03505a78de33994598f8888c6..14f05fc23b24bb8d5272daa0a33a352c3d6104c4 100644 --- a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc +++ b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc -@@ -435,6 +435,7 @@ void ModuleTreeLinker::FetchDescendants(const ModuleScript* module_script) { +@@ -443,6 +443,7 @@ void ModuleTreeLinker::FetchDescendants(const ModuleScript* module_script) { module_script->FetchOptions().GetReferrerPolicy(), mojom::blink::FetchPriorityHint::kAuto, RenderBlockingBehavior::kNonBlocking); diff --git a/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch b/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch index 8a9ff0196312..1430c23508da 100644 --- a/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch +++ b/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 -index a4c9b715e9ab9147ff6fefaa6bd2ffa2244837bb..0df5e0fa305947ca96309e78edb9aa2168e132a5 100644 +index fb7b51e46e140953a9f9a52fd6c1c8d7509a96c3..546f6d5f8745c6f997c709f7e626f0266b0f394b 100644 --- a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +++ b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 -@@ -416,5 +416,13 @@ +@@ -424,5 +424,13 @@ // Parser also accepts "window-management" alias (crbug.com/1328581). permissions_policy_name: "window-placement", }, diff --git a/patches/third_party-blink-renderer-core-script-dynamic_module_resolver.cc.patch b/patches/third_party-blink-renderer-core-script-dynamic_module_resolver.cc.patch index 522145c41002..a1468b90577d 100644 --- a/patches/third_party-blink-renderer-core-script-dynamic_module_resolver.cc.patch +++ b/patches/third_party-blink-renderer-core-script-dynamic_module_resolver.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/script/dynamic_module_resolver.cc b/third_party/blink/renderer/core/script/dynamic_module_resolver.cc -index cdc5ffd98e9625a12e78ff3188559138088088c1..9e724b50ce464e4bb0db85f36560715504d4a2ae 100644 +index 6081d670c80758054e72621c96bcc6b621a8213c..2f327a6953b1f812fae27e974c366b13313eb866 100644 --- a/third_party/blink/renderer/core/script/dynamic_module_resolver.cc +++ b/third_party/blink/renderer/core/script/dynamic_module_resolver.cc @@ -285,6 +285,7 @@ void DynamicModuleResolver::ResolveDynamically( diff --git a/patches/third_party-blink-renderer-core-script-script_loader.cc.patch b/patches/third_party-blink-renderer-core-script-script_loader.cc.patch index 357cd3120dfe..41ba46cc2311 100644 --- a/patches/third_party-blink-renderer-core-script-script_loader.cc.patch +++ b/patches/third_party-blink-renderer-core-script-script_loader.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/script/script_loader.cc b/third_party/blink/renderer/core/script/script_loader.cc -index b219bdafce6b233094351528e659ee1ad8b0f495..f8b4e0f5fbe649bad1cf0e9bdb99da566c288940 100644 +index 4540de053db6d2af0dd8394bc49057864c904b48..02fe66ff72044efeb2d312b81cbbc14896bdd45d 100644 --- a/third_party/blink/renderer/core/script/script_loader.cc +++ b/third_party/blink/renderer/core/script/script_loader.cc @@ -714,6 +714,7 @@ PendingScript* ScriptLoader::PrepareScript( diff --git a/patches/third_party-blink-renderer-modules-BUILD.gn.patch b/patches/third_party-blink-renderer-modules-BUILD.gn.patch index f7c5012d231b..f0bb40963f4f 100644 --- a/patches/third_party-blink-renderer-modules-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-modules-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn -index a74b1b700365ab54237de560c985d45dfeb80d93..2a9b9befbb1470642281a2bda13b99412b2c174e 100644 +index f586c6f41738ff6a3c126fff752066d0ff80ac30..cd9204d7966cd468fd6578de9f25aa844514e34b 100644 --- a/third_party/blink/renderer/modules/BUILD.gn +++ b/third_party/blink/renderer/modules/BUILD.gn @@ -19,6 +19,7 @@ if (is_ios) { diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch index e36cc0a2a96c..8dd72c8d853a 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -index 8ea02ffddf1a38ecb628ffd969738056ebf96ed8..29002264c682e35dc88461115d53aeb6d49c3425 100644 +index 8274015c0f15cfc5dee8ac65758ba09b6b2cf94e..22ef99206499c952a3cb68a797d8838ac7200e0a 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -2044,6 +2044,7 @@ ImageData* BaseRenderingContext2D::getImageData( +@@ -2045,6 +2045,7 @@ ImageData* BaseRenderingContext2D::getImageData( } ImageData* BaseRenderingContext2D::getImageDataInternal( @@ -10,7 +10,7 @@ index 8ea02ffddf1a38ecb628ffd969738056ebf96ed8..29002264c682e35dc88461115d53aeb6 int sx, int sy, int sw, -@@ -2184,6 +2185,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( +@@ -2187,6 +2188,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); } } diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch index 59fceff4c27b..767ef63aeb11 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc -index dcf9247f80d04d4bbb6b92c3132a2cb620328994..b2e0ce42512f7a477b1f8bf6b7a7b83012507d23 100644 +index a48dc6092ef6e50984faf6da698d117cb1005cbf..d4ec5e96ab4788d43f18c02aa882b68b5b11aee6 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc -@@ -934,6 +934,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) { +@@ -916,6 +916,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) { if (!canvas()->GetDocument().GetFrame()) return MakeGarbageCollected(); diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch index 2f85c7165c80..b39feeda0900 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl -index 435f95f1374fff2c341120d3f2ff5414afcb4946..8ce7508c203c6829182618ef2c62376243f547e1 100644 +index 57a2e4278acedaba5a97755e8c10e8c6ce39d8e2..6b240e7aa76e8594d4314b091662cdc49ede952e 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl -@@ -112,10 +112,10 @@ interface CanvasRenderingContext2D { +@@ -118,10 +118,10 @@ interface CanvasRenderingContext2D { [RuntimeEnabled=Canvas2dScrollPathIntoView] void scrollPathIntoView(optional Path2D path); void clip(optional CanvasFillRule winding); void clip(Path2D path, optional CanvasFillRule winding); @@ -17,7 +17,7 @@ index 435f95f1374fff2c341120d3f2ff5414afcb4946..8ce7508c203c6829182618ef2c623762 // text (see also the CanvasDrawingStyles interface) [HighEntropy] void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); -@@ -134,8 +134,8 @@ interface CanvasRenderingContext2D { +@@ -140,8 +140,8 @@ interface CanvasRenderingContext2D { [RaisesException] ImageData createImageData(ImageData imagedata); [RaisesException] ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh); [RaisesException] ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, ImageDataSettings imageDataSettings); diff --git a/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch index 19a8aa501f9c..3a6ddf710e46 100644 --- a/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl -index 3b3fd1c1f3ecab0b81346f72bbce02f7613fce79..765ff35fa6fab37c8e94053e087e264808f3c665 100644 +index c49bdf3cc50d1ed293aa375605c84baa4968fb5e..050b469544d85041d43f016bc69dab25737cb590 100644 --- a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl @@ -68,10 +68,10 @@ diff --git a/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch index 365dba1362e4..baa33aa41874 100644 --- a/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl b/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl -index 404d6be12d6d697b98766f32ae832cbbba830627..f8e52113b88261744d5503816b34145c42a81afe 100644 +index 7db5f95341a0e2ef8039112afd3c64a00912f623..4367eff02314a9b7e17121ae4c9d2c936b0fc61d 100644 --- a/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl @@ -63,10 +63,10 @@ diff --git a/patches/third_party-blink-renderer-modules-encryptedmedia-navigator_request_media_key_system_access.cc.patch b/patches/third_party-blink-renderer-modules-encryptedmedia-navigator_request_media_key_system_access.cc.patch index bb9d84169ed7..bbd5734ec093 100644 --- a/patches/third_party-blink-renderer-modules-encryptedmedia-navigator_request_media_key_system_access.cc.patch +++ b/patches/third_party-blink-renderer-modules-encryptedmedia-navigator_request_media_key_system_access.cc.patch @@ -1,9 +1,9 @@ diff --git a/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc b/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc -index bd248c8ae02e5c1964696c5f38f84c07224cfaf4..69d850d803ae2e626241cf69731b500609a632c6 100644 +index 45903eeab344f7b3c934af43ec5ccb37d3addfb1..3671daf89cc4a8f1056baafbe473e794aa4fa0e6 100644 --- a/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc +++ b/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc -@@ -198,6 +198,7 @@ ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess( - controller->EncryptedMediaClient(window); +@@ -194,6 +194,7 @@ ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess( + EncryptedMediaUtils::GetEncryptedMediaClientFromLocalDOMWindow(window); media_client->RequestMediaKeySystemAccess( WebEncryptedMediaRequest(initializer)); + BRAVE_NAVIGATOR_REQUEST_MEDIA_KEY_SYSTEM_ACCESS diff --git a/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch b/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch index b20f986c7f8a..3286953f82fc 100644 --- a/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch +++ b/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch @@ -1,12 +1,12 @@ diff --git a/third_party/blink/renderer/modules/mediastream/media_devices.cc b/third_party/blink/renderer/modules/mediastream/media_devices.cc -index b1bc1fe263304b7d1409ee8c47af61c5186afad0..0cf35ce44dc21bac90ef20e26f40c829c14d41a5 100644 +index 0fcf8943a65cf971a61068bf26770fc3ceb2ba13..d6fcfa04537f6fd13cae181e786ea31167b0e9be 100644 --- a/third_party/blink/renderer/modules/mediastream/media_devices.cc +++ b/third_party/blink/renderer/modules/mediastream/media_devices.cc -@@ -956,6 +956,7 @@ void MediaDevices::DevicesEnumerated( +@@ -1002,6 +1002,7 @@ void MediaDevices::DevicesEnumerated( } } + BRAVE_MEDIA_DEVICES_DEVICES_ENUMERATED RecordEnumeratedDevices(result_tracker->GetScriptState(), media_devices); - - if (enumerate_devices_test_callback_) { + result_tracker->Resolve(media_devices); + } diff --git a/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch b/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch index 3a7988448c77..1b94cece11f2 100644 --- a/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch +++ b/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc -index 9fb81576f85ef6bb9f8beb129df6a2b3aab79174..63d03cdeffec1102e07cc5383d22efbf4655dc2f 100644 +index 0933654f42a6a367d9a9f03100d25861469ec29a..0a63dc25b998ee21ec04e5998d0baf451193a0fc 100644 --- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc -@@ -5257,6 +5257,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, +@@ -5259,6 +5259,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -10,7 +10,7 @@ index 9fb81576f85ef6bb9f8beb129df6a2b3aab79174..63d03cdeffec1102e07cc5383d22efbf switch (pname) { case GL_SHADING_LANGUAGE_VERSION: { return WebGLAny( -@@ -5845,6 +5846,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( +@@ -5858,6 +5859,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( if (isContextLost() || !ValidateGetFramebufferAttachmentParameterFunc( kFunctionName, target, attachment)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -18,7 +18,7 @@ index 9fb81576f85ef6bb9f8beb129df6a2b3aab79174..63d03cdeffec1102e07cc5383d22efbf WebGLFramebuffer* framebuffer_binding = GetFramebufferBinding(target); DCHECK(!framebuffer_binding || framebuffer_binding->Object()); -@@ -6063,6 +6065,7 @@ ScriptValue WebGL2RenderingContextBase::getTexParameter( +@@ -6076,6 +6078,7 @@ ScriptValue WebGL2RenderingContextBase::getTexParameter( GLenum pname) { if (isContextLost() || !ValidateTextureBinding("getTexParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); diff --git a/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch b/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch index 61954fd7b6ee..b31559b29543 100644 --- a/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch +++ b/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325ccaaddeab1d 100644 +index 74a289a88a95318a6a1020e762b2adc1aa79911f..8d1ac8b185332f98dcadc0bf9fe90f3d16f57c51 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -3137,6 +3137,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( +@@ -3170,6 +3170,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveAttrib", program)) return nullptr; @@ -10,7 +10,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, -@@ -3168,6 +3169,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( +@@ -3201,6 +3202,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveUniform", program)) return nullptr; @@ -18,7 +18,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_UNIFORM_MAX_LENGTH, -@@ -3198,6 +3200,7 @@ absl::optional>> +@@ -3231,6 +3233,7 @@ absl::optional>> WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getAttachedShaders", program)) return absl::nullopt; @@ -26,7 +26,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca HeapVector> shader_objects; for (GLenum shaderType : {GL_VERTEX_SHADER, GL_FRAGMENT_SHADER}) { -@@ -3212,6 +3215,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, +@@ -3245,6 +3248,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name) { if (!ValidateWebGLProgramOrShader("getAttribLocation", program)) return -1; @@ -34,7 +34,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!ValidateLocationLength("getAttribLocation", name)) return -1; if (!ValidateString("getAttribLocation", name)) -@@ -3245,6 +3249,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( +@@ -3278,6 +3282,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( GLenum pname) { if (isContextLost() || !ValidateBufferTarget("getBufferParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -42,7 +42,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca switch (pname) { case GL_BUFFER_USAGE: { -@@ -3385,6 +3390,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( +@@ -3418,6 +3423,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( return ScriptValue::CreateNull(script_state->GetIsolate()); } @@ -50,7 +50,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!framebuffer_binding_ || !framebuffer_binding_->Object()) { SynthesizeGLError(GL_INVALID_OPERATION, kFunctionName, "no framebuffer bound"); -@@ -3781,6 +3787,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3814,6 +3820,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, "invalid parameter name, OES_standard_derivatives not enabled"); return ScriptValue::CreateNull(script_state->GetIsolate()); case WebGLDebugRendererInfo::kUnmaskedRendererWebgl: @@ -58,7 +58,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSampleType( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3796,6 +3803,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3829,6 +3836,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, "invalid parameter name, WEBGL_debug_renderer_info not enabled"); return ScriptValue::CreateNull(script_state->GetIsolate()); case WebGLDebugRendererInfo::kUnmaskedVendorWebgl: @@ -66,7 +66,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSampleType( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3888,6 +3896,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3921,6 +3929,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( // intended to prevent applications from entering an infinite polling loop. if (isContextLost() && pname == GL_COMPLETION_STATUS_KHR) return WebGLAny(script_state, true); @@ -74,7 +74,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!ValidateWebGLProgramOrShader("getProgramParamter", program)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -3943,6 +3952,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3976,6 +3985,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getProgramInfoLog", program)) return String(); @@ -82,7 +82,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(program)); } -@@ -3953,6 +3963,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( +@@ -3986,6 +3996,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -90,7 +90,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (target != GL_RENDERBUFFER) { SynthesizeGLError(GL_INVALID_ENUM, "getRenderbufferParameter", "invalid target"); -@@ -4004,6 +4015,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -4037,6 +4048,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( // intended to prevent applications from entering an infinite polling loop. if (isContextLost() && pname == GL_COMPLETION_STATUS_KHR) return WebGLAny(script_state, true); @@ -98,7 +98,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!ValidateWebGLProgramOrShader("getShaderParameter", shader)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -4035,6 +4047,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -4068,6 +4080,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderInfoLog", shader)) return String(); @@ -106,7 +106,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(shader)); } -@@ -4065,6 +4078,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -4098,6 +4111,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( GLint precision = 0; ContextGL()->GetShaderPrecisionFormat(shader_type, precision_type, range, &precision); @@ -114,7 +114,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca auto* result = MakeGarbageCollected( range[0], range[1], precision); if (IdentifiabilityStudySettings::Get()->ShouldSampleType( -@@ -4077,6 +4091,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -4110,6 +4124,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderSource", shader)) return String(); @@ -122,7 +122,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca return EnsureNotNull(shader->Source()); } -@@ -4102,6 +4117,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( +@@ -4135,6 +4150,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -130,7 +130,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!ValidateTextureBinding("getTexParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); switch (pname) { -@@ -4136,6 +4152,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( +@@ -4169,6 +4185,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( const WebGLUniformLocation* uniform_location) { if (!ValidateWebGLProgramOrShader("getUniform", program)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -138,7 +138,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca DCHECK(uniform_location); if (uniform_location->Program() != program) { SynthesizeGLError(GL_INVALID_OPERATION, "getUniform", -@@ -4395,6 +4412,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( +@@ -4428,6 +4445,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( const String& name) { if (!ValidateWebGLProgramOrShader("getUniformLocation", program)) return nullptr; @@ -146,7 +146,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (!ValidateLocationLength("getUniformLocation", name)) return nullptr; if (!ValidateString("getUniformLocation", name)) -@@ -4419,6 +4437,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( +@@ -4452,6 +4470,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -154,7 +154,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca if (index >= max_vertex_attribs_) { SynthesizeGLError(GL_INVALID_VALUE, "getVertexAttrib", "index out of range"); -@@ -4496,6 +4515,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, +@@ -4529,6 +4548,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, GLenum pname) { if (isContextLost()) return 0; @@ -162,7 +162,7 @@ index ebe31c7960c7d99da253d1d2259e43e0b3923803..a209d69db35e5d96012878e34e325cca GLvoid* result = nullptr; // NOTE: If pname is ever a value that returns more than 1 element // this will corrupt memory. -@@ -4855,6 +4875,7 @@ void WebGLRenderingContextBase::ReadPixelsHelper(GLint x, +@@ -4888,6 +4908,7 @@ void WebGLRenderingContextBase::ReadPixelsHelper(GLint x, int64_t offset) { if (isContextLost()) return; diff --git a/patches/third_party-blink-renderer-platform-BUILD.gn.patch b/patches/third_party-blink-renderer-platform-BUILD.gn.patch index d47fa5f58034..450ac6d30022 100644 --- a/patches/third_party-blink-renderer-platform-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-platform-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index ef3439d07ad4202ee91c2fdb919d8324b5e5a4ba..7102ef32d8854a2d9b3d3c6c333ab346d74d83c0 100644 +index 92b45cb4939df8fc71802a6828543cedf2a73664..384ca9e38c5ddab5991a4bbdbd9d87f7920e54c9 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1851,6 +1851,7 @@ component("platform") { +@@ -1841,6 +1841,7 @@ component("platform") { configs -= [ "//build/config/compiler:default_symbols" ] configs += blink_symbols_config diff --git a/patches/third_party-blink-renderer-platform-fonts-font_fallback_list.cc.patch b/patches/third_party-blink-renderer-platform-fonts-font_fallback_list.cc.patch index b05636d63e63..9a1ba70db8c2 100644 --- a/patches/third_party-blink-renderer-platform-fonts-font_fallback_list.cc.patch +++ b/patches/third_party-blink-renderer-platform-fonts-font_fallback_list.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc -index b3964e3aa3cfe776a215e6f0a1b94c1cccb14601..c27cd71452ba830d634a71b05c9142e3517be525 100644 +index 0921ae1f23ef660c58c778fdf70ebe1b594655db..ebe3280811634fd2608a8a5fa5314c2b69c3264d 100644 --- a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc +++ b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc @@ -182,6 +182,7 @@ scoped_refptr FontFallbackList::GetFontData( diff --git a/patches/third_party-rust-itoa-v0_4-BUILD.gn.patch b/patches/third_party-rust-itoa-v0_4-BUILD.gn.patch index ec0e8089500f..b2012b74697a 100644 --- a/patches/third_party-rust-itoa-v0_4-BUILD.gn.patch +++ b/patches/third_party-rust-itoa-v0_4-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/rust/itoa/v0_4/BUILD.gn b/third_party/rust/itoa/v0_4/BUILD.gn -index c1cb11bc32529df38b8579ceb92d47283cd5f87e..6c1752f9889d3d1c5523446718618bd9b0ae9dce 100644 +index c3426bb2fa7d5a45be45d743d5971e2680b1870c..7cd4f2f73f6d15e2035cd114d5f5033c5d6d39d7 100644 --- a/third_party/rust/itoa/v0_4/BUILD.gn +++ b/third_party/rust/itoa/v0_4/BUILD.gn -@@ -27,4 +27,5 @@ cargo_crate("lib") { +@@ -36,4 +36,5 @@ cargo_crate("lib") { library_configs += [ "//build/config/compiler:no_chromium_code" ] executable_configs -= [ "//build/config/compiler:chromium_code" ] executable_configs += [ "//build/config/compiler:no_chromium_code" ] diff --git a/patches/third_party-rust-rand-v0_8-BUILD.gn.patch b/patches/third_party-rust-rand-v0_8-BUILD.gn.patch index 9db90667b0c8..20600f99e4a7 100644 --- a/patches/third_party-rust-rand-v0_8-BUILD.gn.patch +++ b/patches/third_party-rust-rand-v0_8-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/rust/rand/v0_8/BUILD.gn b/third_party/rust/rand/v0_8/BUILD.gn -index edb6299865e033cc1962517cc7df7fbb1f3c4861..5fe869d2a3216dadb840ca845f378728c4ec8f1d 100644 +index 8a863fb66fc0dea0fdcce5a486c8ab18509f830b..717a635e3e42744a0bf721080765ad028243c89f 100644 --- a/third_party/rust/rand/v0_8/BUILD.gn +++ b/third_party/rust/rand/v0_8/BUILD.gn -@@ -42,6 +42,7 @@ cargo_crate("lib") { +@@ -76,6 +76,7 @@ cargo_crate("lib") { "std", "std_rng", ] diff --git a/patches/third_party-rust-serde-v1-BUILD.gn.patch b/patches/third_party-rust-serde-v1-BUILD.gn.patch index f79b46f6ebd1..b120a29bde5c 100644 --- a/patches/third_party-rust-serde-v1-BUILD.gn.patch +++ b/patches/third_party-rust-serde-v1-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/rust/serde/v1/BUILD.gn b/third_party/rust/serde/v1/BUILD.gn -index 0cc7bd91f39cd6cff8349a73791d04e6cca24509..a38b6be5763eaf26914291d9f685f4f38192dff0 100644 +index d0ca46e3b1f2867098e01121892b5c90dbdfa825..73bda1ba3fe2530f8a4541472311ed14ab4384a5 100644 --- a/third_party/rust/serde/v1/BUILD.gn +++ b/third_party/rust/serde/v1/BUILD.gn -@@ -30,4 +30,5 @@ cargo_crate("lib") { +@@ -59,4 +59,5 @@ cargo_crate("lib") { ] build_root = "crate/build.rs" build_sources = [ "crate/build.rs" ] diff --git a/patches/third_party-rust-syn-v1-BUILD.gn.patch b/patches/third_party-rust-syn-v1-BUILD.gn.patch index e038ebbfd4f2..6f7a475c23ed 100644 --- a/patches/third_party-rust-syn-v1-BUILD.gn.patch +++ b/patches/third_party-rust-syn-v1-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/rust/syn/v1/BUILD.gn b/third_party/rust/syn/v1/BUILD.gn -index 3bfb0e5f677a6f3510fa1fc71f7f43c1cc1d041f..abd77087aa85de7cdf9d1096ef595f306f6745fb 100644 +index 60fceb7f061ec9f1415e281de351a297dfdf6b32..d3b07faf9a409ec33ddf806407ab3df2464ab1e6 100644 --- a/third_party/rust/syn/v1/BUILD.gn +++ b/third_party/rust/syn/v1/BUILD.gn -@@ -41,4 +41,5 @@ cargo_crate("lib") { +@@ -136,4 +136,5 @@ cargo_crate("lib") { ] build_root = "crate/build.rs" build_sources = [ "crate/build.rs" ] diff --git a/patches/third_party-rust-winapi-v0_3-BUILD.gn.patch b/patches/third_party-rust-winapi-v0_3-BUILD.gn.patch index d44d8ba62f9b..0cbf515a4e05 100644 --- a/patches/third_party-rust-winapi-v0_3-BUILD.gn.patch +++ b/patches/third_party-rust-winapi-v0_3-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/rust/winapi/v0_3/BUILD.gn b/third_party/rust/winapi/v0_3/BUILD.gn -index f7edafac06ae7c016abd3e3f28c0764ec04bdfa0..5c0d1e01968abd311f5aba42a7e7b0c878ac3c72 100644 +index 95af7eea1cd47086ebabaac7ab42a6305d4e70b0..bf63b4083dbd5c8496bd363818dc1f3f3bff8beb 100644 --- a/third_party/rust/winapi/v0_3/BUILD.gn +++ b/third_party/rust/winapi/v0_3/BUILD.gn -@@ -42,4 +42,5 @@ cargo_crate("lib") { +@@ -452,4 +452,5 @@ cargo_crate("lib") { ] build_root = "crate/build.rs" build_sources = [ "crate/build.rs" ] diff --git a/patches/third_party/catapult/common-py_utils-py_utils-cloud_storage.py.patch b/patches/third_party/catapult/common-py_utils-py_utils-cloud_storage.py.patch index f57328e089cd..8b6ace29cfac 100644 --- a/patches/third_party/catapult/common-py_utils-py_utils-cloud_storage.py.patch +++ b/patches/third_party/catapult/common-py_utils-py_utils-cloud_storage.py.patch @@ -1,5 +1,5 @@ diff --git a/common/py_utils/py_utils/cloud_storage.py b/common/py_utils/py_utils/cloud_storage.py -index cfea52349d9edca46da62446875ce7e113b3e20a..6722b7263ac374b4d42c69bab50223010986486b 100644 +index 3a36a573d8d986a724760769b858435da3936bdc..c4c4914cbf466a34f82a2f1a4980302f3446e4b1 100644 --- a/common/py_utils/py_utils/cloud_storage.py +++ b/common/py_utils/py_utils/cloud_storage.py @@ -30,7 +30,7 @@ logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch b/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch index 12cc0debf956..994751a7fa70 100644 --- a/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch +++ b/patches/third_party/devtools-frontend/src/front_end-panels-application-ApplicationPanelSidebar.ts.patch @@ -1,8 +1,8 @@ diff --git a/front_end/panels/application/ApplicationPanelSidebar.ts b/front_end/panels/application/ApplicationPanelSidebar.ts -index 6d2b584f4779e6bc10de5558ca0f46fa80b2abaa..218e6f0f2044d189bf13c32e1a5979bc79d3cdef 100644 +index b161036288c86f1e582dda55305ab13db3c5d484..fe02715bc5d88db506fea3d00b3eae9ee368980c 100644 --- a/front_end/panels/application/ApplicationPanelSidebar.ts +++ b/front_end/panels/application/ApplicationPanelSidebar.ts -@@ -357,7 +357,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe +@@ -366,7 +366,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe storageTreeElement.appendChild(this.cookieListTreeElement); this.trustTokensTreeElement = new TrustTokensTreeElement(panel); diff --git a/patches/tools-clang-pylib-clang-compile_db.py.patch b/patches/tools-clang-pylib-clang-compile_db.py.patch index 71d8e6b21bf9..25afa08660c6 100644 --- a/patches/tools-clang-pylib-clang-compile_db.py.patch +++ b/patches/tools-clang-pylib-clang-compile_db.py.patch @@ -1,8 +1,8 @@ diff --git a/tools/clang/pylib/clang/compile_db.py b/tools/clang/pylib/clang/compile_db.py -index ca06d706bbf6afb6aaa40b98f1c505bfe820e388..ea49762cbe4dea3672539de2e412233007896847 100755 +index 06bb1da03ffa5243c3cde9ef7b2f1a36b5eccb5d..aaa00c88f6a6b999cb2fb476551d4701e7db767d 100755 --- a/tools/clang/pylib/clang/compile_db.py +++ b/tools/clang/pylib/clang/compile_db.py -@@ -211,3 +211,4 @@ def Read(path): +@@ -224,3 +224,4 @@ def Read(path): """ with open(os.path.join(path, 'compile_commands.json'), 'rb') as db: return json.load(db) diff --git a/patches/tools-gritsettings-resource_ids.spec.patch b/patches/tools-gritsettings-resource_ids.spec.patch index ba2b5c400532..5e76e7a7cf4b 100644 --- a/patches/tools-gritsettings-resource_ids.spec.patch +++ b/patches/tools-gritsettings-resource_ids.spec.patch @@ -1,5 +1,5 @@ diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index a34293da9026018a3e733ed58e4eabde666c0198..709346c672d1e996cf26b6afd16da8c89bbdb309 100644 +index a327136986b82869f394f47e4609e431c9f3a3ac..d319efc39086c0efc76d6babc78263527edca349 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -38,6 +38,9 @@ @@ -12,25 +12,25 @@ index a34293da9026018a3e733ed58e4eabde666c0198..709346c672d1e996cf26b6afd16da8c8 "chrome/app/google_chrome_strings.grd": { "messages": [800], }, -@@ -248,7 +251,7 @@ - "includes": [2960], +@@ -252,7 +255,7 @@ + "includes": [3060], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/history/resources.grd": { - "META": {"sizes": {"includes": [40]}}, + "META": {"sizes": {"includes": [44]}}, - "includes": [2980], + "includes": [3080], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/identity_internals/resources.grd": { -@@ -375,7 +378,7 @@ - "includes": [3520], +@@ -383,7 +386,7 @@ + "includes": [3710], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/settings/resources.grd": { - "META": {"sizes": {"includes": [500],}}, + "META": {"sizes": {"includes": [650],}}, - "includes": [3540], + "includes": [3720], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/settings_shared/resources.grd": { -@@ -860,6 +863,9 @@ +@@ -868,6 +871,9 @@ "components/components_chromium_strings.grd": { "messages": [6020], }, diff --git a/patches/tools-licenses-licenses.py.patch b/patches/tools-licenses-licenses.py.patch index 405682ff1481..9a9413c45bb0 100644 --- a/patches/tools-licenses-licenses.py.patch +++ b/patches/tools-licenses-licenses.py.patch @@ -1,5 +1,5 @@ diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..184496827a8001539ad54fb9496b438a921a59ea 100755 +index 15b461326e2ce4bd255cbe779b449261a7f63f09..4ad542a3e8d1b806f7e63b7c10a4d37cd9b56b0a 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py @@ -39,6 +39,7 @@ _REPOSITORY_ROOT = os.path.abspath( @@ -10,15 +10,15 @@ index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..184496827a8001539ad54fb9496b438a # Paths from the root of the tree to directories to skip. PRUNE_PATHS = set([ -@@ -414,6 +415,7 @@ SPECIAL_CASES = { - "License File": "/third_party/selenium-atoms/LICENSE.closure", +@@ -425,6 +426,7 @@ SPECIAL_CASES = { + "License File": ["//third_party/selenium-atoms/LICENSE.closure"], }, } +(PRUNE_DIRS, ADDITIONAL_PATHS) = AddBraveCredits(_REPOSITORY_ROOT, PRUNE_PATHS, SPECIAL_CASES, PRUNE_DIRS, ADDITIONAL_PATHS) - # Soon-to-be-deprecated special value for 'License File' field used to indicate - # that the library is not shipped so the license file should not be used in -@@ -643,7 +645,8 @@ def FindThirdPartyDirs(prune_paths, root, extra_third_party_dirs=None): + # These buildtools/third_party directories only contain + # chromium build files. The actual third_party source files and their +@@ -708,7 +710,8 @@ def FindThirdPartyDirs(prune_paths, root, extra_third_party_dirs=None): if skip in dirs: dirs.remove(skip) @@ -28,10 +28,10 @@ index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..184496827a8001539ad54fb9496b438a # Add all subdirectories that are not marked for skipping. for dir in dirs: dirpath = os.path.join(path, dir) -@@ -870,7 +873,8 @@ def GenerateCredits(file_template_file, - metadata = ParseDir(path, - _REPOSITORY_ROOT, +@@ -956,7 +959,8 @@ def GenerateCredits(file_template_file, enable_warnings=enable_warnings) + if not metadata: + continue - except LicenseError: + except LicenseError as e: + CheckBraveMissingLicense(target_os, path, e) diff --git a/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch b/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch index c137efc12a63..03836a75e5ad 100644 --- a/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch +++ b/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch @@ -1,8 +1,8 @@ diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml -index 823ed407276f16b083444f11931fea8cd9b8032f..86abe78dfcfd67cd06bcde795595c9497c0a4eee 100644 +index 910c79ec77ee34d427b1ba912cc8443d4c274c3c..723238c1a29bc27c85e95129116968877b16d3da 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml -@@ -3608,6 +3608,7 @@ chromium-metrics-reviews@google.com. +@@ -3458,6 +3458,7 @@ chromium-metrics-reviews@google.com. diff --git a/patches/tools-symsrc-source_index.py.patch b/patches/tools-symsrc-source_index.py.patch index beab2b653d34..79da32e7c7ee 100644 --- a/patches/tools-symsrc-source_index.py.patch +++ b/patches/tools-symsrc-source_index.py.patch @@ -1,8 +1,8 @@ diff --git a/tools/symsrc/source_index.py b/tools/symsrc/source_index.py -index 536c5c5263980f639a05899e77bf1a21b6c0fe4e..b19bb9ad72c8293720c425e25e11b30c88300c2c 100755 +index d23e2f22d3379eb03314a909c4e16194a53c8626..915e51caf915fc91cbf986fec68477aa6b571618 100755 --- a/tools/symsrc/source_index.py +++ b/tools/symsrc/source_index.py -@@ -595,5 +595,6 @@ def main(): +@@ -600,5 +600,6 @@ def main(): return 0 diff --git a/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch b/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch index ba6090dac5a5..dc72a374548c 100644 --- a/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch +++ b/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch @@ -1,8 +1,8 @@ diff --git a/ui/accessibility/platform/ax_platform_node_cocoa.mm b/ui/accessibility/platform/ax_platform_node_cocoa.mm -index 16de7b843b122d57fb1a63308bfa588fafd614b9..dc435afb2ae06de8e10c6fcd66494adbc5bbe340 100644 +index 5b73bea06e2d038e674bf44927a6015b18ff1f41..d379d1c61b991818da43966d48aa0fbe7456c958 100644 --- a/ui/accessibility/platform/ax_platform_node_cocoa.mm +++ b/ui/accessibility/platform/ax_platform_node_cocoa.mm -@@ -2529,6 +2529,7 @@ void CollectAncestorRoles( +@@ -2576,6 +2576,7 @@ void CollectAncestorRoles( if (!_node) return nil; diff --git a/patches/ui-native_theme-native_theme_win.cc.patch b/patches/ui-native_theme-native_theme_win.cc.patch index 40827ff8abf3..9f7c1aeae8ed 100644 --- a/patches/ui-native_theme-native_theme_win.cc.patch +++ b/patches/ui-native_theme-native_theme_win.cc.patch @@ -1,8 +1,8 @@ diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 87807be3558a2fdd222241b046718f9f1f0b7858..620e14a4b6f91edc5d628b57fce69a9a2ab7df43 100644 +index d3f9fcbed28f92a113fc2734cc0789e663ccfff9..ab8b87aa3ea25f49ef2f970e5a21bf621e658836 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -1587,6 +1587,7 @@ void NativeThemeWin::UpdateDarkModeStatus() { +@@ -1597,6 +1597,7 @@ void NativeThemeWin::UpdateDarkModeStatus() { &apps_use_light_theme); dark_mode_enabled = (apps_use_light_theme == 0); } diff --git a/patches/ui-native_theme-native_theme_win.h.patch b/patches/ui-native_theme-native_theme_win.h.patch index f6f4bf37d140..85f44ddfb0fe 100644 --- a/patches/ui-native_theme-native_theme_win.h.patch +++ b/patches/ui-native_theme-native_theme_win.h.patch @@ -1,5 +1,5 @@ diff --git a/ui/native_theme/native_theme_win.h b/ui/native_theme/native_theme_win.h -index 2793ad166bfc872b456a6536f7401b150e39bc61..a8255c5eb712f628191ffd5e658d0504a960f3de 100644 +index ea47878d12046bca8ceb01bc8459de77a6402a44..2a574a60ba72d23d1b85d0b52a394eedcf10c1cb 100644 --- a/ui/native_theme/native_theme_win.h +++ b/ui/native_theme/native_theme_win.h @@ -76,6 +76,7 @@ class NATIVE_THEME_EXPORT NativeThemeWin : public NativeTheme, diff --git a/patches/ui-views-controls-menu-menu_separator.cc.patch b/patches/ui-views-controls-menu-menu_separator.cc.patch index 7f93f4b65ecf..2577912c9a5d 100644 --- a/patches/ui-views-controls-menu-menu_separator.cc.patch +++ b/patches/ui-views-controls-menu-menu_separator.cc.patch @@ -1,12 +1,12 @@ diff --git a/ui/views/controls/menu/menu_separator.cc b/ui/views/controls/menu/menu_separator.cc -index 6a895c94473f854b0cc3797338cf60005bb6bc9c..15b8361bd63a9ade7fa1147c3523a9c422fb3863 100644 +index 19a1d9cd66600daf055e04fd573021fab7adf81e..ac624b11a035b938d3e8c3acefba66da570d523d 100644 --- a/ui/views/controls/menu/menu_separator.cc +++ b/ui/views/controls/menu/menu_separator.cc -@@ -43,6 +43,7 @@ void MenuSeparator::OnPaint(gfx::Canvas* canvas) { - } - - gfx::Rect paint_rect(0, pos, width(), separator_thickness); -+ BRAVE_MENU_SEPARATOR_ON_PAINT +@@ -48,6 +48,7 @@ void MenuSeparator::OnPaint(gfx::Canvas* canvas) { + menu_config.separator_horizontal_border_padding, y, + width() - menu_config.separator_horizontal_border_padding * 2, + separator_thickness); ++ BRAVE_MENU_SEPARATOR_ON_PAINT if (type_ == ui::PADDED_SEPARATOR) { paint_rect.Inset( - gfx::Insets::TLBR(0, menu_config.padded_separator_left_margin, 0, + gfx::Insets::TLBR(0, menu_config.padded_separator_start_padding, 0, 0)); diff --git a/patches/ui-webui-resources-BUILD.gn.patch b/patches/ui-webui-resources-BUILD.gn.patch index cebd585ef54e..445e4c8faf80 100644 --- a/patches/ui-webui-resources-BUILD.gn.patch +++ b/patches/ui-webui-resources-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn -index aba27396fbc6ce9337309a3d7b2673c1ca085a71..84757f2e2f307a74215fb7a3ab06e54579e36fa6 100644 +index 4c72877dc5255a74ad9a014fadf99c3f5bccd10d..44d5afc6d853801d48eba1c75ffb2354a0499947 100644 --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn -@@ -116,6 +116,7 @@ generate_grd("build_grd") { +@@ -118,6 +118,7 @@ generate_grd("build_grd") { "$root_gen_dir/ui/webui/resources/cr_components/page_image_service/resources.grdp", ] } diff --git a/patches/ui-webui-resources-cr_elements-cr_radio_button-cr_radio_button_style.css.patch b/patches/ui-webui-resources-cr_elements-cr_radio_button-cr_radio_button_style.css.patch index 6d1340296970..a8252c6b5487 100644 --- a/patches/ui-webui-resources-cr_elements-cr_radio_button-cr_radio_button_style.css.patch +++ b/patches/ui-webui-resources-cr_elements-cr_radio_button-cr_radio_button_style.css.patch @@ -1,5 +1,5 @@ diff --git a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style.css b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style.css -index 3bf953f5b7526422123c4e751183f15423939ef7..b1c3e0c02f93198a38e739a1c3fe8fe55014ef50 100644 +index e37d6bd00442915ece35a9021f45aa4d9b9d29c9..eb067c13c8a94d4fb7d78f5114ca8a540d6f5635 100644 --- a/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style.css +++ b/ui/webui/resources/cr_elements/cr_radio_button/cr_radio_button_style.css @@ -6,6 +6,8 @@ diff --git a/patches/ui-webui-resources-cr_elements-cr_shared_vars.css.patch b/patches/ui-webui-resources-cr_elements-cr_shared_vars.css.patch index ecb21e0bd145..57731a525a68 100644 --- a/patches/ui-webui-resources-cr_elements-cr_shared_vars.css.patch +++ b/patches/ui-webui-resources-cr_elements-cr_shared_vars.css.patch @@ -1,5 +1,5 @@ diff --git a/ui/webui/resources/cr_elements/cr_shared_vars.css b/ui/webui/resources/cr_elements/cr_shared_vars.css -index 4284ed5cacfce7abdab11886b13961e737085dff..f4b0538dad940fe4a333ef15ea6ad186b58e019a 100644 +index 84997fba2cecac4e296abdb5be6a79ec15118fc0..41155a924dcd98e97cc0320f57c5bc2a77178c8b 100644 --- a/ui/webui/resources/cr_elements/cr_shared_vars.css +++ b/ui/webui/resources/cr_elements/cr_shared_vars.css @@ -5,6 +5,7 @@ diff --git a/patches/v8/BUILD.gn.patch b/patches/v8/BUILD.gn.patch index 2768d7d2b2b9..88b8b4e16335 100644 --- a/patches/v8/BUILD.gn.patch +++ b/patches/v8/BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/BUILD.gn b/BUILD.gn -index c13cf053a80d212b836a9be3ec6e76b11627a19d..b45085c85460d50a1f496a3b063e0e6932db541d 100644 +index ca081a790959d22b12f10e9c08f9acbc339e7ed7..75e8633e06650893a6be06e1edd2753360602fcf 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -700,6 +700,7 @@ config("internal_config_base") { +@@ -724,6 +724,7 @@ config("internal_config_base") { "$target_gen_dir", "$target_gen_dir/include", ] @@ -10,7 +10,7 @@ index c13cf053a80d212b836a9be3ec6e76b11627a19d..b45085c85460d50a1f496a3b063e0e69 } config("internal_config") { -@@ -2851,6 +2852,7 @@ v8_header_set("v8_headers") { +@@ -2974,6 +2975,7 @@ v8_header_set("v8_headers") { ":cppgc_headers", ":v8_version", ] diff --git a/patches/v8/src-codegen-compiler.cc.patch b/patches/v8/src-codegen-compiler.cc.patch index daa736ac906a..69bce2002744 100644 --- a/patches/v8/src-codegen-compiler.cc.patch +++ b/patches/v8/src-codegen-compiler.cc.patch @@ -1,8 +1,8 @@ diff --git a/src/codegen/compiler.cc b/src/codegen/compiler.cc -index 19dd1cb14137a6681d771eccf36d0c6f80654696..6297dff9058331a50bdab568613944f222222859 100644 +index 8de7d7398bb01475ff58c1575e6cfb4823e3e836..5d36d8c3590beb2475ef281502705b86e7de53b5 100644 --- a/src/codegen/compiler.cc +++ b/src/codegen/compiler.cc -@@ -2935,6 +2935,7 @@ MaybeHandle Compiler::GetFunctionFromEval( +@@ -2954,6 +2954,7 @@ MaybeHandle Compiler::GetFunctionFromEval( } } DCHECK(is_compiled_scope.is_compiled()); diff --git a/resources/resource_ids.spec b/resources/resource_ids.spec index 722e24136453..0651f42619cf 100644 --- a/resources/resource_ids.spec +++ b/resources/resource_ids.spec @@ -4,235 +4,209 @@ { "SRCDIR": "../..", "brave/common/extensions/api/brave_api_resources.grd": { - "includes": [49500], + "includes": [50800], }, "brave/components/resources/brave_components_resources.grd": { - "includes": [49550], + "includes": [50810], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_adblock/brave_adblock.grd": { - "META": {"sizes": {"includes": [50]}}, - "includes": [49600], + "META": {"sizes": {"includes": [10]}}, + "includes": [50900], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_new_tab/brave_new_tab.grd": { - "META": {"sizes": {"includes": [350]}}, - "includes": [49650], + "META": {"sizes": {"includes": [50]}}, + "includes": [50920], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_welcome/brave_welcome.grd": { - "META": {"sizes": {"includes": [200]}}, - "includes": [51000], + "META": {"sizes": {"includes": [20]}}, + "includes": [50970], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/browser/resources/settings/brave_settings_resources.grd": { - "META": {"sizes": {"includes": [400]}}, - "includes": [51200], + "META": {"sizes": {"includes": [20]}}, + "includes": [50990], }, "brave/app/brave_generated_resources.grd": { - "includes": [51600], - "messages": [52100], + "includes": [51000], + "messages": [51050], }, "brave/app/theme/brave_theme_resources.grd": { - "structures": [52600], + "structures": [52000], }, "brave/app/theme/brave_unscaled_resources.grd": { - "includes": [53100], - }, - "brave/components/brave_sync/resources.grd": { - "includes": [53600], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_sync/brave_sync.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [53700], + "includes": [52100], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_webtorrent/brave_webtorrent.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [54200], - }, - "brave/components/brave_rewards/resources/extension/extension_static_resources.grd": { - "includes": [54700], + "META": {"sizes": {"includes": [10]}}, + "includes": [52110], }, "brave/components/brave_webtorrent/resources.grd": { - "includes": [55300], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_rewards_extension_panel/brave_rewards_extension_panel.grd": { - "META": {"sizes": {"includes": [100]}}, - "includes": [55400], + "includes": [52120], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_rewards_panel/brave_rewards_panel.grd": { - "META": {"sizes": {"includes": [100]}}, - "includes": [55500], + "META": {"sizes": {"includes": [20]}}, + "includes": [52130], }, "brave/components/brave_rewards/resources/brave_rewards_static_resources.grd": { - "includes": [55600], + "includes": [52150], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_rewards_page/brave_rewards_page.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [55800], + "META": {"sizes": {"includes": [20]}}, + "includes": [52160], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_rewards_internals/brave_rewards_internals.grd": { - "META": {"sizes": {"includes": [300]}}, - "includes": [56300], + "META": {"sizes": {"includes": [10]}}, + "includes": [52180], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_rewards_tip/brave_rewards_tip.grd": { - "META": {"sizes": {"includes": [200]}}, - "includes": [56600], + "META": {"sizes": {"includes": [20]}}, + "includes": [52190], }, "brave/components/resources/brave_components_strings.grd": { - "messages": [56800], + "messages": [52250], }, "brave/components/brave_ads/resources/bat_ads_resources.grd": { - "includes": [56900] + "includes": [54750] }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_page/brave_wallet_page.grd": { "META": {"sizes": {"includes": [200]}}, - "includes": [57800], + "includes": [54760], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-ethereum_remote_client_page/ethereum_remote_client_page.grd": { - "META": {"sizes": {"includes": [100]}}, - "includes": [57900], + "META": {"sizes": {"includes": [10]}}, + "includes": [54960], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_panel/brave_wallet_panel.grd": { "META": {"sizes": {"includes": [200]}}, - "includes": [58000], + "includes": [54970], }, "brave/components/brave_extension/extension/resources.grd": { - "includes": [58200], + "includes": [55250], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_extension/brave_extension.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [58700], + "META": {"sizes": {"includes": [10]}}, + "includes": [55270], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-webcompat_reporter/webcompat_reporter.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [59200], + "META": {"sizes": {"includes": [10]}}, + "includes": [55280], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-ipfs/ipfs.grd": { - "META": {"sizes": {"includes": [500]}}, - "includes": [59700], + "META": {"sizes": {"includes": [10]}}, + "includes": [55290], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-cosmetic_filters/cosmetic_filters.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [60200], + "META": {"sizes": {"includes": [10]}}, + "includes": [55300], }, "brave/components/tor/resources/tor_static_resources.grd": { - "includes": [60450], + "includes": [55310], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-tor_internals/tor_internals.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [60700], + "META": {"sizes": {"includes": [10]}}, + "includes": [55320], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_script/brave_wallet_script.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [60950], + "META": {"sizes": {"includes": [10]}}, + "includes": [55330], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_vpn_panel/brave_vpn_panel.grd": { - "META": {"sizes": {"includes": [50]}}, - "includes": [61200], + "META": {"sizes": {"includes": [10]}}, + "includes": [55340], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_shields_panel/brave_shields_panel.grd": { - "META": {"sizes": {"includes": [200]}}, - "includes": [61250], + "META": {"sizes": {"includes": [10]}}, + "includes": [55350], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-trezor_bridge/trezor_bridge.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [61450], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/brave/browser/resources/sidebar/sidebar_resources.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [61700], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/brave/browser/resources/federated_internals/federated_internals_resources.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [61950], + "META": {"sizes": {"includes": [10]}}, + "includes": [55360], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-market_display/market_display.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [62200], + "META": {"sizes": {"includes": [100]}}, + "includes": [55370], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_private_new_tab/brave_private_new_tab.grd": { - "META": {"sizes": {"includes": [20]}}, - "includes": [62220], + "META": {"sizes": {"includes": [10]}}, + "includes": [55470], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-playlist/playlist.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [62470], + "META": {"sizes": {"includes": [10]}}, + "includes": [55480], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-ledger_bridge/ledger_bridge.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [62720], + "META": {"sizes": {"includes": [10]}}, + "includes": [55490], }, # This file is generated during the build. "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-nft_display/nft_display.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [62970], + "META": {"sizes": {"includes": [40]}}, + "includes": [55500], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-cookie_list_opt_in/cookie_list_opt_in.grd": { - "META": {"sizes": {"includes": [30]}}, - "includes": [63000], + "META": {"sizes": {"includes": [10]}}, + "includes": [55540], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_speedreader_toolbar/brave_speedreader_toolbar.grd": { - "META": {"sizes": {"includes": [20]}}, - "includes": [63020], + "META": {"sizes": {"includes": [10]}}, + "includes": [55550], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_adblock_internals/brave_adblock_internals.grd": { - "META": {"sizes": {"includes": [50]}}, - "includes": [63040], + "META": {"sizes": {"includes": [10]}}, + "includes": [55560], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-commands/commands.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [63290], + "META": {"sizes": {"includes": [10]}}, + "includes": [55570], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_swap_page/brave_wallet_swap_page.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [63300], + "META": {"sizes": {"includes": [150]}}, + "includes": [55580], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_send_page/brave_wallet_send_page.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [63350], + "META": {"sizes": {"includes": [100]}}, + "includes": [55720], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_deposit_page/brave_wallet_deposit_page.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [63370], + "META": {"sizes": {"includes": [100]}}, + "includes": [55820], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-brave_wallet_fund_wallet_page/brave_wallet_fund_wallet_page.grd": { - "META": {"sizes": {"includes": [250]}}, - "includes": [63390], + "META": {"sizes": {"includes": [100]}}, + "includes": [55920], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-tip_panel/tip_panel.grd": { - "META": {"sizes": {"includes": [100]}}, - "includes": [63400] + "META": {"sizes": {"includes": [10]}}, + "includes": [56020] }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-ai_chat_ui/ai_chat_ui.grd": { - "META": {"sizes": {"includes": [50]}}, - "includes": [63500], + "META": {"sizes": {"includes": [10]}}, + "includes": [56030], }, "<(SHARED_INTERMEDIATE_DIR)/brave/web-ui-skus_internals/skus_internals.grd": { - "META": {"sizes": {"includes": [100]}}, - "includes": [63550], + "META": {"sizes": {"includes": [10]}}, + "includes": [56040], } } diff --git a/sandbox/win/src/module_file_name_interception.cc b/sandbox/win/src/module_file_name_interception.cc index d752b364241c..7bc0514f2f7f 100644 --- a/sandbox/win/src/module_file_name_interception.cc +++ b/sandbox/win/src/module_file_name_interception.cc @@ -61,7 +61,7 @@ template