mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 19:37:30 -03:00
M122 stage 1
This commit is contained in:
parent
bba7d4f4f5
commit
b6eccac242
31 changed files with 707 additions and 898 deletions
|
@ -129,6 +129,7 @@ config("compiler") {
|
|||
# "/fp:fast", enables FMA.
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"/arch:AVX2",
|
||||
"-msse3",
|
||||
"-mssse3",
|
||||
"-msse4.1",
|
||||
|
@ -157,7 +158,6 @@ config("compiler") {
|
|||
"/clang:-ffp-contract=fast",
|
||||
"/clang:-w",
|
||||
"-Xclang", "-O3",
|
||||
# "/arch:AVX2",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -26,14 +26,7 @@ config("compiler") {
|
|||
} else {
|
||||
assert(false, "unknown current_cpu $current_cpu")
|
||||
}
|
||||
if (host_os == "mac") {
|
||||
common_mac_flags += [
|
||||
"-arch",
|
||||
clang_arch,
|
||||
]
|
||||
} else {
|
||||
common_mac_flags += [ "--target=$clang_arch-apple-macos" ]
|
||||
}
|
||||
common_mac_flags += [ "--target=$clang_arch-apple-macos" ]
|
||||
|
||||
# This is here so that all files get recompiled after an Xcode update.
|
||||
# (defines are passed via the command line, and build system rebuild things
|
||||
|
@ -82,7 +75,7 @@ config("runtime_library") {
|
|||
|
||||
# On Mac, this is used for everything except static libraries.
|
||||
config("mac_dynamic_flags") {
|
||||
ldflags = [ "-Wl,-ObjC", "-Wl,-O3" ] # Always load Objective-C categories and classes.
|
||||
ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and classes.
|
||||
|
||||
if (is_component_build) {
|
||||
ldflags += [
|
||||
|
|
|
@ -133,16 +133,16 @@ config("compiler") {
|
|||
"-mssse3",
|
||||
"-msse4.1",
|
||||
"-msse4.2",
|
||||
"-maes",
|
||||
"-mpclmul",
|
||||
"-maes",
|
||||
"-mavx",
|
||||
"/clang:-O3",
|
||||
"/clang:-msse3",
|
||||
"/clang:-mssse3",
|
||||
"/clang:-msse4.1",
|
||||
"/clang:-msse4.2",
|
||||
"/clang:-maes",
|
||||
"/clang:-mpclmul",
|
||||
"/clang:-maes",
|
||||
"/clang:-mavx",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
|
|
@ -127,8 +127,8 @@
|
|||
<message name="IDS_APP_MANAGEMENT_APP_DETAILS_TYPE_CROS_SYSTEM" desc="Text for ThoriumOS System app type">
|
||||
ThoriumOS System App
|
||||
</message>
|
||||
<message name="IDS_APP_MANAGEMENT_APP_DETAILS_INSTALL_SOURCE_WEB_STORE" desc="Text for Chrome Web Store installation source">
|
||||
Chrome Web Store
|
||||
<message name="IDS_APP_MANAGEMENT_APP_DETAILS_INSTALL_SOURCE_WEB_STORE" desc="Text for Thorium Web Store installation source">
|
||||
Thorium Web Store
|
||||
</message>
|
||||
<message name="IDS_APP_MANAGEMENT_APP_DETAILS_INSTALL_SOURCE_PLAY_STORE" desc="Text for Google Play Store installation source">
|
||||
Google Play Store
|
||||
|
|
|
@ -277,7 +277,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
|
|||
</if>
|
||||
|
||||
<!--
|
||||
Even though Thorium for Testing is a separate brand, there is
|
||||
Even though Google Thorium for Testing is a separate brand, there is
|
||||
no separate file for it. Instead, we use the same file as Thorium, with
|
||||
a few select overrides for the most prominent end-user strings.
|
||||
|
||||
|
@ -286,7 +286,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_PRODUCT_NAME" desc="The Thorium for Testing application name" translateable="false">
|
||||
Thorium for Testing
|
||||
Google Thorium for Testing
|
||||
</message>
|
||||
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium for Testing application short name." translateable="false">
|
||||
Thorium for Testing
|
||||
|
@ -357,7 +357,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_BROWSER_WINDOW_TITLE_FORMAT" desc="The format for titles displayed in tabs and popup windows">
|
||||
<ph name="PAGE_TITLE">$1<ex>Google</ex></ph> - Thorium for Testing
|
||||
<ph name="PAGE_TITLE">$1<ex>Google</ex></ph> - Google Thorium for Testing
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
|
@ -396,7 +396,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_ACCESSIBLE_BROWSER_WINDOW_TITLE_FORMAT" desc="The format for the accessible name of a tabbed browser window">
|
||||
<ph name="PAGE_TITLE">$1<ex>Google</ex></ph> - Thorium for Testing
|
||||
<ph name="PAGE_TITLE">$1<ex>Google</ex></ph> - Google Thorium for Testing
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
|
@ -456,11 +456,8 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
|
|||
</else>
|
||||
</if>
|
||||
<if expr="is_macosx">
|
||||
<message name="IDS_MAC_10_13_OBSOLETE" desc="A message displayed on an at-launch infobar and About (Help) page warning the user that the OS version they are using will soon be or is already unsupported.">
|
||||
To get future Thorium updates, you'll need macOS 10.15 or later. This computer is using macOS 10.13.
|
||||
</message>
|
||||
<message name="IDS_MAC_10_14_OBSOLETE" desc="A message displayed on an at-launch infobar and About (Help) page warning the user that the OS version they are using will soon be or is already unsupported.">
|
||||
To get future Thorium updates, you'll need macOS 10.15 or later. This computer is using macOS 10.14.
|
||||
<message name="IDS_MACOS_OBSOLETE" desc="A message displayed on an at-launch infobar and About (Help) page warning the user that the OS version they are using will soon be or is already unsupported.">
|
||||
To get future Thorium updates, you'll need macOS 11 or later. This computer is using macOS 10.15.
|
||||
</message>
|
||||
</if>
|
||||
<if expr="is_win">
|
||||
|
@ -700,7 +697,7 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
</message>
|
||||
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_UNKNOWN_SOURCE"
|
||||
desc="Summary of dangerous warning for a file (like an extension) from an unknown source.">
|
||||
Extensions, apps, and themes from unknown sources can harm your device. Thorium recommends only installing them from the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Chrome Web Store</ex></ph>
|
||||
Extensions, apps, and themes from unknown sources can harm your device. Thorium recommends only installing them from the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Thorium Web Store</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_MALWARE"
|
||||
desc="Subpage summary for malware warning for the user.">
|
||||
|
@ -712,7 +709,7 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
</message>
|
||||
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_DEEP_SCANNING_PROMPT_LOCAL_DECRYPTION"
|
||||
desc="Subpage summary of warning for a file where we recommend providing the password for on-device decryption">
|
||||
This file may be dangerous<ph name="LINE_BREAK">$1</ph>Thorium can check this download for you if you provide the password — your password stays on your device
|
||||
This file may be dangerous<ph name="LINE_BREAK">$1</ph>Thorium can check this download for you if you provide the password. Info about the file gets sent to Google Safe Browsing, but the file content and password stay on your device.
|
||||
</message>
|
||||
|
||||
<!-- Download Shelf Items -->
|
||||
|
@ -827,8 +824,8 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
<message name="IDS_SAFETY_CHECK_EXTENSIONS_MALWARE" desc="The text explaining the reason for disabling extension. The extension in question contains malware.">
|
||||
This extension contains malware and is unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
|
||||
</message>
|
||||
<message name="IDS_SAFETY_CHECK_EXTENSIONS_POLICY_VIOLATION" desc="The text explaining the reason for disabling extension. The extension in question violates Chrome Web Store policy.">
|
||||
This extension violates the Chrome Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
|
||||
<message name="IDS_SAFETY_CHECK_EXTENSIONS_POLICY_VIOLATION" desc="The text explaining the reason for disabling extension. The extension in question violates Thorium Web Store policy.">
|
||||
This extension violates the Thorium Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
|
||||
</message>
|
||||
<message name="IDS_SAFETY_CHECK_EXTENSIONS_UNPUBLISHED" desc="The text explaining the reason for disabling extension. The extension in question was unpublished by the developer.">
|
||||
This extension was unpublished by its developer, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
|
||||
|
@ -853,10 +850,10 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
|
||||
<if expr="enable_extensions">
|
||||
<message name="IDS_EXTENSIONS_MULTIPLE_UNSUPPORTED_DISABLED_BODY" desc="Body of the dialog shown when multiple unsupported extensions have been disabled.">
|
||||
To make Thorium safer, we disabled some extensions that aren't listed in the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Chrome Web Store</ex></ph> and may have been added without your knowledge.
|
||||
To make Thorium safer, we disabled some extensions that aren't listed in the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Thorium Web Store</ex></ph> and may have been added without your knowledge.
|
||||
</message>
|
||||
<message name="IDS_EXTENSIONS_SINGLE_UNSUPPORTED_DISABLED_BODY" desc="Body of the dialog shown when a single unsupported extension has been disabled.">
|
||||
To make Thorium safer, we disabled the following extension that isn't listed in the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Chrome Web Store</ex></ph> and may have been added without your knowledge.
|
||||
To make Thorium safer, we disabled the following extension that isn't listed in the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Thorium Web Store</ex></ph> and may have been added without your knowledge.
|
||||
</message>
|
||||
</if>
|
||||
|
||||
|
@ -881,7 +878,7 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium for Testing menu item">
|
||||
About &Thorium for Testing
|
||||
About &Google Thorium for Testing
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
|
@ -898,7 +895,7 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_ABOUT" desc="The text label of the About Thorium for Testing menu item">
|
||||
About &Thorium for Testing
|
||||
About &Google Thorium for Testing
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
|
@ -927,13 +924,13 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
</if>
|
||||
|
||||
<if expr="is_macosx">
|
||||
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Thorium." translateable="false">
|
||||
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Google Thorium." translateable="false">
|
||||
Thorium
|
||||
</message>
|
||||
<message name="IDS_HELPER_NAME" desc="The helper application's name. Should contain the Thorium application name (IDS_PRODUCT_NAME). Example: Thorium Helper.">
|
||||
<message name="IDS_HELPER_NAME" desc="The helper application's name. Should contain the Thorium application name (IDS_PRODUCT_NAME). Example: Google Thorium Helper.">
|
||||
Thorium Helper
|
||||
</message>
|
||||
<message name="IDS_SHORT_HELPER_NAME" desc="The helper application's short name, used for the Mac's application menu, activity monitor, etc. Example: Thorium Helper, not Thorium Helper.">
|
||||
<message name="IDS_SHORT_HELPER_NAME" desc="The helper application's short name, used for the Mac's application menu, activity monitor, etc. Example: Thorium Helper, not Google Thorium Helper.">
|
||||
Thorium Helper
|
||||
</message>
|
||||
</if>
|
||||
|
@ -1740,6 +1737,17 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
You can learn more about these features in Thorium settings.
|
||||
</message>
|
||||
|
||||
<!-- Advanced security settings -->
|
||||
<message name="IDS_SETTINGS_SECURITY_V8_LINK_DESCRIPTION" desc="Description for the link row of the V8 security settings page.">
|
||||
Turn on additional protection in Thorium’s JavaScript and WebAssembly engine
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_DESCRIPTION" desc="Description of the JavaScript optimizer content setting.">
|
||||
V8 is Thorium’s JavaScript and WebAssembly engine used to improve site performance
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED_SUB_LABEL" desc="Sub-label for the enabled option of the JavaScript optimizer content setting.">
|
||||
Thorium runs faster and features that use JavaScript should work as designed (recommended)
|
||||
</message>
|
||||
|
||||
<!-- ThoriumUpdater Strings -->
|
||||
<if expr="is_win">
|
||||
<message name="IDS_FRIENDLY_COMPANY_NAME" desc="Company name" translateable="false">
|
||||
|
@ -1940,32 +1948,32 @@ Permissions you've already given to websites and apps may apply to this account.
|
|||
Install error: The installer did not complete. The installation has been aborted.
|
||||
</message>
|
||||
</if>
|
||||
<!-- High Efficiency Chip strings -->
|
||||
<!-- Memory Saver Chip strings -->
|
||||
<if expr="not is_android">
|
||||
<if expr="use_titlecase">
|
||||
<message name="IDS_HIGH_EFFICIENCY_DIALOG_TITLE" desc="In Title Case: Title text for a dialog describing that the Memory Saver setting is enabled">
|
||||
<message name="IDS_MEMORY_SAVER_DIALOG_TITLE" desc="In Title Case: Title text for a dialog describing that the Memory Saver setting is enabled">
|
||||
Memory Saver Made Thorium Faster
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not use_titlecase">
|
||||
<message name="IDS_HIGH_EFFICIENCY_DIALOG_TITLE" desc="Title text for a dialog describing that the Memory Saver setting is enabled">
|
||||
<message name="IDS_MEMORY_SAVER_DIALOG_TITLE" desc="Title text for a dialog describing that the Memory Saver setting is enabled">
|
||||
Memory Saver made Thorium faster
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_HIGH_EFFICIENCY_DIALOG_BODY_V2" desc="Body text for a dialog describing that Memory Saver mode will use less memory.">
|
||||
<message name="IDS_MEMORY_SAVER_DIALOG_BODY_V2" desc="Body text for a dialog describing that Memory Saver mode will use less memory.">
|
||||
While this tab was inactive, memory was freed up to keep Thorium fast. You can choose to always exclude this site from being inactive.
|
||||
</message>
|
||||
</if>
|
||||
|
||||
<!-- High Efficiency IPH strings -->
|
||||
<!-- Memory Saver IPH strings -->
|
||||
<if expr="not is_android">
|
||||
<if expr="use_titlecase">
|
||||
<message name="IDS_HIGH_EFFICIENCY_MODE_PROMO_TITLE" desc="In Title Case: The title for the high efficiency mode in-product promo bubble">
|
||||
<message name="IDS_MEMORY_SAVER_MODE_PROMO_TITLE" desc="In Title Case: The title for the Memory Saver mode in-product promo bubble">
|
||||
Make Thorium Faster
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not use_titlecase">
|
||||
<message name="IDS_HIGH_EFFICIENCY_MODE_PROMO_TITLE" desc="The title for the high efficiency mode in-product promo bubble">
|
||||
<message name="IDS_MEMORY_SAVER_MODE_PROMO_TITLE" desc="The title for the Memory Saver mode in-product promo bubble">
|
||||
Make Thorium faster
|
||||
</message>
|
||||
</if>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -103,7 +103,7 @@
|
|||
<if expr="_is_chrome_for_testing_branded">
|
||||
<then>
|
||||
<message name="IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY" desc="The text displayed when Thorium for Testing is installed in side-by-side mode, which does not support setting as the default browser.">
|
||||
Thorium for Testing cannot be made your default browser.
|
||||
Google Thorium for Testing cannot be made your default browser.
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
|
@ -154,6 +154,9 @@
|
|||
<message name="IDS_SETTINGS_SITE_DATA_PAGE_CLEAR_ON_EXIT_RADIO_SUBLABEL" desc="A description of the benefit/cost of choosing 'Sites can save content on your device. In short, a site will remember your preferences, shopping cart content, etc. during this browser session. But once you close all open windows, and then visit the site again, it's as if you're coming to the site for the first time.">
|
||||
Sites will probably work as you expect but won't remember you after you close all Thorium windows
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_DATA_PAGE_CLEAR_ON_EXIT_WITH_EXCEPTION_RADIO_SUBLABEL" desc="A description of the benefit/cost of choosing 'Sites can save content on your device. In short, a site will remember your preferences, shopping cart content, etc. during this browser session. But once you close all open windows, and then visit the site again, it's as if you're coming to the site for the first time.">
|
||||
Sites will probably work as expected. You'll be signed out of most sites when you close all Thorium windows, except your Google Account if you're signed in to Thorium.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_DATA_PAGE_DELETE_ON_EXIT_EXCEPTIONS_SUB_HEADING" desc="2 of 3. A label within 'Customized behaviors' that allows for exceptions to the 'On-device site data' setting. This label and the list of sites that can appear beneath it is only relevant if the user has chosen to allow 'on-device site data' as the default value above.">
|
||||
Always delete site data from your device when you close Thorium
|
||||
</message>
|
||||
|
@ -327,7 +330,7 @@
|
|||
</message>
|
||||
|
||||
<!-- Performance Page -->
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_SETTING_DESCRIPTION" desc="Description for the memory saver mode setting">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_SETTING_DESCRIPTION" desc="Description for the memory saver mode setting">
|
||||
When on, Thorium frees up memory from inactive tabs. This gives active tabs and other apps more computer resources and keeps Thorium fast. Your inactive tabs automatically become active again when you go back to them.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_BATTERY_SAVER_MODE_SETTING_DESCRIPTION" desc="Description for the energy saver mode setting">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Settings-specific strings (included from generated_resources.grd). -->
|
||||
<grit-part>
|
||||
<message name="IDS_SETTINGS_EMPTY_STRING" desc="Empty string, exist only to make code generic. No translation required."></message>
|
||||
<message name="IDS_SETTINGS_EMPTY_STRING" desc="Empty string, exist only to make code generic. No translation required." translateable="false"></message>
|
||||
|
||||
<!-- Shared across multiple pages -->
|
||||
<message name="IDS_SETTINGS_CONTINUE" desc="Label for 'Continue' buttons.">
|
||||
|
@ -89,8 +89,8 @@
|
|||
<message name="IDS_SETTINGS_ACCESSIBILITY" desc="Name of the settings page which displays accessibility preferences.">
|
||||
Accessibility
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_ACCESSIBILITY_WEB_STORE" desc="Text for an external link explaining that additional accessibility features are found on the Chrome Web Store.">
|
||||
Open Chrome Web Store
|
||||
<message name="IDS_SETTINGS_ACCESSIBILITY_WEB_STORE" desc="Text for an external link explaining that additional accessibility features are found on the Thorium Web Store.">
|
||||
Open Thorium Web Store
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_MORE_FEATURES_LINK" desc="Link which opens page where users can install extensions which provide additional accessibility features.">
|
||||
Add accessibility features
|
||||
|
@ -129,7 +129,7 @@
|
|||
Live Translate
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_TRANSLATE_SUBTITLE" desc="Description text for Live Translate feature.">
|
||||
Automatically translates captions
|
||||
Sends captions to Google to automatically translate them
|
||||
</message>
|
||||
<if expr="chromeos_ash">
|
||||
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE_BROWSER_ONLY_ENGLISH_ONLY" desc="Description text for Live Caption feature. When audio or video is playing, the user will see captions on the screen. Only works in Thorium browser initially. Currently only works for English media.">
|
||||
|
@ -143,7 +143,7 @@
|
|||
Automatically creates captions for English audio and video. Audio and captions never leave your device.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE" desc="Description text for Live Caption feature. When audio or video is playing, the user will see captions on the screen.">
|
||||
Automatically creates captions for audio and video. Audio and captions never leave your device.
|
||||
Automatically creates captions for audio and video
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CAPTIONS_LIVE_CAPTION_DOWNLOAD_PROGRESS" desc="Download progress indicator after Live Caption is enabled. The user needs to download certain files for the feature to work.">
|
||||
Downloading speech recognition files... <ph name="PERCENT">$1<ex>17</ex></ph>%
|
||||
|
@ -277,8 +277,8 @@
|
|||
<message name="IDS_SETTINGS_CHANGE_HOME_PAGE" desc="Label of the control to change the home page.">
|
||||
Change
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_WEB_STORE" desc="Sub-label about choosing something from the Chrome Web Store.">
|
||||
Open Chrome Web Store
|
||||
<message name="IDS_SETTINGS_WEB_STORE" desc="Sub-label about choosing something from the Thorium Web Store.">
|
||||
Open Thorium Web Store
|
||||
</message>
|
||||
<if expr="is_macosx">
|
||||
<message name="IDS_SETTINGS_TABS_TO_LINKS_PREF" desc="The documentation string of the 'Tabs to Links' preference">
|
||||
|
@ -312,7 +312,7 @@
|
|||
Search settings
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SEARCH_NO_RESULTS_HELP" desc="Help text for a search that has no results.">
|
||||
Go to <ph name="BEGIN_LINK_CHROMIUM"><a target="_blank" href="$1"></ph>Thorium help<ph name="END_LINK_CHROMIUM"></a></ph> if you can't find what you're looking for
|
||||
Go to <ph name="BEGIN_LINK_CHROMIUM"><a target="_blank" href="$1"></ph>Google Thorium help<ph name="END_LINK_CHROMIUM"></a></ph> if you can't find what you're looking for
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SETTINGS" desc="The settings page title.">
|
||||
Settings
|
||||
|
@ -371,22 +371,22 @@
|
|||
</message>
|
||||
|
||||
<!-- Autofill Page -->
|
||||
<message name="IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Thorium is trying to ' (or in some languages, 'Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before revealing plaintext passwords on the password page.">
|
||||
<message name="IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Google Thorium is trying to ' (or in some languages, 'Google Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before revealing plaintext passwords on the password page.">
|
||||
show passwords
|
||||
</message>
|
||||
<message name="IDS_PASSWORDS_PAGE_COPY_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Thorium is trying to ' (or in some languages, 'Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before copying plaintext passwords into the clipboard.">
|
||||
<message name="IDS_PASSWORDS_PAGE_COPY_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Google Thorium is trying to ' (or in some languages, 'Google Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before copying plaintext passwords into the clipboard.">
|
||||
copy passwords
|
||||
</message>
|
||||
<message name="IDS_PASSWORDS_PAGE_EDIT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Thorium is trying to ' (or in some languages, 'Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before editing plaintext passwords on the password page.">
|
||||
<message name="IDS_PASSWORDS_PAGE_EDIT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Google Thorium is trying to ' (or in some languages, 'Google Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before editing plaintext passwords on the password page.">
|
||||
edit passwords
|
||||
</message>
|
||||
<message name="IDS_PASSWORDS_PAGE_EXPORT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Thorium is trying to ' (or in some languages, 'Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before exporting passwords to a file.">
|
||||
<message name="IDS_PASSWORDS_PAGE_EXPORT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Google Thorium is trying to ' (or in some languages, 'Google Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before exporting passwords to a file.">
|
||||
export passwords
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_AUTOFILL_AND_PASSWORDS" desc="Name of the settings page which allows managing passwords, payment methods and addresses settings.">
|
||||
Autofill and passwords
|
||||
</message>
|
||||
<message name="IDS_PASSWORDS_PAGE_IMPORT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Thorium is trying to ' (or in some languages, 'Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before replacing passwords during Import.">
|
||||
<message name="IDS_PASSWORDS_PAGE_IMPORT_AUTHENTICATION_PROMPT_BIOMETRIC_SUFFIX" desc="Shown after 'Google Thorium is trying to ' (or in some languages, 'Google Thorium wants to ') in a dialog message. Text for the dialog box that prompts the user for the biometric authentication before replacing passwords during Import.">
|
||||
replace existing passwords
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_GOOGLE_PAYMENTS" desc="Label used to differentiate when an address or credit card entry comes from Google Pay. This should follow the casing of the 'Google Pay' brand. 'Google Pay' should not be translated as it is the product name.">
|
||||
|
@ -407,9 +407,6 @@
|
|||
<message name="IDS_SETTINGS_AUTOFILL_ADDRESSES_EMAIL" desc="This is the label for the field that lets a user modify the email address that will be used when auto-filling forms on the web.">
|
||||
Email
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_AUTOFILL_ADDRESS_HONORIFIC_LABEL" desc="This is the label for the field that lets the user modify the title that will be used when auto-filling forms on the web. A 'Title' field in a web form could be a prefix like Ms., Mx., or Dr. or a position held, like Captain or Rabbi." meaning="Honorific">
|
||||
Title
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_AUTOFILL_DETAIL" desc="Description of what toggling the 'Autofill' setting does. Immediately underneath IDS_SETTINGS_AUTOFILL">
|
||||
Enable Autofill to fill out forms in a single click
|
||||
</message>
|
||||
|
@ -1114,22 +1111,22 @@
|
|||
<message name="IDS_SETTINGS_SPEED_PAGE_TITLE" desc="Title of the speed section on the performance settings page.">
|
||||
Speed
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_SETTING" desc="Memory saver mode setting label. This mode allows the browser to save memory from background tabs">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_SETTING" desc="Memory saver mode setting label. This mode allows the browser to save memory from background tabs">
|
||||
Memory Saver
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_HEURISTICS_LABEL" desc="Label for the memory saver mode to discard tabs based on a set of heuristics">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_HEURISTICS_LABEL" desc="Label for the memory saver mode to discard tabs based on a set of heuristics">
|
||||
Free up memory based on usage
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_RECOMMENDED_BADGE" desc="Label for the recommended badge for the heuristics based memory saver option">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_RECOMMENDED_BADGE" desc="Label for the recommended badge for the heuristics based memory saver option">
|
||||
Recommended
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_ON_TIMER_LABEL" desc="Label for the memory saver mode to discard tabs on a timer">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_ON_TIMER_LABEL" desc="Label for the memory saver mode to discard tabs on a timer">
|
||||
Free up memory based on tab inactivity
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_RADIO_GROUP_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the memory saver mode radio group. When memory saver mode is enabled, this radio group will be expanded and allow the user to choose between different tab discarding policies.">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_RADIO_GROUP_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the memory saver mode radio group. When memory saver mode is enabled, this radio group will be expanded and allow the user to choose between different tab discarding policies.">
|
||||
Memory saver options
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_CHOOSE_DISCARD_TIME_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the dropdown menu in the second option of the memory saver radio group. The dropdown allows the user to select the time before a tab is discarded by memory saver.">
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_CHOOSE_DISCARD_TIME_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the dropdown menu in the second option of the memory saver radio group. The dropdown allows the user to select the time before a tab is discarded by memory saver.">
|
||||
Choose time range
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_BUTTON_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focusing the tab discarding exceptions list add button. Sites added to the list will not be discarded by memory saver.">
|
||||
|
@ -1322,8 +1319,8 @@
|
|||
</if>
|
||||
<if expr="chromeos_ash">
|
||||
<if expr="reven">
|
||||
<message name="IDS_SETTINGS_LANGUAGES_OPEN_CHROME_OS_SETTINGS_LABEL" desc="Label for the section that allow users to open languages settings in ThoriumOS.">
|
||||
Manage languages in ThoriumOS settings
|
||||
<message name="IDS_SETTINGS_LANGUAGES_OPEN_CHROME_OS_SETTINGS_LABEL" desc="Label for the section that allow users to open languages settings in ThoriumOS Flex.">
|
||||
Manage languages in ThoriumOS Flex settings
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not reven">
|
||||
|
@ -1380,8 +1377,8 @@
|
|||
</message>
|
||||
<if expr="is_chromeos">
|
||||
<if expr="reven">
|
||||
<message name="IDS_SETTINGS_SECURE_DNS_OPEN_CHROME_OS_SETTINGS_LABEL" desc="Label for the section that allow users to open Secure DNS settings in ThoriumOS.">
|
||||
Manage secure DNS in ThoriumOS settings
|
||||
<message name="IDS_SETTINGS_SECURE_DNS_OPEN_CHROME_OS_SETTINGS_LABEL" desc="Label for the section that allow users to open Secure DNS settings in ThoriumOS Flex.">
|
||||
Manage secure DNS in ThoriumOS Flex settings
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not reven">
|
||||
|
@ -1479,6 +1476,9 @@
|
|||
<message name="IDS_SETTINGS_TOPICS_PAGE_CURRENT_TOPICS_DESCRIPTION" desc="A description that appear beneath the 'Your topics' label. * 'You can block': There is a 'Block' button (or an X on mobile) that appears next to each topic in the list. * 'auto-deletes': this could also read 'Thorium deletes...' We included the 'auto' to reinforce that this is part of a system and the deletion is done regularly.">
|
||||
You can block topics you don’t want shared with sites. Thorium also auto-deletes your topics older than 4 weeks.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_TOPICS_PAGE_CURRENT_TOPICS_DESCRIPTION_PTB" desc="PTB - A description that appear beneath the 'Your topics' label. * 'You can block': There is a 'Block' button (or an X on mobile) that appears next to each topic in the list. * 'auto-deletes': this could also read 'Thorium deletes...' We included the 'auto' to reinforce that this is part of a system and the deletion is done regularly." translateable="false">
|
||||
Topics older than 4 weeks get auto-deleted
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_TOPICS_PAGE_CURRENT_TOPICS_DESCRIPTION_LEARN_MORE_A11Y_LABEL" desc="Read by screen readers and associated with a 'learn more' button.">
|
||||
Learn more about ad topics
|
||||
</message>
|
||||
|
@ -1497,7 +1497,9 @@
|
|||
<message name="IDS_SETTINGS_TOPICS_PAGE_FOOTER" desc="This footer helps the user understand that this setting is just one signal among others that affect whether this user sees personalized ads on a site. We define 'personalize' as 'when Google provides recommendations and other content for users based on their data'. At a high level, there are 4 things that affect whether an ad is personalized in this context: * 'this setting' refers to the 'Ad topics' setting. The user is on this page. * 'Site-suggested ads': this is a link to the other new ad setting Thorium is launching and that sites can use to personalize ads a user sees. * 'cookie settings': this is a link to the cookies control section in Thorium settings. The Privacy Sandbox project deprecates third-party cookies, but it's a process, and we're launching new functionality that will replace important functionality of cookies. Until third-party cookies are deprecated, the two systems remain active in Thorium. * 'site you're viewing personalizes ads': When a user engages with a site, Thorium has no control over whether that site shows the user personalized ads. Imagine you visit www.interesting-site.com and they know a lot about you already based on previous visits. They can personalize content and ads to you if they like. They can use an ad-serving product, like Facebook or Google Ads to deliver personalized ads. They can also use the new Privacy Sandbox APIs (if they so choose) in order to get more information about the user that could be helpful to them in order to personalize ads. Those 2 APIs (settings, from the user's perspective), are 'Ad topics' and 'Site-suggested ads'.">
|
||||
As you browse, whether an ad you see is personalized depends on this setting, <ph name="BEGIN_LINK1"><a href="$1" target="_blank"></ph>Site-suggested ads<ph name="LINK_END1"></a></ph>, your <ph name="BEGIN_LINK2"><a href="$2" target="_blank"></ph>cookie settings<ph name="LINK_END2"></a></ph>, and if the site you’re viewing personalizes ads
|
||||
</message>
|
||||
|
||||
<message name="IDS_SETTINGS_TOPICS_PAGE_FOOTER_PTB" desc="PTB - This footer helps the user understand that this setting is just one signal among others that affect whether this user sees personalized ads on a site. We define 'personalize' as 'when Google provides recommendations and other content for users based on their data'. At a high level, there are 4 things that affect whether an ad is personalized in this context: * 'this setting' refers to the 'Ad topics' setting. The user is on this page. * 'Site-suggested ads': this is a link to the other new ad setting Thorium is launching and that sites can use to personalize ads a user sees. * 'cookie settings': this is a link to the cookies control section in Thorium settings. The Privacy Sandbox project deprecates third-party cookies, but it's a process, and we're launching new functionality that will replace important functionality of cookies. Until third-party cookies are deprecated, the two systems remain active in Thorium. * 'site you're viewing personalizes ads': When a user engages with a site, Thorium has no control over whether that site shows the user personalized ads. Imagine you visit www.interesting-site.com and they know a lot about you already based on previous visits. They can personalize content and ads to you if they like. They can use an ad-serving product, like Facebook or Google Ads to deliver personalized ads. They can also use the new Privacy Sandbox APIs (if they so choose) in order to get more information about the user that could be helpful to them in order to personalize ads. Those 2 APIs (settings, from the user's perspective), are 'Ad topics' and 'Site-suggested ads'." translateable="false">
|
||||
Whether an ad you see is personalized can depend on many things including this setting, <ph name="BEGIN_LINK1"><a href="$1" target="_blank"></ph>site-suggested ads<ph name="LINK_END1"></a></ph>, your <ph name="BEGIN_LINK2"><a href="$2" target="_blank"></ph>cookie settings<ph name="LINK_END2"></a></ph>, and if the site you're viewing personalized ads. Learn more about <ph name="BEGIN_LINK3"><a href="$3" target="_blank"></ph>managing your ad privacy<ph name="LINK_END3"></a></ph>
|
||||
</message>
|
||||
<!-- Privacy Sandbox Settings 4 - Fledge Page -->
|
||||
<message name="IDS_SETTINGS_FLEDGE_PAGE_TITLE" desc="A page title and the name of a new setting. **** CONTEXT PRIVACY SANDBOX **** Thorium's Privacy Sandbox initiative 1) deprecates third-party cookies in Thorium, 2) supports free and open content on the web (by finding better ways to support ads online), 3) while providing stronger privacy protections for users. You can see a high-level description of this public project at www.privacysanbox.com. **** NEW SETTINGS SECTION IN CHROME **** 3 new ad-specific settings appear on an 'Ad privacy' page in Thorium settings. For an equivalent structure, see 'Security' on chrome://settings/privacy that opens chrome://settings/security. Likewise, 'Ad privacy' on chrome://settings/privacy will open chrome://settings/AdPrivacy.">
|
||||
Site-suggested ads
|
||||
|
@ -1603,9 +1605,6 @@
|
|||
<message name="IDS_SETTINGS_AD_MEASUREMENT_PAGE_CONSIDER_BULLET_2" desc="2 of 3 bullets in the 'Things to consider' section that describes the Ad measurement setting.">
|
||||
Thorium limits the total amount of data that sites can share through the browser to measure ad performance
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_AD_MEASUREMENT_PAGE_CONSIDER_BULLET_3" desc="3 of 3 bullets in the 'Things to consider' section that describes the Ad measurement setting.">
|
||||
Your Android device may include a similar setting. If Ad measurement is turned on in Thorium and on your Android device, a company may be able to measure the effectiveness of an ad across web sites you visit and apps you use.
|
||||
</message>
|
||||
|
||||
<!-- Privacy Guide -->
|
||||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_LABEL" desc="Label of the row in the Thorium privacy and security settings page that leads to the 'Privacy Guide'. 'Privacy Guide' is a term, see go/glossarymanager/termset?gid=27517723&tsid=28b420b3.">
|
||||
|
@ -1665,15 +1664,6 @@
|
|||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_COMPLETION_CARD_WAA_LABEL" desc="Text of the Web and App Activity label in the completion card of the 'Privacy Guide'.">
|
||||
Web & App Activity
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_COMPOSE_HEADERIDS__ADDITIONAL_SETTINGS" translateable="false" desc="sub header label for compose in the 'Privacy Guide'.">
|
||||
Additional settings
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_COMPOSE_HEADER" translateable="false" desc="Header for compose in the 'Privacy Guide'.">
|
||||
Compose
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_COMPOSE_DESCRIPTION" translateable="false" desc="a descitpion of compose in the 'Privacy Guide'.">
|
||||
Offer Autofill assistance in eligible fields
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PRIVACY_GUIDE_MSBB_CARD_HEADER" desc="Header of the 'make searches and browsing better' card in the 'Privacy Guide'.">
|
||||
Choose your search and browsing quality
|
||||
</message>
|
||||
|
@ -1940,8 +1930,8 @@
|
|||
</message>
|
||||
<message name="IDS_SETTINGS_SAFETY_CHECK_REVIEW_EXTENSIONS" desc="This text describes that potentially harmful extensions need to be reviewed by the user. The placeholder will be a numeral.">
|
||||
{NUM_EXTENSIONS, plural,
|
||||
=1 {Review 1 extension that was taken down from the Chrome Web Store}
|
||||
other {Review {NUM_EXTENSIONS} extensions that were taken down from the Chrome Web Store}}
|
||||
=1 {Review 1 extension that was taken down from the Thorium Web Store}
|
||||
other {Review {NUM_EXTENSIONS} extensions that were taken down from the Thorium Web Store}}
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SAFETY_CHECK_REVIEW_NOTIFICATION_PERMISSIONS_PRIMARY_LABEL" desc="'Review Notification Permissions' shows the websites that send a lot of notifications. This label is the header of the module in the site settings notification page. The number represents the number of notification permissions to be reviewed.">
|
||||
{NUM_SITES, plural,
|
||||
|
@ -2013,9 +2003,6 @@
|
|||
<message name="IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC" desc="In the advanced options tab, the secondary text next to the checkbox that enables prediction of network actions.">
|
||||
Uses cookies to remember your preferences, even if you don’t visit those pages
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC_COOKIES_PAGE" desc="On the cookies page, the secondary text next to the checkbox that enables prediction of network actions.">
|
||||
Preloads pages that Thorium thinks you might visit. To do this, Thorium may use cookies, if you allow cookies, and may encrypt and send pages through Google to hide your identity from sites.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION" desc="The section title of 'Protects you and your device from dangerous sites'">
|
||||
Safe Browsing (protects you and your device from dangerous sites)
|
||||
</message>
|
||||
|
@ -2236,6 +2223,9 @@
|
|||
<message name="IDS_SETTINGS_SECURE_DNS_CUSTOM_CONNECTION_ERROR" desc="Error text for a custom secure DNS provider entry to which a probe connection fails">
|
||||
Please verify that this is a valid provider or try again later
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SECURITY_V8_LINK_TITLE" desc="Title for the link row to the V8 security settings.">
|
||||
Manage V8 security
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CONTENT_SETTINGS" desc="Text of the button that takes a user to settings page thats allows users to modify site settings. Also the title of that settings page.">
|
||||
Content settings
|
||||
</message>
|
||||
|
@ -2337,6 +2327,11 @@
|
|||
<message name="IDS_SETTINGS_SEARCH_EXPLANATION" desc="Explanation for the search engine dropdown setting.">
|
||||
Search engine used in the address bar.
|
||||
</message>
|
||||
<if expr="is_chromeos">
|
||||
<message name="IDS_SETTINGS_SEARCH_EXPLANATION_PRIMARY_PROFILE" desc="Explanation for the search engine dropdown setting in the primary profile.">
|
||||
Search engine used in the address bar and the launcher.
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_SETTINGS_SEARCH_EXPLANATION_ACCESSIBILITY_LABEL" desc="Accessibility label for a 'learn more' link which links to an article about setting a default search engine.">
|
||||
Learn more about default search engines
|
||||
</message>
|
||||
|
@ -2366,6 +2361,9 @@
|
|||
<message name="IDS_SETTINGS_SEARCH_ENGINES_EDIT_SEARCH_ENGINE" desc="Title for a dialog that allows editing an existing search engine.">
|
||||
Edit search engine
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SEARCH_ENGINES_VIEW_SEARCH_ENGINE" desc="Title for a dialog that allows viewing details of an existing search engine.">
|
||||
Search engine
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SEARCH_ENGINES_DELETE_CONFIRMATION_TITLE" desc="Title for a dialog that confirms that a user wants to delete an existing search engine.">
|
||||
Delete search engine
|
||||
</message>
|
||||
|
@ -2426,6 +2424,9 @@
|
|||
<message name="IDS_SETTINGS_SEARCH_ENGINES_DEACTIVATE" desc="Text of the button that deactivates a search engine">
|
||||
Deactivate
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SEARCH_ENGINES_VIEW_DETAILS" desc="Label for button that allows the user to view details of a search engine">
|
||||
Details
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SEARCH_ENGINES_MANAGE_EXTENSION" desc="Text displayed for a button that allows the user to manage a Thorium extension">
|
||||
Manage
|
||||
</message>
|
||||
|
@ -2749,6 +2750,21 @@
|
|||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the JavaScript content setting.">
|
||||
Not allowed to use JavaScript
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED" desc="Label for the enabled option of the JavaScript optimizer content setting.">
|
||||
Sites can use the V8 optimizer
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED" desc="Label for the disabled option of the JavaScript optimizer content setting.">
|
||||
Don’t allow sites to use the V8 optimizer
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED_SUB_LABEL" desc="Sub-label for the disabled option of the JavaScript optimizer content setting.">
|
||||
Reduces performance but makes V8 more resistant to attacks
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the JavaScript optimizer content setting.">
|
||||
Always allowed to use the V8 optimizer
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the JavaScript optimizer content setting.">
|
||||
Not allowed to use V8 optimizer
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_LOCATION_DESCRIPTION" desc="Description of the location content setting.">
|
||||
Sites usually use your location for relevant features or info, like local news or nearby shops
|
||||
</message>
|
||||
|
@ -2990,6 +3006,21 @@
|
|||
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the virtual reality content setting.">
|
||||
Not allowed to use virtual reality devices or data
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_WEB_PRINTING_DESCRIPTION" desc="Description of the web printing content setting.">
|
||||
Sites can use advanced features from any printer accessible to your device without going through the standard Print prompt
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_WEB_PRINTING_ASK" desc="Label for the ask option of the web printing content setting.">
|
||||
Sites can ask to look for and use printers accessible to your device
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_WEB_PRINTING_BLOCK" desc="Label for the block option of the web printing content setting.">
|
||||
Sites can’t look for or use printers accessible to your device
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_WEB_PRINTING_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the web printing content setting.">
|
||||
Allowed to look for and use printers accessible to your device
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_WEB_PRINTING_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the web printing content setting.">
|
||||
Not allowed to look for or use printers accessible to your device
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SITE_SETTINGS_ZOOM_LEVELS_DESCRIPTION" desc="Description of the zoom levels content setting.">
|
||||
You can set how much you zoom in or out on certain websites
|
||||
</message>
|
||||
|
@ -3044,7 +3075,7 @@
|
|||
<message name="IDS_SETTINGS_THIRD_PARTY_COOKIES_PAGE_ALLOW_BULLET_2" desc="2 of 2 bullets that describes the 'Allow all cookies' option. Sites use third-party cookies to 'see your browsing activity across different sites'. Third-party cookies aren't necessarily bad. 1) Personalized ads can be useful to the user (though the tracking that generally accompanies the use of third-party cookies for ads isn't). But 2) third-party cookies are also used for spam protection and for anti-tracking efforts.">
|
||||
Sites can use cookies to see your browsing activity across different sites, for example, to personalize ads
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_THIRD_PARTY_COOKIES_PAGE_BLOCK_INCOGNITO_RADIO_LABEL" desc="2 of 3 options the user has to configure cookies. See the cookies page for context: chrome://settings/cookies. For more about Incognito mode, see Thorium's Help Center.">
|
||||
<message name="IDS_SETTINGS_THIRD_PARTY_COOKIES_PAGE_BLOCK_INCOGNITO_RADIO_LABEL" desc="2 of 3 options the user has to configure cookies. See the cookies page for context: chrome://settings/cookies. For more about Incognito mode, see Google Thorium's Help Center.">
|
||||
Block third-party cookies in Incognito mode
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_THIRD_PARTY_COOKIES_PAGE_BLOCK_INCOGNITO_EXPAND_A11Y_LABEL" desc="This text is read by screenreaders and helps users find more info about this choice.">
|
||||
|
@ -3858,8 +3889,8 @@
|
|||
</message>
|
||||
</if>
|
||||
<if expr="not is_chromeos">
|
||||
<message name="IDS_SETTINGS_SYSTEM_HARDWARE_ACCELERATION_LABEL" desc="Label for the checkbox that forces Thorium to render via hardware acceleration (GPU) when available.">
|
||||
Use hardware acceleration when available
|
||||
<message name="IDS_SETTINGS_SYSTEM_HARDWARE_ACCELERATION_LABEL" desc="Label for the checkbox that forces Thorium to render via graphics acceleration (GPU) when available.">
|
||||
Use graphics acceleration when available
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SYSTEM_PROXY_SETTINGS_LABEL" desc="Label for the control that opens the system network proxy settings. These settings apply to the entire computer.">
|
||||
Open your computer's proxy settings
|
||||
|
@ -4331,31 +4362,31 @@
|
|||
</message>
|
||||
|
||||
<!-- Experimental settings strings -->
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_PAGE_TITLE" desc="Title of page holding experimental AI settings" translateable="false">
|
||||
<message name="IDS_SETTINGS_AI_PAGE_TITLE" desc="Title of page holding experimental AI settings">
|
||||
Experimental AI
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE_MAIN_LABEL" desc="Toggle primary description" translateable="false">
|
||||
<message name="IDS_SETTINGS_AI_PAGE_MAIN_LABEL" desc="Toggle primary description">
|
||||
Try out experimental AI features
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE_MAIN_SUBLABEL" desc="Toggle secondary description" translateable="false">
|
||||
<message name="IDS_SETTINGS_AI_PAGE_MAIN_SUBLABEL" desc="Toggle secondary description">
|
||||
These features use AI, are in early development, and won’t always get it right.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE1_LABEL" desc="Toggle primary description" translateable="false">
|
||||
Autofill helper
|
||||
<message name="IDS_SETTINGS_AI_COMPOSE_LABEL" desc="The primary description for the 'Help me write' feature.">
|
||||
Help me write
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE1_SUBLABEL" desc="Toggle secondary description" translateable="false">
|
||||
Enables autofill helper on certain input fields
|
||||
<message name="IDS_SETTINGS_AI_COMPOSE_SUBLABEL" desc="Secondary description explaining the 'Help me write' feature.">
|
||||
Helps you write short-form content for things on the web, like reviews. Suggested content is based on your prompts and the content of the web page. To use this feature, right-click on a text box.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE2_LABEL" desc="Toggle primary description" translateable="false">
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE2_LABEL" desc="Toggle primary description">
|
||||
Tab organizer
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE2_SUBLABEL" desc="Toggle secondary description" translateable="false">
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE2_SUBLABEL" desc="Toggle secondary description">
|
||||
Automatically creates tab groups based on your open tabs. To use this feature, right-click on a tab and click Organize similar tabs.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE3_LABEL" desc="The primary description for the create themes with AI feature." translateable="false">
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE3_LABEL" desc="The primary description for the create themes with AI feature.">
|
||||
Create themes with AI
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE3_SUBLABEL" desc="The secondary description for the create themes with AI feature." translateable="false">
|
||||
<message name="IDS_SETTINGS_EXPERIMENTAL_ADVANCED_FEATURE3_SUBLABEL" desc="The secondary description for the create themes with AI feature.">
|
||||
Creates custom themes based on the subject, mood, visual style, and color that you choose. To use this feature, open a new tab and click Customize Thorium.
|
||||
</message>
|
||||
</grit-part>
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
Manage languages
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CAPTIONS_MANAGE_LANGUAGES_SUBTITLE" desc="Subtitle for the caption settings section for managing language packs.">
|
||||
Add and remove languages to caption
|
||||
Language packs are used for Live Caption and are stored on your device
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_CAPTIONS_LIVE_TRANSLATE_TARGET_LANGUAGE" desc="Description of the target language setting for the Live Translate feature.">
|
||||
Translate to
|
||||
|
@ -205,7 +205,7 @@
|
|||
Save
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_NEARBY_SHARE_DESCRIPTION" desc="A description of nearby share that helps users understand what the feature is used for.">
|
||||
Share files with people around you. <ph name="LINK_BEGIN"><a></ph>Learn more<ph name="LINK_END"></a></ph>
|
||||
Share files and more with nearby devices. <ph name="LINK_BEGIN"><a></ph>Learn more<ph name="LINK_END"></a></ph>
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_NEARBY_SHARE_HIGH_VISIBILITY_TITLE" desc="Label for the switch that toggles whether the device is visible to all devices around it for the Nearby Share feature.">
|
||||
Visible to everyone
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include <optional>
|
||||
#include "chrome/browser/ash/net/dns_over_https/templates_uri_resolver_impl.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -396,7 +396,7 @@ void StubResolverConfigReader::OnAndroidOwnedStateCheckComplete(
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
absl::optional<std::string>
|
||||
std::optional<std::string>
|
||||
StubResolverConfigReader::GetDohWithIdentifiersDisplayServers() {
|
||||
ash::dns_over_https::TemplatesUriResolverImpl doh_template_uri_resolver;
|
||||
doh_template_uri_resolver.UpdateFromPrefs(local_state_);
|
||||
|
@ -404,6 +404,6 @@ StubResolverConfigReader::GetDohWithIdentifiersDisplayServers() {
|
|||
if (doh_template_uri_resolver.GetDohWithIdentifiersActive())
|
||||
return doh_template_uri_resolver.GetDisplayTemplates();
|
||||
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -100,14 +100,6 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
|||
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
|
||||
registry->RegisterBooleanPref(prefs::kWebRtcTextLogCollectionAllowed, true);
|
||||
|
||||
// Dictionaries to keep track of default tasks in the file browser.
|
||||
registry->RegisterDictionaryPref(
|
||||
prefs::kDefaultTasksByMimeType,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterDictionaryPref(
|
||||
prefs::kDefaultTasksBySuffix,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
|
||||
// We need to register the type of these preferences in order to query
|
||||
// them even though they're only typically controlled via policy.
|
||||
registry->RegisterBooleanPref(policy::policy_prefs::kHideWebStoreIcon, false);
|
||||
|
|
|
@ -25,10 +25,7 @@ if (bundle_widevine_cdm) {
|
|||
declare_args() {
|
||||
# Enables checks that ensure the packages are installable on all supported
|
||||
# distributions.
|
||||
enable_distro_version_check = true
|
||||
|
||||
# Enable building snap packages
|
||||
enable_snap_package = false
|
||||
enable_distro_version_check = false
|
||||
}
|
||||
|
||||
assert(is_linux)
|
||||
|
@ -446,7 +443,7 @@ template("linux_package") {
|
|||
} else if (current_cpu == "mips64el") {
|
||||
deb_arch = "mips64el"
|
||||
} else if (current_cpu == "loong64") {
|
||||
deb_arch = "loongarch64"
|
||||
deb_arch = "loong64"
|
||||
} else {
|
||||
assert(false, "Linux installer not configured for this architecture.")
|
||||
}
|
||||
|
@ -526,53 +523,12 @@ template("linux_package") {
|
|||
":merge_rpm_dependencies",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_snap_package) {
|
||||
snap_target_name = "${target_name}_snap"
|
||||
action(snap_target_name) {
|
||||
visibility = [ ":*" ]
|
||||
deps = [
|
||||
":installer_deps",
|
||||
":save_build_info",
|
||||
]
|
||||
script = "//build/gn_run_binary.py"
|
||||
sources = [
|
||||
"snap/thorium.launcher.in",
|
||||
"snap/snapcraft.yaml.in",
|
||||
]
|
||||
if (!is_chrome_branded) {
|
||||
package = "thorium"
|
||||
}
|
||||
if (current_cpu == "x86") {
|
||||
snap_arch = "i386"
|
||||
} else if (current_cpu == "x64") {
|
||||
snap_arch = "amd64"
|
||||
} else if (current_cpu == "arm") {
|
||||
snap_arch = "armhf"
|
||||
} else if (current_cpu == "arm64") {
|
||||
snap_arch = "arm64"
|
||||
} else {
|
||||
assert(false, "Linux installer not configured for this architecture.")
|
||||
}
|
||||
args = [
|
||||
rebase_path("snap/build.sh", root_build_dir),
|
||||
package,
|
||||
chrome_version_full,
|
||||
snap_arch,
|
||||
target_os,
|
||||
]
|
||||
outputs = [ "$root_out_dir/${package}_${chrome_version_full}_${snap_arch}.snap" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group(target_name) {
|
||||
deps = [ ":$deb_target_name" ]
|
||||
if (!is_chromeos_ash) {
|
||||
deps += [ ":$rpm_target_name" ]
|
||||
if (enable_snap_package) {
|
||||
deps += [ ":$snap_target_name" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@@include@@repo_variables.include
|
||||
|
||||
# Copyright (c) 2024 Alex313031.
|
||||
|
||||
APT_GET="`command -v apt-get 2> /dev/null`"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- Copyright 2023 The Chromium Authors and Alex313031 -->
|
||||
<!-- Copyright 2024 The Chromium Authors and Alex313031 -->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>thorium-browser.desktop</id>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2024 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
|
@ -8,9 +8,6 @@
|
|||
# Base name of the package.
|
||||
PACKAGE="thorium-browser"
|
||||
|
||||
# Base name of the snap package
|
||||
SNAPNAME="thorium-browser"
|
||||
|
||||
# Filename of the main executable (for generating launcher scripts, etc.)
|
||||
PROGNAME=thorium
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@ process_template() (
|
|||
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
|
||||
-e "s#@@PACKAGE_ORIG@@#${PACKAGE_ORIG}#g" \
|
||||
-e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \
|
||||
-e "s#@@SNAPNAME@@#${SNAPNAME}#g" \
|
||||
-e "s#@@PROGNAME@@#${PROGNAME}#g" \
|
||||
-e "s#@@SANDNAME@@#${SANDNAME}#g" \
|
||||
-e "s#@@CHANNEL@@#${CHANNEL}#g" \
|
||||
|
@ -381,10 +380,15 @@ stage_install_common() {
|
|||
fi
|
||||
|
||||
# Check to make sure all the ELF binaries are stripped.
|
||||
UNSTRIPPED=$(find "${STAGEDIR}/${INSTALLDIR}/" -type f | xargs file |
|
||||
grep ELF | grep -c "not stripped" || true)
|
||||
if [ "${UNSTRIPPED}" != "0" ]; then
|
||||
echo "NOTICE: Found ${UNSTRIPPED} unstripped ELF files." 1>&2
|
||||
UNSTRIPPED_BINS=
|
||||
for elf in $(find "${STAGEDIR}/${INSTALLDIR}/" -type f | xargs file |
|
||||
grep ELF | grep "not stripped" | awk '{print $1;}' |
|
||||
sed 's/:$//'); do
|
||||
UNSTRIPPED_BINS="${UNSTRIPPED_BINS} ${elf}"
|
||||
done
|
||||
|
||||
if [ -n "${UNSTRIPPED_BINS}" ]; then
|
||||
echo "NOTICE: Found unstripped ELF files:${UNSTRIPPED_BINS}" 1>&2
|
||||
fi
|
||||
|
||||
# Check to make sure no ELF binaries set RPATH.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2024 The Chromium Authors and Alex313031.
|
||||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2009 The Chromium Authors
|
||||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2024 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2024 The Chromium Authors, the AUR, and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
@ -53,7 +53,7 @@ export CHROME_DESKTOP="thorium-browser.desktop"
|
|||
|
||||
# Set CHROME_VERSION_EXTRA text, which is displayed in the About dialog on chrome://help
|
||||
# DIST=`cat /etc/debian_version`
|
||||
export CHROME_VERSION_EXTRA="@@CHANNEL@@, built on Linux"
|
||||
export CHROME_VERSION_EXTRA="@@CHANNEL@@, built on Ubuntu"
|
||||
|
||||
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
|
||||
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_THORIUM
|
||||
|
|
|
@ -272,10 +272,8 @@ COMMON_RECOMMENDS=$(grep -v ^$ "${MANUAL_RECOMMENDS}" | grep -v ^# |
|
|||
|
||||
# Make everything happen in the OUTPUTDIR.
|
||||
cd "${OUTPUTDIR}"
|
||||
# BASEREPOCONFIG="dl.google.com/linux/chrome/deb/ stable main"
|
||||
# Only use the default REPOCONFIG if it's unset (e.g. verify_channel might have
|
||||
# set it to an empty string)
|
||||
# REPOCONFIG="${REPOCONFIG-deb [arch=${ARCHITECTURE}] https://${BASEREPOCONFIG}}"
|
||||
# Allowed configs include optional HTTPS support and explicit multiarch
|
||||
# platforms.
|
||||
REPOCONFIGREGEX="deb (\\\\[arch=[^]]*\\\\b${ARCHITECTURE}\\\\b[^]]*\\\\]"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2024 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2024 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
|
|
@ -216,7 +216,6 @@ fi
|
|||
eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
|
||||
"${OUTPUTDIR}/installer/theme/BRANDING")
|
||||
|
||||
# REPOCONFIG="https://dl.google.com/linux/${PACKAGE#google-}/rpm/stable"
|
||||
export USR_BIN_SYMLINK_NAME="${PACKAGE}"
|
||||
|
||||
stage_install_rpm
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2020 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
if [ "$VERBOSE" ]; then
|
||||
set -x
|
||||
fi
|
||||
set -u
|
||||
|
||||
# Remove temporary files and unwanted packaging output.
|
||||
cleanup() {
|
||||
log_cmd echo "Cleaning..."
|
||||
rm -rf "${TMPFILEDIR}"
|
||||
}
|
||||
|
||||
SCRIPTDIR=$(readlink -f "$(dirname "$0")")
|
||||
OUTPUTDIR="${PWD}"
|
||||
SNAPNAME="$1"
|
||||
CHANNEL="stable"
|
||||
VERSION="$2"
|
||||
SNAP_ARCH="$3"
|
||||
TARGET_OS="$4"
|
||||
|
||||
# call cleanup() on exit
|
||||
trap cleanup 0
|
||||
|
||||
LOCKFILE="${OUTPUTDIR}/snap-lock"
|
||||
TMPFILEDIR="${OUTPUTDIR}/snap-${CHANNEL}"
|
||||
STAGEDIR="${TMPFILEDIR}/chrome"
|
||||
mkdir -p "${STAGEDIR}"
|
||||
|
||||
cp "${OUTPUTDIR}/installer/version.txt" "${TMPFILEDIR}/"
|
||||
|
||||
source ${OUTPUTDIR}/installer/common/installer.include
|
||||
|
||||
if [ "$SNAPNAME" = "google-chrome" ]; then
|
||||
source "${OUTPUTDIR}/installer/common/google-chrome.info"
|
||||
else
|
||||
source "${OUTPUTDIR}/installer/common/chromium-browser.info"
|
||||
fi
|
||||
|
||||
prep_staging_common
|
||||
PACKAGE_ORIG= # unused, but needs to be set
|
||||
USR_BIN_SYMLINK_NAME= # unused, but needs to be set
|
||||
SHLIB_PERMS=644
|
||||
BRANDING="$(echo ${SNAPNAME} | tr '-' '_')"
|
||||
stage_install_common
|
||||
LAUNCHER_SCRIPT="${TMPFILEDIR}/thorium.launcher"
|
||||
process_template "${SCRIPTDIR}/thorium.launcher.in" "${LAUNCHER_SCRIPT}"
|
||||
chmod +x "${LAUNCHER_SCRIPT}"
|
||||
process_template "${SCRIPTDIR}/snapcraft.yaml.in" "${TMPFILEDIR}/snapcraft.yaml"
|
||||
if [ "$SNAPNAME" = "google-chrome" ]; then
|
||||
LOGO="product_logo_256"
|
||||
if [ "$CHANNEL" = "beta" ]; then
|
||||
sed -i -e "s:$LOGO.png:${LOGO}_beta.png:" "${TMPFILEDIR}/snapcraft.yaml"
|
||||
elif [ "$CHANNEL" = "unstable" ]; then
|
||||
sed -i -e "s:$LOGO.png:${LOGO}_dev.png:" "${TMPFILEDIR}/snapcraft.yaml"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${TMPFILEDIR}"
|
||||
|
||||
# Use flock to serialize all executions of snapcraft, as it currently
|
||||
# doesn't handle well concurrent builds for the same snap name
|
||||
# (https://bugs.launchpad.net/snapcraft/+bug/1869030).
|
||||
flock "${LOCKFILE}" snapcraft
|
||||
|
||||
mv "${SNAPNAME}_${VERSION}_${SNAP_ARCH}.snap" \
|
||||
"${OUTPUTDIR}/${SNAPNAME}-${CHANNEL}_${VERSION}_${SNAP_ARCH}.snap"
|
|
@ -1,222 +0,0 @@
|
|||
# Initially copied from
|
||||
# https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/snapcraft.yaml?h=stable
|
||||
|
||||
name: @@SNAPNAME@@
|
||||
adopt-info: chromium
|
||||
summary: @@SHORTDESC@@
|
||||
description: @@FULLDESC@@
|
||||
confinement: classic
|
||||
grade: stable
|
||||
base: core20
|
||||
assumes:
|
||||
- snapd2.55 # for 'snapctl is-connected', used in thorium.launcher
|
||||
|
||||
apps:
|
||||
@@SNAPNAME@@:
|
||||
extensions: [gnome-3-38]
|
||||
command: bin/desktop-launch $SNAP/bin/thorium.launcher
|
||||
desktop: bin/@@SNAPNAME@@.desktop
|
||||
environment:
|
||||
DISABLE_WAYLAND: 1
|
||||
GTK_USE_PORTAL: 1
|
||||
CHROME_DESKTOP: @@SNAPNAME@@.desktop
|
||||
CHROME_CONFIG_HOME: $SNAP_USER_COMMON
|
||||
plugs:
|
||||
- audio-playback
|
||||
- audio-record
|
||||
- bluez # for Web Bluetooth (https://launchpad.net/bugs/1887201)
|
||||
- camera
|
||||
- cups
|
||||
- cups-control
|
||||
- desktop
|
||||
- gsettings
|
||||
- home
|
||||
- joystick
|
||||
- mount-observe
|
||||
- network
|
||||
- network-manager
|
||||
- opengl
|
||||
- password-manager-service
|
||||
- pulseaudio # remove once snapd 2.41 is available everywhere
|
||||
- raw-usb # for WebUSB (https://launchpad.net/bugs/1780678)
|
||||
- removable-media
|
||||
- screen-inhibit-control
|
||||
- u2f-devices
|
||||
- unity7 # required for xdg-open to work
|
||||
- upower-observe
|
||||
- x11
|
||||
slots:
|
||||
- mpris
|
||||
|
||||
plugs:
|
||||
# This is not used or needed for anything other than to trigger automatic
|
||||
# installation of the cups snap via "default-provider: cups"
|
||||
foo-install-cups:
|
||||
interface: content
|
||||
content: foo
|
||||
default-provider: cups
|
||||
target: $SNAP_DATA/foo
|
||||
browser-sandbox:
|
||||
interface: browser-support
|
||||
allow-sandbox: true
|
||||
gtk-3-themes:
|
||||
interface: content
|
||||
target: $SNAP/data-dir/themes
|
||||
default-provider: gtk-common-themes
|
||||
icon-themes:
|
||||
interface: content
|
||||
target: $SNAP/data-dir/icons
|
||||
default-provider: gtk-common-themes
|
||||
sound-themes:
|
||||
interface: content
|
||||
target: $SNAP/data-dir/sounds
|
||||
default-provider: gtk-common-themes
|
||||
@@SNAPNAME@@-config:
|
||||
interface: personal-files
|
||||
read: [$HOME/.config/@@SNAPNAME@@]
|
||||
|
||||
parts:
|
||||
chromium:
|
||||
plugin: nil
|
||||
source: .
|
||||
after: [desktop-gtk3, gtk-key-themes]
|
||||
stage-packages:
|
||||
- libgbm1
|
||||
- libgl1-mesa-glx
|
||||
- libgtk-3-0
|
||||
- libnss3
|
||||
- libsecret-1-0
|
||||
- libxss1
|
||||
- pulseaudio
|
||||
- shared-mime-info
|
||||
- ubuntu-settings
|
||||
override-pull: |
|
||||
set -eux
|
||||
snapcraftctl pull
|
||||
. $SNAPCRAFT_PART_SRC/version.txt
|
||||
snapcraftctl set-version "$MAJOR.$MINOR.$BUILD.$PATCH"
|
||||
override-build: |
|
||||
set -eux
|
||||
snapcraftctl build
|
||||
|
||||
# Launcher script
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
||||
cp $SNAPCRAFT_PART_SRC/thorium.launcher $SNAPCRAFT_PART_INSTALL/bin/
|
||||
|
||||
# @@SNAPNAME@@ build artifacts (installed by stage_install_common)
|
||||
cp -R $SNAPCRAFT_PART_SRC/chrome/* $SNAPCRAFT_PART_INSTALL/
|
||||
|
||||
# Fix setuid bits on the sandbox executable
|
||||
# (ref: https://forum.snapcraft.io/t/call-for-testing-chromium-snap/1714/16)
|
||||
chmod 4555 $SNAPCRAFT_PART_INSTALL/opt/chromium.org/thorium/chrome-sandbox
|
||||
|
||||
# Custom desktop file
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
||||
sed \
|
||||
-e "s:Exec=/usr/bin/:Exec=@@SNAPNAME@@:g" \
|
||||
-e "s:Icon=@@PACKAGE@@:Icon=@@INSTALLDIR@@/product_logo_256.png:" \
|
||||
$SNAPCRAFT_PART_SRC/chrome/usr/share/applications/@@PACKAGE@@.desktop \
|
||||
> $SNAPCRAFT_PART_INSTALL/bin/@@SNAPNAME@@.desktop
|
||||
prime:
|
||||
- -etc/gss
|
||||
- -etc/init.d
|
||||
- -etc/sensors.d
|
||||
- -etc/ucf.conf
|
||||
- -etc/xdg
|
||||
- -usr/include
|
||||
- -usr/lib/tmpfiles.d
|
||||
- -usr/share/apport
|
||||
- -usr/share/bash-completion
|
||||
- -usr/share/bug
|
||||
- -usr/share/doc
|
||||
- -usr/share/doc-base
|
||||
- -usr/share/gettext
|
||||
- -usr/share/gnome-control-center
|
||||
- -usr/share/GConf
|
||||
- -usr/share/icons
|
||||
- -usr/share/lintian
|
||||
- -usr/share/man
|
||||
- -usr/share/pam-configs
|
||||
- -usr/share/pkgconfig
|
||||
- -usr/share/polkit-1
|
||||
- -usr/share/session-migration
|
||||
- -usr/share/sounds
|
||||
- -usr/share/ubuntu
|
||||
- -usr/share/ubuntu-wayland
|
||||
- -usr/share/upstart
|
||||
- -usr/share/zsh
|
||||
- -var
|
||||
|
||||
desktop-gtk3:
|
||||
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
||||
source-subdir: gtk
|
||||
plugin: make
|
||||
make-parameters: ["FLAVOR=gtk3"]
|
||||
build-packages:
|
||||
- build-essential
|
||||
- libgtk-3-dev
|
||||
stage-packages:
|
||||
- libxkbcommon0
|
||||
- ttf-ubuntu-font-family
|
||||
- shared-mime-info
|
||||
- libgtk-3-0
|
||||
- libgdk-pixbuf2.0-0
|
||||
- libglib2.0-bin
|
||||
- libgtk-3-bin
|
||||
- unity-gtk3-module
|
||||
- locales-all
|
||||
- xdg-user-dirs
|
||||
- ibus-gtk3
|
||||
- libibus-1.0-5
|
||||
- fcitx-frontend-gtk3
|
||||
prime:
|
||||
- -etc/gss
|
||||
- -etc/presage.xml
|
||||
- -etc/ucf.conf
|
||||
- -etc/X11
|
||||
- -usr/lib/glib-networking
|
||||
- -usr/lib/systemd
|
||||
- -usr/share/apport
|
||||
- -usr/share/bash-completion
|
||||
- -usr/share/doc
|
||||
- -usr/share/doc-base
|
||||
- -usr/share/gettext
|
||||
- -usr/share/GConf
|
||||
- -usr/share/icons
|
||||
- -usr/share/lintian
|
||||
- -usr/share/man
|
||||
- -usr/share/pkgconfig
|
||||
- -usr/share/presage
|
||||
- -usr/share/upstart
|
||||
- -var
|
||||
|
||||
shared-mime-info:
|
||||
after: [chromium]
|
||||
plugin: nil
|
||||
override-pull: ""
|
||||
override-prime: |
|
||||
set -eux
|
||||
glib-compile-schemas usr/share/glib-2.0/schemas
|
||||
update-mime-database usr/share/mime
|
||||
|
||||
# Install the keybindings themes (see https://launchpad.net/bugs/1849163)
|
||||
gtk-key-themes:
|
||||
plugin: nil
|
||||
stage-packages:
|
||||
- libgtk-3-common
|
||||
prime:
|
||||
- usr/share/themes/Default/
|
||||
- usr/share/themes/Emacs/
|
||||
|
||||
# Create a symlink xdg-email -> xdg-open, as the latter is perfectly able to
|
||||
# handle mailto: URLs (see https://launchpad.net/bugs/1849774).
|
||||
# xdg-open is a wrapper provided by the core snap.
|
||||
# TODO: remove once https://launchpad.net/bugs/1863625 is fixed.
|
||||
xdg-email:
|
||||
plugin: nil
|
||||
override-pull: ""
|
||||
override-prime: |
|
||||
set -eux
|
||||
mkdir -p usr/bin
|
||||
cd usr/bin
|
||||
ln -s /usr/bin/xdg-open xdg-email
|
|
@ -1,104 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Initially copied from
|
||||
# https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/launcher/chromium.launcher?h=stable
|
||||
|
||||
REALHOME=$(getent passwd $(id -u) | cut -d ':' -f 6)
|
||||
|
||||
# Move an existing profile directory over to $SNAP_USER_COMMON, which is shared
|
||||
# across revisions of the snap. This addresses profile corruption when the snap
|
||||
# is refreshed while running, until a proper solution is implemented in snapd.
|
||||
# Ref: https://launchpad.net/bugs/1616650
|
||||
if [ ! -d "$SNAP_USER_COMMON/@@SNAPNAME@@" ]; then
|
||||
if [ -d "$SNAP_USER_DATA/.config/@@SNAPNAME@@" ]; then
|
||||
mv "$SNAP_USER_DATA/.config/@@SNAPNAME@@" "$SNAP_USER_COMMON/"
|
||||
fi
|
||||
fi
|
||||
|
||||
# When running the snap for the first time, try and locate an existing
|
||||
# @@SNAPNAME@@ config in $HOME/.config/@@SNAPNAME@@, and import it if it was
|
||||
# created by an older version of @@SNAPNAME@@ (the profile data format is not
|
||||
# guaranteed to be forward-compatible). This requires the personal-files plug
|
||||
# to be connected.
|
||||
if [ ! -d "$SNAP_USER_COMMON/@@SNAPNAME@@" ]; then
|
||||
CHROME_CONFIG="$REALHOME/.config/@@SNAPNAME@@"
|
||||
if [ -d "$CHROME_CONFIG" ]; then
|
||||
PREF_FILE="$CHROME_CONFIG/Default/Preferences"
|
||||
if [ -r "$PREF_FILE" ]; then
|
||||
VERSION=$(sed -e 's/.*"last_chrome_version":"\([0-9\.]\+\)".*/\1/' \
|
||||
"$PREF_FILE")
|
||||
if [ ! -z "$VERSION" ]; then
|
||||
OLD=$(printf "$VERSION\n$SNAP_VERSION" | sort -V | head -1)
|
||||
if [ "$OLD" = "$VERSION" ]; then
|
||||
SIZE=$(du -sb $CHROME_CONFIG | cut -f 1)
|
||||
AVAILABLE_BLOCKS=$(stat -f -c %a $SNAP_USER_COMMON)
|
||||
BLOCK_SIZE=$(stat -f -c %s $SNAP_USER_COMMON)
|
||||
AVAILABLE_SIZE=$(($AVAILABLE_BLOCKS*$BLOCK_SIZE))
|
||||
if [ $AVAILABLE_SIZE -gt $SIZE ]; then
|
||||
printf "Importing existing @@SNAPNAME@@ profile from "
|
||||
printf "$CHROME_CONFIG (version $VERSION)\n"
|
||||
TS1=$(date +%s.%3N)
|
||||
cp -R "$CHROME_CONFIG" "$SNAP_USER_COMMON/"
|
||||
TS2=$(date +%s.%3N)
|
||||
T=$(printf "$TS1 $TS2" | awk '{printf "%.3f",$2-$1}')
|
||||
printf "Import done in $T s\n"
|
||||
else
|
||||
printf "Not importing existing @@SNAPNAME@@ profile from "
|
||||
printf "$CHROME_CONFIG (version $VERSION) because there is not "
|
||||
printf "enough available space in $SNAP_USER_COMMON "
|
||||
printf "(required: $SIZE bytes / available: $AVAILABLE_SIZE bytes)"
|
||||
printf "\n"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Specify that no encrypted password store (keyring) should be used when the
|
||||
# password-manager-service interface is not plugged, because @@SNAPNAME@@
|
||||
# won't fall back to the basic store (no encryption) if it fails to talk to
|
||||
# the default password store for the current desktop environment.
|
||||
# Ref: https://launchpad.net/bugs/1763829
|
||||
PASSWORD_STORE=basic
|
||||
if snapctl is-connected password-manager-service; then
|
||||
# An empty string means detect the store based on the current DE
|
||||
# (os_crypt::SelectBackend())
|
||||
PASSWORD_STORE=
|
||||
fi
|
||||
|
||||
# Allow @@SNAPNAME@@ to look for the flash player plugin inside the snap's
|
||||
# confinement. That .so file has to be extracted from the upstream flash
|
||||
# distribution (https://get.adobe.com/flashplayer/) and copied there.
|
||||
# Ref: https://launchpad.net/bugs/1771162
|
||||
FLASHSO=$SNAP_USER_DATA/.local/lib/libpepflashplayer.so
|
||||
if [ -e $FLASHSO ]; then
|
||||
FLASHVERSION=$(grep -a -z LNX $FLASHSO | cut -d ' ' -f 2 | sed -e "s/,/./g")
|
||||
FLASH_OPTS="--ppapi-flash-path=$FLASHSO --ppapi-flash-version=$FLASHVERSION"
|
||||
fi
|
||||
|
||||
WANT_TEMP_PROFILE=0
|
||||
for arg in "$@"; do
|
||||
shift
|
||||
if [ "$arg" = "--temp-profile" ]; then
|
||||
WANT_TEMP_PROFILE=1
|
||||
continue
|
||||
fi
|
||||
set -- "$@" "$arg"
|
||||
done
|
||||
|
||||
if [ $WANT_TEMP_PROFILE -eq 0 ] ; then
|
||||
exec "$SNAP/@@INSTALLDIR@@/@@PACKAGE@@" \
|
||||
--password-store=$PASSWORD_STORE \
|
||||
$FLASH_OPTS \
|
||||
"$@"
|
||||
else
|
||||
TEMP_PROFILE=$(mktemp -d)
|
||||
trap "rm -rf $TEMP_PROFILE" EXIT
|
||||
# we can't exec here as we need to clean-up the temporary profile
|
||||
"$SNAP/@@INSTALLDIR@@/@@PACKAGE@@" \
|
||||
--user-data-dir=$TEMP_PROFILE \
|
||||
--password-store=$PASSWORD_STORE \
|
||||
$FLASH_OPTS \
|
||||
"$@"
|
||||
fi
|
|
@ -30,12 +30,7 @@ BASE_FEATURE(kRefreshExpirationDate,
|
|||
|
||||
BASE_FEATURE(kDownloadsMigrateToJobsAPI,
|
||||
"DownloadsMigrateToJobsAPI",
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
);
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kDownloadNotificationServiceUnifiedAPI,
|
||||
"DownloadNotificationServiceUnifiedAPI",
|
||||
|
@ -79,8 +74,6 @@ BASE_FEATURE(kAllowFileBufferSizeControl,
|
|||
"AllowFileBufferSizeControl",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kDownloadRange, "DownloadRange", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
} // namespace features
|
||||
|
||||
} // namespace download
|
||||
|
|
|
@ -14,7 +14,6 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|||
registry->RegisterBooleanPref(
|
||||
prefs::kPrivacySandboxApisEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxM1ConsentDecisionMade,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxM1EEANoticeAcknowledged,
|
||||
|
@ -30,9 +29,6 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|||
false);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxM1Restricted, false);
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxManuallyControlledV2,
|
||||
false);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxPageViewed, false);
|
||||
registry->RegisterTimePref(prefs::kPrivacySandboxTopicsDataAccessibleSince,
|
||||
base::Time());
|
||||
registry->RegisterListPref(prefs::kPrivacySandboxBlockedTopics);
|
||||
|
|
|
@ -71,6 +71,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|||
static_cast<int>(TrackingProtectionLevel::kStandard),
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(prefs::kTrackingProtection3pcdEnabled, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kIpProtectionEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kEnableDoNotTrack, true,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
// When adding new engines, increment this number and use it as the new
|
||||
// max ID. This is used by UMA stats and must be updated to include the full
|
||||
// range or else not all engines will be counted in stats.
|
||||
"kMaxPrepopulatedEngineID": 112,
|
||||
"kMaxPrepopulatedEngineID": 113,
|
||||
|
||||
// Increment this if you change the data in ways that mean users with
|
||||
// existing data should get a new version. Otherwise, existing data may
|
||||
// continue to be used and updates made here will not always appear.
|
||||
// Also then run tools/search_engine_choice/generate_search_engine_icons.py.
|
||||
"kCurrentDataVersion": 146
|
||||
"kCurrentDataVersion": 147
|
||||
},
|
||||
|
||||
// The following engines are included in country lists and are added to the
|
||||
|
@ -119,6 +119,7 @@
|
|||
"favicon_url": "https://cdn.ecosia.org/assets/images/ico/favicon.ico",
|
||||
"search_url": "https://www.ecosia.org/search?q={searchTerms}&addon=opensearch",
|
||||
"suggest_url": "https://ac.ecosia.org/autocomplete?q={searchTerms}&type=list",
|
||||
"image_url": "https://www.ecosia.org/images?q={searchTerms}&addon=opensearch",
|
||||
"new_tab_url": "https://www.ecosia.org/newtab/",
|
||||
"type": "SEARCH_ENGINE_ECOSIA",
|
||||
"id": 101
|
||||
|
@ -167,7 +168,7 @@
|
|||
"keyword": "lilo.org",
|
||||
"favicon_url": "https://www.lilo.org/wp-content/themes/jarvis_wp/ajans/assets/favicon.ico",
|
||||
"search_url": "https://search.lilo.org/?q={searchTerms}",
|
||||
"suggest_url": "https://search.lilo.org/api/?service=suggestions&action=suggest&q={searchTerms}&f=chr",
|
||||
"suggest_url": "https://search.lilo.org/api/?service=suggestions&action=suggest&q={searchTerms}&f=chr&l={language}",
|
||||
"id": 111
|
||||
},
|
||||
|
||||
|
@ -219,7 +220,7 @@
|
|||
"keyword": "panda-search.org",
|
||||
"favicon_url": "https://panda-search.org/favicon.ico",
|
||||
"search_url": "https://panda-search.org/search/?q={searchTerms}",
|
||||
"suggest_url": "https://suggest.panda-search.org/suggest?rtag=pandaomn&rsrc=po&q={searchTerms}&fmt=cr",
|
||||
"suggest_url": "https://suggest.panda-search.org/suggest?q={searchTerms}",
|
||||
"type": "SEARCH_ENGINE_PANDASEARCH",
|
||||
"id": 104
|
||||
},
|
||||
|
@ -482,6 +483,16 @@
|
|||
"id": 2
|
||||
},
|
||||
|
||||
"yahoo_it": {
|
||||
"name": "Yahoo! Italia",
|
||||
"keyword": "it.yahoo.com",
|
||||
"favicon_url": "https://it.search.yahoo.com/favicon.ico",
|
||||
"search_url": "https://it.search.yahoo.com/search{google:pathWildcard}?ei={inputEncoding}&fr=crmas&p={searchTerms}",
|
||||
"suggest_url": "https://it.search.yahoo.com/sugg/chrome?output=fxjson&appid=crmas&command={searchTerms}",
|
||||
"type": "SEARCH_ENGINE_YAHOO",
|
||||
"id": 2
|
||||
},
|
||||
|
||||
"yahoo_jp": {
|
||||
"name": "Yahoo! JAPAN",
|
||||
"keyword": "yahoo.co.jp",
|
||||
|
@ -721,6 +732,16 @@
|
|||
"id": 106
|
||||
},
|
||||
|
||||
"you": {
|
||||
"name": "You.com",
|
||||
"keyword": "you.com",
|
||||
"favicon_url": "https://api.you.com/favicon.ico",
|
||||
"search_url": "https://you.com/search?tbm=youchat&q={searchTerms}",
|
||||
"suggest_url": "https://you.com/api/ac?domain=default&q={searchTerms}",
|
||||
"type": "SEARCH_ENGINE_YOU",
|
||||
"id": 112
|
||||
},
|
||||
|
||||
// UMA-only engines ////////////////////////////////////////////////////////
|
||||
|
||||
// The following engines are not included in any of the country lists. They
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <random>
|
||||
|
||||
#include "base/check_deref.h"
|
||||
#include "base/check_is_test.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/logging.h"
|
||||
|
@ -19,6 +20,7 @@
|
|||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/search_engines/prepopulated_engines.h"
|
||||
#include "components/search_engines/search_engine_choice/search_engine_choice_service.h"
|
||||
#include "components/search_engines/search_engine_choice_utils.h"
|
||||
#include "components/search_engines/search_engines_pref_names.h"
|
||||
#include "components/search_engines/template_url_data.h"
|
||||
|
@ -120,6 +122,7 @@ constexpr EngineAndTier engines_AT[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Australia
|
||||
|
@ -154,6 +157,8 @@ constexpr EngineAndTier engines_BE[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Bulgaria
|
||||
|
@ -170,6 +175,8 @@ constexpr EngineAndTier engines_BG[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Bahrain
|
||||
|
@ -305,6 +312,9 @@ constexpr EngineAndTier engines_CY[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Czech Republic
|
||||
|
@ -322,6 +332,8 @@ constexpr EngineAndTier engines_CZ[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Germany
|
||||
|
@ -344,6 +356,8 @@ constexpr EngineAndTier engines_DE[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &lilo},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Denmark
|
||||
|
@ -361,6 +375,8 @@ constexpr EngineAndTier engines_DK[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Dominican Republic
|
||||
|
@ -403,6 +419,9 @@ constexpr EngineAndTier engines_EE[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Egypt
|
||||
|
@ -431,6 +450,8 @@ constexpr EngineAndTier engines_ES[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &lilo},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Finland
|
||||
|
@ -448,6 +469,8 @@ constexpr EngineAndTier engines_FI[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Faroe Islands
|
||||
|
@ -477,6 +500,7 @@ constexpr EngineAndTier engines_FR[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// United Kingdom
|
||||
|
@ -504,6 +528,8 @@ constexpr EngineAndTier engines_GR[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Guatemala
|
||||
|
@ -549,6 +575,9 @@ constexpr EngineAndTier engines_HR[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Hungary
|
||||
|
@ -565,6 +594,8 @@ constexpr EngineAndTier engines_HU[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Indonesia
|
||||
|
@ -593,6 +624,7 @@ constexpr EngineAndTier engines_IE[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Israel
|
||||
|
@ -644,13 +676,16 @@ constexpr EngineAndTier engines_IS[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Italy
|
||||
constexpr EngineAndTier engines_IT[] = {
|
||||
{SearchEngineTier::kTopEngines, &google},
|
||||
{SearchEngineTier::kTopEngines, &bing},
|
||||
{SearchEngineTier::kTopEngines, &yahoo},
|
||||
{SearchEngineTier::kTopEngines, &yahoo_it},
|
||||
{SearchEngineTier::kTopEngines, &duckduckgo},
|
||||
{SearchEngineTier::kTopEngines, &yandex_com},
|
||||
{SearchEngineTier::kRemainingEngines, &qwant},
|
||||
|
@ -662,6 +697,8 @@ constexpr EngineAndTier engines_IT[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &lilo},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Jamaica
|
||||
|
@ -750,6 +787,8 @@ constexpr EngineAndTier engines_LI[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Lithuania
|
||||
|
@ -765,6 +804,9 @@ constexpr EngineAndTier engines_LT[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Luxembourg
|
||||
|
@ -781,6 +823,9 @@ constexpr EngineAndTier engines_LU[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &lilo},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Latvia
|
||||
|
@ -796,6 +841,9 @@ constexpr EngineAndTier engines_LV[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
|
||||
|
@ -868,6 +916,8 @@ constexpr EngineAndTier engines_MT[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Mexico
|
||||
|
@ -913,6 +963,8 @@ constexpr EngineAndTier engines_NL[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Norway
|
||||
|
@ -930,6 +982,8 @@ constexpr EngineAndTier engines_NO[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// New Zealand
|
||||
|
@ -1000,6 +1054,8 @@ constexpr EngineAndTier engines_PL[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Puerto Rico
|
||||
|
@ -1026,6 +1082,8 @@ constexpr EngineAndTier engines_PT[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &lilo},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
};
|
||||
|
||||
// Paraguay
|
||||
|
@ -1059,6 +1117,9 @@ constexpr EngineAndTier engines_RO[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Serbia
|
||||
|
@ -1111,6 +1172,9 @@ constexpr EngineAndTier engines_SE[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &info_com},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Singapore
|
||||
|
@ -1135,6 +1199,9 @@ constexpr EngineAndTier engines_SI[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &yep},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// Slovakia
|
||||
|
@ -1151,6 +1218,9 @@ constexpr EngineAndTier engines_SK[] = {
|
|||
{SearchEngineTier::kRemainingEngines, &seznam_sk},
|
||||
{SearchEngineTier::kRemainingEngines, &karma},
|
||||
{SearchEngineTier::kRemainingEngines, &privacywall},
|
||||
{SearchEngineTier::kRemainingEngines, &panda},
|
||||
{SearchEngineTier::kRemainingEngines, &you},
|
||||
{SearchEngineTier::kRemainingEngines, &oceanhero},
|
||||
};
|
||||
|
||||
// El Salvador
|
||||
|
@ -1667,20 +1737,30 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
|
|||
}
|
||||
}
|
||||
|
||||
uint64_t profile_seed = prefs->GetInt64(
|
||||
prefs::kDefaultSearchProviderChoiceScreenRandomShuffleSeed);
|
||||
int seed_version_number = prefs->GetInteger(
|
||||
prefs::kDefaultSearchProviderChoiceScreenShuffleMilestone);
|
||||
int current_version_number = version_info::GetMajorVersionNumberAsInt();
|
||||
// Ensure that the generated seed is not 0 to avoid accidental re-seeding and
|
||||
// re-shuffle on every chrome update.
|
||||
while (profile_seed == 0 || current_version_number != seed_version_number) {
|
||||
profile_seed = base::RandUint64();
|
||||
prefs->SetInt64(prefs::kDefaultSearchProviderChoiceScreenRandomShuffleSeed,
|
||||
profile_seed);
|
||||
prefs->SetInteger(prefs::kDefaultSearchProviderChoiceScreenShuffleMilestone,
|
||||
current_version_number);
|
||||
seed_version_number = current_version_number;
|
||||
uint64_t profile_seed;
|
||||
if (prefs) {
|
||||
profile_seed = prefs->GetInt64(
|
||||
prefs::kDefaultSearchProviderChoiceScreenRandomShuffleSeed);
|
||||
int seed_version_number = prefs->GetInteger(
|
||||
prefs::kDefaultSearchProviderChoiceScreenShuffleMilestone);
|
||||
int current_version_number = version_info::GetMajorVersionNumberAsInt();
|
||||
// Ensure that the generated seed is not 0 to avoid accidental re-seeding
|
||||
// and re-shuffle on every chrome update.
|
||||
while (profile_seed == 0 || current_version_number != seed_version_number) {
|
||||
profile_seed = base::RandUint64();
|
||||
prefs->SetInt64(
|
||||
prefs::kDefaultSearchProviderChoiceScreenRandomShuffleSeed,
|
||||
profile_seed);
|
||||
prefs->SetInteger(
|
||||
prefs::kDefaultSearchProviderChoiceScreenShuffleMilestone,
|
||||
current_version_number);
|
||||
seed_version_number = current_version_number;
|
||||
}
|
||||
} else {
|
||||
// TODO(crbug.com/1499181): Avoid passing null prefs and unbranch the code.
|
||||
CHECK_IS_TEST();
|
||||
// Choosing a fixed magic number to ensure a stable shuffle in tests too.
|
||||
profile_seed = 42;
|
||||
}
|
||||
|
||||
// Randomize all vectors using the generated seed.
|
||||
|
@ -1811,6 +1891,7 @@ int GetDataVersion(PrefService* prefs) {
|
|||
|
||||
std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
||||
PrefService* prefs,
|
||||
search_engines::SearchEngineChoiceService* search_engine_choice_service,
|
||||
size_t* default_search_provider_index,
|
||||
bool include_current_default,
|
||||
TemplateURLService* template_url_service) {
|
||||
|
@ -1819,8 +1900,13 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
|||
std::vector<std::unique_ptr<TemplateURLData>> t_urls =
|
||||
GetOverriddenTemplateURLData(prefs);
|
||||
if (t_urls.empty()) {
|
||||
t_urls = GetPrepopulatedTemplateURLData(
|
||||
search_engines::GetSearchEngineChoiceCountryId(prefs), prefs);
|
||||
// `search_engine_choice_service` (and `prefs`) can be null in tests.
|
||||
// TODO(b/318801987): Make sure `prefs` and `search_engine_choice_service`
|
||||
// are always not null.
|
||||
int country_id = search_engine_choice_service
|
||||
? search_engine_choice_service->GetCountryId()
|
||||
: country_codes::GetCurrentCountryID();
|
||||
t_urls = GetPrepopulatedTemplateURLData(country_id, prefs);
|
||||
|
||||
if (include_current_default && template_url_service) {
|
||||
CHECK(search_engines::IsChoiceScreenFlagEnabled(
|
||||
|
@ -1829,6 +1915,7 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
|||
// returned list if it's not already there.
|
||||
const TemplateURL* default_search_engine =
|
||||
template_url_service->GetDefaultSearchProvider();
|
||||
bool inserted_default = false;
|
||||
if (default_search_engine &&
|
||||
!base::Contains(t_urls, default_search_engine->prepopulate_id(),
|
||||
[](const std::unique_ptr<TemplateURLData>& engine) {
|
||||
|
@ -1836,7 +1923,9 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
|||
})) {
|
||||
t_urls.insert(t_urls.begin(), std::make_unique<TemplateURLData>(
|
||||
default_search_engine->data()));
|
||||
inserted_default = true;
|
||||
}
|
||||
search_engines::RecordIsDefaultProviderAddedToChoices(inserted_default);
|
||||
}
|
||||
}
|
||||
if (default_search_provider_index) {
|
||||
|
@ -1848,10 +1937,12 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
|||
return t_urls;
|
||||
}
|
||||
|
||||
std::unique_ptr<TemplateURLData> GetPrepopulatedEngine(PrefService* prefs,
|
||||
int prepopulated_id) {
|
||||
auto engines =
|
||||
TemplateURLPrepopulateData::GetPrepopulatedEngines(prefs, nullptr);
|
||||
std::unique_ptr<TemplateURLData> GetPrepopulatedEngine(
|
||||
PrefService* prefs,
|
||||
search_engines::SearchEngineChoiceService* search_engine_choice_service,
|
||||
int prepopulated_id) {
|
||||
auto engines = TemplateURLPrepopulateData::GetPrepopulatedEngines(
|
||||
prefs, search_engine_choice_service, nullptr);
|
||||
for (auto& engine : engines) {
|
||||
if (engine->prepopulate_id == prepopulated_id)
|
||||
return std::move(engine);
|
||||
|
@ -1862,16 +1953,15 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedEngine(PrefService* prefs,
|
|||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
std::vector<std::unique_ptr<TemplateURLData>> GetLocalPrepopulatedEngines(
|
||||
const std::string& locale) {
|
||||
int country_id = country_codes::CountryStringToCountryID(locale);
|
||||
const std::string& country_code,
|
||||
PrefService& prefs) {
|
||||
int country_id = country_codes::CountryStringToCountryID(country_code);
|
||||
if (country_id == country_codes::kCountryIDUnknown) {
|
||||
LOG(ERROR) << "Unknown country code specified: " << locale;
|
||||
LOG(ERROR) << "Unknown country code specified: " << country_code;
|
||||
return std::vector<std::unique_ptr<TemplateURLData>>();
|
||||
}
|
||||
|
||||
// TODO(b/303632061): Pass the correct PrefService to this method to fetch the
|
||||
// search engines for Android.
|
||||
return GetPrepopulatedTemplateURLData(country_id, nullptr);
|
||||
return GetPrepopulatedTemplateURLData(country_id, &prefs);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1883,6 +1973,7 @@ std::vector<const PrepopulatedEngine*> GetAllPrepopulatedEngines() {
|
|||
|
||||
std::unique_ptr<TemplateURLData> GetPrepopulatedEngineFromFullList(
|
||||
PrefService* prefs,
|
||||
search_engines::SearchEngineChoiceService* search_engine_choice_service,
|
||||
int prepopulated_id) {
|
||||
// TODO(crbug.com/1500526): Refactor to better share code with
|
||||
// `GetPrepopulatedEngine()`.
|
||||
|
@ -1899,7 +1990,7 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedEngineFromFullList(
|
|||
// We look in the profile country's prepopulated set first. This is intended
|
||||
// to help using the right entry for the case where we have multiple ones in
|
||||
// the full list that share a same prepopulated id.
|
||||
const int country = search_engines::GetSearchEngineChoiceCountryId(prefs);
|
||||
const int country = search_engine_choice_service->GetCountryId();
|
||||
for (const EngineAndTier& engine_and_tier :
|
||||
GetPrepopulationSetFromCountryID(country)) {
|
||||
if (engine_and_tier.search_engine->id == prepopulated_id) {
|
||||
|
@ -1931,11 +2022,13 @@ void ClearPrepopulatedEnginesInPrefs(PrefService* prefs) {
|
|||
}
|
||||
|
||||
std::unique_ptr<TemplateURLData> GetPrepopulatedDefaultSearch(
|
||||
PrefService* prefs) {
|
||||
PrefService* prefs,
|
||||
search_engines::SearchEngineChoiceService* search_engine_choice_service) {
|
||||
size_t default_search_index;
|
||||
// This could be more efficient. We load all URLs but keep only the default.
|
||||
std::vector<std::unique_ptr<TemplateURLData>> loaded_urls =
|
||||
GetPrepopulatedEngines(prefs, &default_search_index);
|
||||
GetPrepopulatedEngines(prefs, search_engine_choice_service,
|
||||
&default_search_index);
|
||||
|
||||
return (default_search_index < loaded_urls.size())
|
||||
? std::move(loaded_urls[default_search_index])
|
||||
|
|
Loading…
Reference in a new issue