Merge pull request #6042 from brave/cr85

Upgrade from Chromium 84 to Chromium 85
This commit is contained in:
Max
2020-08-07 14:27:23 -04:00
committed by GitHub
434 changed files with 3465 additions and 1919 deletions
+1
View File
@@ -122,6 +122,7 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/signin/BraveSigninManager.java",
"../../brave/android/java/org/chromium/chrome/browser/site_settings/DesktopModePreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/site_settings/PlayYTVideoInBrowserPreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/sync/BraveAndroidSyncSettings.java",
"../../brave/android/java/org/chromium/chrome/browser/sync/settings/BraveManageSyncSettings.java",
"../../brave/android/java/org/chromium/chrome/browser/toolbar/BraveHomeButton.java",
"../../brave/android/java/org/chromium/chrome/browser/toolbar/bottom/BookmarksButton.java",
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.browser.feed.action.FeedActionHandler;
import org.chromium.chrome.browser.feed.library.api.host.action.ActionApi;
import org.chromium.chrome.browser.feed.shared.FeedSurfaceDelegate;
import org.chromium.chrome.browser.native_page.NativePageNavigationDelegate;
@@ -24,6 +25,7 @@ import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
import org.chromium.chrome.feed.R;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.ui.UiUtils;
public class BraveFeedSurfaceCoordinator extends FeedSurfaceCoordinator {
@@ -35,12 +37,13 @@ public class BraveFeedSurfaceCoordinator extends FeedSurfaceCoordinator {
public BraveFeedSurfaceCoordinator(Activity activity, SnackbarManager snackbarManager,
TabModelSelector tabModelSelector, Supplier<Tab> tabProvider,
@Nullable SnapScrollHelper snapScrollHelper, @Nullable View ntpHeader,
@Nullable SectionHeaderView sectionHeaderView, ActionApi actionApi,
@Nullable SectionHeaderView sectionHeaderView, FeedActionHandler.Options actionOptions,
boolean showDarkBackground, FeedSurfaceDelegate delegate,
@Nullable NativePageNavigationDelegate pageNavigationDelegate, Profile profile) {
@Nullable NativePageNavigationDelegate pageNavigationDelegate, Profile profile,
boolean isPlaceholderShown, BottomSheetController bottomSheetController) {
super(activity, snackbarManager, tabModelSelector, tabProvider, snapScrollHelper, ntpHeader,
sectionHeaderView, actionApi, showDarkBackground, delegate, pageNavigationDelegate,
profile);
sectionHeaderView, actionOptions, showDarkBackground, delegate,
pageNavigationDelegate, profile, isPlaceholderShown, bottomSheetController);
}
@Override
+1 -1
View File
@@ -8,7 +8,7 @@
# needed for checking of existence for bytecode manipulation
-keepnames class org.chromium.chrome.browser.settings.MainSettings
-keep class org.chromium.components.sync.AndroidSyncSettings {
-keep class org.chromium.chrome.browser.sync.AndroidSyncSettings {
*** notifyObservers(...);
*** updateCachedSettings(...);
*** setChromeSyncEnabled(...);
@@ -1085,7 +1085,7 @@ public class BraveRewardsPanelPopup implements BraveRewardsObserver, BraveReward
@Override
public void OnWalletInitialized(int error_code) {
if (BraveRewardsNativeWorker.WALLET_CREATED == error_code) {
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
ShowWebSiteView(false);
} else if (BraveRewardsNativeWorker.SAFETYNET_ATTESTATION_FAILED == error_code) {
dismiss();
@@ -37,13 +37,18 @@ public class BraveExternalNavigationHandler extends ExternalNavigationHandler {
mBraveUphold.CompleteUpholdVerification(params, this);
}
/**
* This function will be removed by ASM byte-code patching tool
* and redirected to ExternalNavigationHandler.
*/
public @OverrideUrlLoadingResult int clobberCurrentTabWithFallbackUrl(
String browserFallbackUrl, ExternalNavigationParams params) {
assert false;
return OverrideUrlLoadingResult.OVERRIDE_WITH_CLOBBERING_TAB;
// Below is an actual code that was used prior to deletion of
// clobberCurrentTabWithFallbackUrl introduced here
// https://chromium.googlesource.com/chromium/src/+/37b5b744bc83f630d3121b46868818bb4e848c2a
if (!params.isMainFrame()) {
return OverrideUrlLoadingResult.NO_OVERRIDE;
}
if (params.getRedirectHandler() != null) {
params.getRedirectHandler().setShouldNotOverrideUrlLoadingOnCurrentRedirectChain();
}
return clobberCurrentTab(browserFallbackUrl, params.getReferrerUrl());
}
}
@@ -32,7 +32,7 @@ public class BraveThemePreferences extends ThemeSettingsFragment {
SettingsUtils.addPreferencesFromResource(this, R.xml.brave_theme_preferences);
getActivity().setTitle(getResources().getString(R.string.theme_settings));
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
NTPBackgroundImagesBridge mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
if (!NTPBackgroundImagesBridge.enableSponsoredImages()
|| (mNTPBackgroundImagesBridge != null
@@ -18,12 +18,13 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.NotificationCompat;
import androidx.core.app.NotificationCompat;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.components.embedder_support.util.UrlConstants;
@@ -10,17 +10,18 @@ import android.app.Activity;
import androidx.annotation.Nullable;
import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior;
import org.chromium.chrome.browser.feed.BraveFeedSurfaceCoordinator;
import org.chromium.chrome.browser.feed.FeedProcessScopeFactory;
import org.chromium.chrome.browser.feed.shared.FeedSurfaceProvider;
import org.chromium.chrome.browser.fullscreen.BrowserControlsStateProvider;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
import org.chromium.chrome.browser.ui.native_page.NativePageHost;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
public class BraveNewTabPage extends NewTabPage {
private NewTabPageLayout mNewTabPageLayout;
@@ -31,10 +32,11 @@ public class BraveNewTabPage extends NewTabPage {
Supplier<Tab> activityTabProvider, @Nullable OverviewModeBehavior overviewModeBehavior,
SnackbarManager snackbarManager, ActivityLifecycleDispatcher lifecycleDispatcher,
TabModelSelector tabModelSelector, boolean isTablet, NewTabPageUma uma,
boolean isInNightMode, NativePageHost nativePageHost, Tab tab) {
boolean isInNightMode, NativePageHost nativePageHost, Tab tab,
BottomSheetController bottomSheetController) {
super(activity, browserControlsStateProvider, activityTabProvider, overviewModeBehavior,
snackbarManager, lifecycleDispatcher, tabModelSelector, isTablet, uma,
isInNightMode, nativePageHost, tab);
isInNightMode, nativePageHost, tab, bottomSheetController);
assert mNewTabPageLayout instanceof BraveNewTabPageLayout;
if (mNewTabPageLayout instanceof BraveNewTabPageLayout) {
@@ -45,17 +47,17 @@ public class BraveNewTabPage extends NewTabPage {
@Override
protected void initializeMainView(Activity activity, Supplier<Tab> tabProvider,
SnackbarManager snackbarManager, TabModelSelector tabModelSelector, NewTabPageUma uma,
boolean isInNightMode) {
super.initializeMainView(
activity, tabProvider, snackbarManager, tabModelSelector, uma, isInNightMode);
boolean isInNightMode, BottomSheetController bottomSheetController) {
super.initializeMainView(activity, tabProvider, snackbarManager, tabModelSelector, uma,
isInNightMode, bottomSheetController);
// Override surface provider
Profile profile = Profile.fromWebContents(mTab.getWebContents());
assert !FeedProcessScopeFactory.isFeedProcessEnabled();
mFeedSurfaceProvider =
new BraveFeedSurfaceCoordinator(activity, snackbarManager, tabModelSelector,
tabProvider, new SnapScrollHelper(mNewTabPageManager, mNewTabPageLayout),
mNewTabPageLayout, null, null, isInNightMode, this,
mNewTabPageManager.getNavigationDelegate(), profile);
mFeedSurfaceProvider = new BraveFeedSurfaceCoordinator(activity, snackbarManager,
tabModelSelector, tabProvider,
new SnapScrollHelper(mNewTabPageManager, mNewTabPageLayout), mNewTabPageLayout,
null, null, isInNightMode, this, mNewTabPageManager.getNavigationDelegate(),
profile, false, bottomSheetController);
}
}
@@ -206,7 +206,7 @@ public class RewardsBottomSheetDialogFragment extends BottomSheetDialogFragment
}
private void turnOnAds() {
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
}
private void reloadTab() {
@@ -54,7 +54,7 @@ public class SuperReferralShareDialogFragment extends DialogFragment implements
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
return inflater.inflate(R.layout.fragment_super_referral_share, container);
}
@@ -72,7 +72,7 @@ public class NTPUtil {
new HashMap<String, SoftReference<Bitmap>>();
public static void turnOnAds() {
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
}
public static void updateOrientedUI(Context context, ViewGroup view) {
@@ -151,11 +151,11 @@ public class NTPUtil {
if (sponsoredTab.shouldShowBanner()) {
if (BravePrefServiceBridge.getInstance().getBoolean(BravePref.BRAVE_REWARDS_ENABLED)) {
if (BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())) {
if (BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())) {
if (ntpImage instanceof Wallpaper) {
return SponsoredImageUtil.BR_ON_ADS_ON;
}
} else if (BraveAdsNativeHelper.nativeIsLocaleValid(Profile.getLastUsedProfile())) {
} else if (BraveAdsNativeHelper.nativeIsLocaleValid(Profile.getLastUsedRegularProfile())) {
if (ntpImage instanceof Wallpaper) {
return SponsoredImageUtil.BR_ON_ADS_OFF ;
} else {
@@ -451,7 +451,7 @@ public class NTPUtil {
}
public static boolean isReferralEnabled() {
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
NTPBackgroundImagesBridge mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
boolean isReferralEnabled = BravePrefServiceBridge.getInstance().getInteger(BravePref.NTP_SHOW_SUPER_REFERRAL_THEMES_OPTION) == 1 ? true : false;
return mNTPBackgroundImagesBridge.isSuperReferral() && isReferralEnabled;
@@ -13,20 +13,24 @@ import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestion;
import org.chromium.chrome.browser.omnibox.suggestions.UrlBarDelegate;
import org.chromium.chrome.browser.omnibox.suggestions.basic.SuggestionHost;
import org.chromium.chrome.browser.share.ShareDelegate;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.ui.favicon.LargeIconBridge;
public class BraveEditUrlSuggestionProcessor extends EditUrlSuggestionProcessor {
private boolean mHasClearedOmniboxForFocus;
public BraveEditUrlSuggestionProcessor(Context context, SuggestionHost suggestionHost,
UrlBarDelegate locationBarDelegate, Supplier<LargeIconBridge> iconBridgeSupplier) {
super(context, suggestionHost, locationBarDelegate, iconBridgeSupplier);
UrlBarDelegate locationBarDelegate, Supplier<LargeIconBridge> iconBridgeSupplier,
Supplier<Tab> tabSupplier, Supplier<ShareDelegate> shareDelegateSupplier) {
super(context, suggestionHost, locationBarDelegate, iconBridgeSupplier, tabSupplier,
shareDelegateSupplier);
}
@Override
public boolean doesProcessSuggestion(OmniboxSuggestion suggestion) {
public boolean doesProcessSuggestion(OmniboxSuggestion suggestion, int position) {
// We don't want to clear omnibox for focus, so just pretend that it's already happened
mHasClearedOmniboxForFocus = true;
return super.doesProcessSuggestion(suggestion);
return super.doesProcessSuggestion(suggestion, position);
}
}
@@ -68,7 +68,7 @@ public class BraveRewardsService extends Service implements BraveRewardsObserver
if (BraveRewardsNativeWorker.WALLET_CREATED == error_code
&& OnboardingPrefManager.getInstance().isAdsAvailable()) {
// Enable ads
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
} else {
// TODO: handle wallet creation problem
}
@@ -177,13 +177,13 @@ public class OnboardingPrefManager {
public boolean showOnboardingForSkip() {
boolean shouldShow = !hasOnboardingShownForSkip()
&& (ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS) && !BravePrefServiceBridge.getInstance().getBoolean(BravePref.BRAVE_REWARDS_ENABLED))
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())
&& (getNextOnboardingDate() > 0 && System.currentTimeMillis() > getNextOnboardingDate());
return shouldShow;
}
public boolean isAdsAvailable() {
return BraveAdsNativeHelper.nativeIsSupportedLocale(Profile.getLastUsedProfile());
return BraveAdsNativeHelper.nativeIsSupportedLocale(Profile.getLastUsedRegularProfile());
}
public void showOnboarding(Context context) {
@@ -127,7 +127,7 @@ public class BravePrefServiceBridge {
* @param preference The name of the preference.
* @return Whether the specified preference is enabled.
*/
public boolean getBoolean(@Pref int preference) {
public boolean getBoolean(int preference) {
return BravePrefServiceBridgeJni.get().getBoolean(preference);
}
@@ -135,7 +135,7 @@ public class BravePrefServiceBridge {
* @param preference The name of the preference.
* @param value The value the specified preference will be set to.
*/
public void setBoolean(@Pref int preference, boolean value) {
public void setBoolean(int preference, boolean value) {
BravePrefServiceBridgeJni.get().setBoolean(preference, value);
}
@@ -143,7 +143,7 @@ public class BravePrefServiceBridge {
* @param preference The name of the preference.
* @return value The value of the specified preference.
*/
public int getInteger(@Pref int preference) {
public int getInteger(int preference) {
return BravePrefServiceBridgeJni.get().getInteger(preference);
}
@@ -151,7 +151,7 @@ public class BravePrefServiceBridge {
* @param preference The name of the preference.
* @param value The value the specified preference will be set to.
*/
public void setInteger(@Pref int preference, int value) {
public void setInteger(int preference, int value) {
BravePrefServiceBridgeJni.get().setInteger(preference, value);
}
@@ -160,7 +160,7 @@ public class BravePrefServiceBridge {
* @return value The value of the specified preference.
*/
@NonNull
public String getString(@Pref int preference) {
public String getString(int preference) {
return BravePrefServiceBridgeJni.get().getString(preference);
}
@@ -168,7 +168,7 @@ public class BravePrefServiceBridge {
* @param preference The name of the preference.
* @param value The value the specified preference will be set to.
*/
public void setString(@Pref int preference, @NonNull String value) {
public void setString(int preference, @NonNull String value) {
BravePrefServiceBridgeJni.get().setString(preference, value);
}
@@ -67,7 +67,7 @@ public class RateFeedbackUtils {
String appVersion = AboutChromeSettings.getApplicationVersion(context, AboutSettingsBridge.getApplicationVersion());
StringBuilder sb = new StringBuilder();
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
NTPBackgroundImagesBridge mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
HttpURLConnection urlConnection = null;
@@ -22,7 +22,6 @@ import android.graphics.Color;
import android.hardware.Camera;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.text.Editable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -53,6 +52,7 @@ import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.app.ActivityCompat;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
@@ -28,7 +28,7 @@ public class BraveRadioButtonGroupCustomHomepageThemePreference extends RadioBut
public BraveRadioButtonGroupCustomHomepageThemePreference(Context context, AttributeSet attrs) {
super(context, attrs);
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
}
@@ -58,7 +58,7 @@ public class BraveShieldsUtils {
Context context = ContextUtils.getApplicationContext();
StringBuilder sb = new StringBuilder();
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
NTPBackgroundImagesBridge mNTPBackgroundImagesBridge = NTPBackgroundImagesBridge.getInstance(mProfile);
HttpURLConnection urlConnection = null;
@@ -7,10 +7,10 @@ package org.chromium.chrome.browser.signin;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
import org.chromium.chrome.browser.sync.AndroidSyncSettings;
import org.chromium.components.signin.AccountTrackerService;
import org.chromium.components.signin.identitymanager.IdentityManager;
import org.chromium.components.signin.identitymanager.IdentityMutator;
import org.chromium.components.sync.AndroidSyncSettings;
public class BraveSigninManager extends SigninManager {
BraveSigninManager(long nativeSigninManagerAndroid, AccountTrackerService accountTrackerService,
@@ -3,7 +3,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.chromium.components.sync;
package org.chromium.chrome.browser.sync;
import org.chromium.components.sync.SyncContentResolverDelegate;
// see org.brave.bytecode.BraveAndroidSyncSettingsAdapter
public class BraveAndroidSyncSettings extends AndroidSyncSettings {
@@ -50,6 +50,6 @@ public class BraveTabCreator extends ChromeTabCreator {
}
private void registerPageView() {
NTPBackgroundImagesBridge.getInstance(Profile.getLastUsedProfile()).registerPageView();
NTPBackgroundImagesBridge.getInstance(Profile.getLastUsedRegularProfile()).registerPageView();
}
}
@@ -8,9 +8,10 @@
package org.chromium.chrome.browser.toolbar;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import androidx.core.content.ContextCompat;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.homepage.HomepageManager;
import org.chromium.chrome.browser.tab.Tab;
@@ -6,10 +6,10 @@ package org.chromium.chrome.browser.toolbar.bottom;
import android.content.Context;
import android.content.res.ColorStateList;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.content.ContextCompat;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
@@ -47,10 +47,13 @@ public class BraveBottomToolbarCoordinator
BraveBottomToolbarCoordinator(ViewStub stub, ActivityTabProvider tabProvider,
OnLongClickListener tabsSwitcherLongClickListner, ThemeColorProvider themeColorProvider,
ObservableSupplier<ShareDelegate> shareDelegateSupplier, Supplier<Boolean> showStartSurfaceCallable,
Runnable openHomepageAction, Callback<Integer> setUrlBarFocusAction) {
super(stub, tabProvider, tabsSwitcherLongClickListner, themeColorProvider, shareDelegateSupplier,
showStartSurfaceCallable, openHomepageAction, setUrlBarFocusAction);
ObservableSupplier<ShareDelegate> shareDelegateSupplier,
Supplier<Boolean> showStartSurfaceCallable, Runnable openHomepageAction,
Callback<Integer> setUrlBarFocusAction,
ObservableSupplier<OverviewModeBehavior> overviewModeBehaviorSupplier) {
super(stub, tabProvider, tabsSwitcherLongClickListner, themeColorProvider,
shareDelegateSupplier, showStartSurfaceCallable, openHomepageAction,
setUrlBarFocusAction, overviewModeBehaviorSupplier);
mBraveTabProvider = tabProvider;
mOriginalHomeButtonRunnable = openHomepageAction;
}
@@ -82,11 +85,11 @@ public class BraveBottomToolbarCoordinator
}
@Override
void initializeWithNative(OnClickListener tabSwitcherListener, OnClickListener newTabClickListener,
AppMenuButtonHelper menuButtonHelper, OverviewModeBehavior overviewModeBehavior,
TabCountProvider tabCountProvider, IncognitoStateProvider incognitoStateProvider, ViewGroup topToolbarRoot,
Runnable closeAllTabsAction) {
super.initializeWithNative(tabSwitcherListener, newTabClickListener, menuButtonHelper, overviewModeBehavior,
void initializeWithNative(OnClickListener tabSwitcherListener,
OnClickListener newTabClickListener, AppMenuButtonHelper menuButtonHelper,
TabCountProvider tabCountProvider, IncognitoStateProvider incognitoStateProvider,
ViewGroup topToolbarRoot, Runnable closeAllTabsAction) {
super.initializeWithNative(tabSwitcherListener, newTabClickListener, menuButtonHelper,
tabCountProvider, incognitoStateProvider, topToolbarRoot, closeAllTabsAction);
View root = (View) topToolbarRoot.getParent();
@@ -124,9 +127,11 @@ public class BraveBottomToolbarCoordinator
mNewTabButton.setOnLongClickListener(this);
}
if (mOverviewModeBehavior != null && mOverviewModeObserver != null) {
// We create new observer here so remove previous
mOverviewModeBehavior.removeOverviewModeObserver(mOverviewModeObserver);
if (mOverviewModeObserver != null) {
if (mOverviewModeBehavior != null) {
// We create new observer here so remove previous
mOverviewModeBehavior.removeOverviewModeObserver(mOverviewModeObserver);
}
mOverviewModeObserver = new EmptyOverviewModeObserver() {
@Override
public void onOverviewModeStartedShowing(boolean showToolbar) {
@@ -35,9 +35,11 @@ public class BraveBrowsingModeBottomToolbarCoordinator
BraveBrowsingModeBottomToolbarCoordinator(View root, ActivityTabProvider tabProvider,
OnClickListener homeButtonListener, OnClickListener searchAcceleratorListener,
ObservableSupplier<OnClickListener> shareButtonListenerSupplier,
OnLongClickListener tabSwitcherLongClickListener) {
OnLongClickListener tabSwitcherLongClickListener,
ObservableSupplier<OverviewModeBehavior> overviewModeBehaviorSupplier) {
super(root, tabProvider, homeButtonListener, searchAcceleratorListener,
shareButtonListenerSupplier, tabSwitcherLongClickListener);
shareButtonListenerSupplier, tabSwitcherLongClickListener,
overviewModeBehaviorSupplier);
mBraveTabProvider = tabProvider;
mBraveToolbarRoot = root.findViewById(R.id.bottom_toolbar_browsing);
mBraveNewTabButton = mBraveToolbarRoot.findViewById(R.id.bottom_new_tab_button);
@@ -63,13 +65,12 @@ public class BraveBrowsingModeBottomToolbarCoordinator
}
@Override
public void initializeWithNative(OnClickListener newTabListener, OnClickListener tabSwitcherListener,
AppMenuButtonHelper menuButtonHelper, TabCountProvider tabCountProvider,
ThemeColorProvider themeColorProvider, IncognitoStateProvider incognitoStateProvider,
OverviewModeBehavior overviewModeBehavior) {
super.initializeWithNative(newTabListener, tabSwitcherListener,
menuButtonHelper, tabCountProvider, themeColorProvider,
incognitoStateProvider, overviewModeBehavior);
public void initializeWithNative(OnClickListener newTabListener,
OnClickListener tabSwitcherListener, AppMenuButtonHelper menuButtonHelper,
TabCountProvider tabCountProvider, ThemeColorProvider themeColorProvider,
IncognitoStateProvider incognitoStateProvider) {
super.initializeWithNative(newTabListener, tabSwitcherListener, menuButtonHelper,
tabCountProvider, themeColorProvider, incognitoStateProvider);
mBookmarkButton.setThemeColorProvider(themeColorProvider);
mMenuButton.setAppMenuButtonHelper(menuButtonHelper);
@@ -218,8 +218,8 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
// shown and loading state is changed.
updateBraveShieldsButtonState(null);
if (this instanceof ToolbarPhone) {
if (getMenuButtonWrapper() != null && BottomToolbarVariationManager.isMenuButtonOnBottom()) {
getMenuButtonWrapper().setVisibility(View.GONE);
if (super.getMenuButtonWrapper() != null && BottomToolbarVariationManager.isMenuButtonOnBottom()) {
super.getMenuButtonWrapper().setVisibility(View.GONE);
}
}
}
@@ -276,7 +276,7 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
mBraveShieldsHandler.updateHost(url);
updateBraveShieldsButtonState(tab);
Profile mProfile = Profile.getLastUsedProfile();
Profile mProfile = Profile.getLastUsedRegularProfile();
long trackersBlockedCount = BravePrefServiceBridge.getInstance().getTrackersBlockedCount(mProfile);
long adsBlockedCount = BravePrefServiceBridge.getInstance().getAdsBlockedCount(mProfile);
long dataSaved = BravePrefServiceBridge.getInstance().getDataSaved(mProfile);
@@ -401,7 +401,7 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
} else if (mBraveRewardsButton == v && mBraveRewardsButton != null) {
Context context = getContext();
if ((PackageUtils.isFirstInstall(context)
|| (!PackageUtils.isFirstInstall(context) && !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())))
|| (!PackageUtils.isFirstInstall(context) && !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())))
&& !OnboardingPrefManager.getInstance().isOnboardingShown()) {
OnboardingPrefManager.getInstance().showOnboarding(context);
} else {
@@ -625,7 +625,7 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
}
} else if (error_code == BraveRewardsNativeWorker.WALLET_CREATED) { // Wallet created code
// Make sure that flag is set as panel can be closed before wallet is created
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
// Check and set flag to show Brave Rewards icon if enabled
SharedPreferences sharedPreferences = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor sharedPreferencesEditor = sharedPreferences.edit();
@@ -830,20 +830,10 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
}
}
@Override
boolean isShowingAppMenuUpdateBadge() {
if (this instanceof ToolbarPhone &&
BottomToolbarVariationManager.isMenuButtonOnBottom()) {
// Just to avoid drawing menu button on transition animation
return true;
}
return super.isShowingAppMenuUpdateBadge();
}
@Override
public void onBottomToolbarVisibilityChanged(boolean isVisible) {
if (this instanceof ToolbarPhone && getMenuButtonWrapper() != null) {
getMenuButtonWrapper().setVisibility(isVisible ? View.GONE : View.VISIBLE);
if (this instanceof ToolbarPhone && super.getMenuButtonWrapper() != null) {
super.getMenuButtonWrapper().setVisibility(isVisible ? View.GONE : View.VISIBLE);
}
}
@@ -860,4 +850,12 @@ public abstract class BraveToolbarLayout extends ToolbarLayout implements OnClic
}
updateModernLocationBarColor(mCurrentToolbarColor);
}
@Override
View getMenuButtonWrapper() {
if (this instanceof ToolbarPhone && BottomToolbarVariationManager.isMenuButtonOnBottom()) {
return null;
}
return super.getMenuButtonWrapper();
}
}
@@ -13,16 +13,17 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.view.View;
import androidx.core.app.NotificationCompat;
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.preferences.BravePreferenceKeys;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
@@ -77,7 +77,7 @@ public class TabUtils {
if (chromeActivity == null || chromeActivity.getToolbarManager() == null) {
return;
}
View toolbarView = chromeActivity.getToolbarManager().getToolbarView();
View toolbarView = chromeActivity.findViewById(R.id.toolbar);
if (toolbarView == null) {
return;
}
@@ -6,15 +6,15 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.chrome.browser.settings.HyperlinkPreference
<org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="open_source_license"
android:title="@string/open_source_license_title"
app:url="@string/open_source_license_url" />
<org.chromium.chrome.browser.settings.HyperlinkPreference
<org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="terms_of_service"
android:title="@string/google_terms_of_service_title"
app:url="@string/brave_terms_of_service_url" />
<org.chromium.chrome.browser.settings.HyperlinkPreference
<org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="privacy_notice"
android:title="@string/privacy_notice_title"
app:url="@string/brave_privacy_notice_url" />
@@ -27,9 +27,8 @@ public class BytecodeTest {
@SmallTest
public void testClassesExist() throws Exception {
Assert.assertTrue(classExists("org/chromium/chrome/browser/settings/MainSettings"));
Assert.assertTrue(classExists("org/chromium/components/sync/AndroidSyncSettings"));
Assert.assertTrue(classExists("org/chromium/chrome/browser/sync/AndroidSyncSettings"));
Assert.assertTrue(classExists("org/chromium/chrome/browser/bookmarks/BookmarkBridge"));
Assert.assertTrue(classExists("org/chromium/components/external_intents/ExternalNavigationHandler"));
Assert.assertTrue(classExists("org/chromium/chrome/browser/LaunchIntentDispatcher"));
Assert.assertTrue(classExists("org/chromium/chrome/browser/ntp/NewTabPageLayout"));
Assert.assertTrue(classExists("org/chromium/chrome/browser/feed/FeedSurfaceCoordinator"));
@@ -45,16 +44,14 @@ public class BytecodeTest {
@Test
@SmallTest
public void testMethodsExist() throws Exception {
Assert.assertTrue(methodExists("org/chromium/components/sync/AndroidSyncSettings", "notifyObservers"));
Assert.assertTrue(methodExists("org/chromium/components/sync/AndroidSyncSettings", "updateCachedSettings"));
Assert.assertTrue(methodExists("org/chromium/components/sync/AndroidSyncSettings", "setChromeSyncEnabled"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "notifyObservers"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "updateCachedSettings"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "setChromeSyncEnabled"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/bookmarks/BookmarkBridge",
"extensiveBookmarkChangesBeginning"));
Assert.assertTrue(
methodExists("org/chromium/chrome/browser/bookmarks/BookmarkBridge", "extensiveBookmarkChangesEnded"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/bookmarks/BookmarkBridge", "createBookmarkItem"));
Assert.assertTrue(methodExists("org/chromium/components/external_intents/ExternalNavigationHandler",
"clobberCurrentTabWithFallbackUrl"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/LaunchIntentDispatcher", "isCustomTabIntent"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/homepage/HomepageManager", "shouldCloseAppWithZeroTabs"));
Assert.assertTrue(methodExists("org/chromium/chrome/browser/ntp/NewTabPageLayout", "insertSiteSectionView"));
@@ -73,9 +70,9 @@ public class BytecodeTest {
@Test
@SmallTest
public void testFieldsExist() throws Exception {
Assert.assertTrue(fieldExists("org/chromium/components/sync/AndroidSyncSettings", "mIsSyncable"));
Assert.assertTrue(fieldExists("org/chromium/components/sync/AndroidSyncSettings", "mChromeSyncEnabled"));
Assert.assertTrue(fieldExists("org/chromium/components/sync/AndroidSyncSettings", "mMasterSyncEnabled"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "mIsSyncable"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "mChromeSyncEnabled"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/sync/AndroidSyncSettings", "mMasterSyncEnabled"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/ntp/NewTabPageLayout", "mSiteSectionView"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/feed/FeedSurfaceCoordinator", "mActivity"));
Assert.assertTrue(fieldExists("org/chromium/chrome/browser/feed/FeedSurfaceCoordinator", "mScrollViewForPolicy"));
+3 -2
View File
@@ -35,6 +35,7 @@
#include "components/offline_pages/core/offline_page_feature.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/safe_browsing/core/features.h"
#include "components/security_state/core/features.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "components/translate/core/browser/translate_prefs.h"
@@ -223,12 +224,12 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) {
autofill::features::kAutofillServerCommunication.name,
blink::features::kTextFragmentAnchor.name,
features::kAllowPopupsDuringPageUnload.name,
features::kLookalikeUrlNavigationSuggestionsUI.name,
features::kNotificationTriggers.name,
features::kPrivacySettingsRedesign.name,
features::kSmsReceiver.name,
features::kVideoPlaybackQuality.name,
features::kTabHoverCards.name,
language::kUseButtonTranslateBubbleUi.name,
safe_browsing::kEnhancedProtection.name,
#if defined(OS_ANDROID)
feed::kInterestFeedContentSuggestions.name,
translate::kTranslateUI.name,
+3 -2
View File
@@ -16,6 +16,7 @@
#include "components/language/core/common/language_experiments.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/safe_browsing/core/features.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/content_features.h"
#include "content/public/common/web_preferences.h"
@@ -64,11 +65,11 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&blink::features::kTextFragmentAnchor,
&features::kAllowPopupsDuringPageUnload,
&features::kNotificationTriggers,
&features::kPrivacySettingsRedesign,
&features::kSmsReceiver,
&features::kVideoPlaybackQuality,
&features::kLookalikeUrlNavigationSuggestionsUI,
&features::kTabHoverCards,
&language::kUseButtonTranslateBubbleUi,
&safe_browsing::kEnhancedProtection,
};
for (const auto* feature : disabled_features)
+1 -1
View File
@@ -45,7 +45,7 @@
Loaded from:
</message>
<message name="IDS_EXTENSIONS_PERMISSIONS_OFF" desc="The tooltip displayed when the extension is blocked due to the parent disabling the 'Permissions for sites, apps and extensions' toggle.">
Your parent has disabled extension permissions.
Your parent has disabled extension permissions
</message>
<message name="IDS_EXTENSIONS_RELOAD_TERMINATED" desc="The link for reloading extensions.">
Reload
+129 -74
View File
@@ -315,9 +315,6 @@ are declared in tools/grit/grit_rule.gni.
<!-- Strings that are only used when VR devices are supported -->
<if expr="enable_vr">
<part file="vr_strings.grdp" />
<if expr="not is_android">
<part file="xr_consent_ui_strings.grdp" />
</if>
</if>
<!-- Supervised user error page -->
@@ -374,6 +371,9 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_PERMISSIONS_BUBBLE_PROMPT_ACCESSIBLE_TITLE_TWO_PERMS_MORE" desc="The label that is read by a screen reader to describe the permissions prompt bubble. This will be followed by the short names of two permissions, then an &quot;and more&quot; descriptive text indicating that the dialog's body contains the entire list of requested permissions.">
<ph name="SITE_NAME">$1<ex>google.com</ex></ph> wants to: <ph name="FIRST_PERMISSION">$2<ex>use your microphone</ex></ph>, <ph name="SECOND_PERMISSION">$3<ex>use your location</ex></ph>, and more
</message>
<message name="IDS_PERMISSIONS_BUBBLE_PROMPT_THIS_FILE" desc="The text to be displayed instead of the origin when a local file requests permissions. This string will be inserted into Message ID 2121121439878997796, the full sentence will read: [This file] wants to request a permission.">
This file
</message>
<message name="IDS_PERMISSION_CUSTOMIZE" desc="Label on text button to allow the user to customize a permissions request.">
Customize
</message>
@@ -1545,6 +1545,9 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_DOWNLOAD_STATUS_PAGE_READY_TITLE" desc="The title of a download notification for offline pages not stored in Downloads.">
Page is ready to view
</message>
<message name="IDS_DOWNLOAD_STATUS_SCAN_TITLE" desc="The title of a download notification: the current download is being scanned.">
Scanning <ph name="FILE_NAME">$1<ex>somedocument.pdf</ex></ph>
</message>
<message name="IDS_DOWNLOAD_NOTIFICATION_STATUS_COMPLETED" desc="Size and units downloaded, and the origin domain.">
<ph name="DOWNLOAD_RECEIVED">$1<ex>154 MB</ex></ph> from <ph name="DOWNLOAD_DOMAIN">$2<ex>example.com</ex></ph>
</message>
@@ -1583,9 +1586,6 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_DOWNLOAD_STATUS_INTERRUPTED" desc="Status text for a download item that was interrupted.">
Failed - <ph name="INTERRUPT_REASON">$1<ex>Disk full</ex></ph>
</message>
<message name="IDS_DOWNLOAD_STATUS_SCANNED" desc="Status text for a download item that being scanned.">
Being scanned
</message>
<message name="IDS_DOWNLOAD_UNCONFIRMED_PREFIX" desc="The prefix used in the unconfirmed download file.">
Unconfirmed
</message>
@@ -1614,6 +1614,12 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_PROMPT_DEEP_SCANNING_DOWNLOAD" desc="Message shown in the download shelf when a download is being scanned">
Checking <ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> with your organization's security policies...
</message>
<message name="IDS_PROMPT_DEEP_SCANNING_DOWNLOAD_SHORT" desc="Message shown in the download shelf when a download is being scanned, without the file name">
Checking with your organization's security policies.
</message>
<message name="IDS_PROMPT_DEEP_SCANNING_APP_DOWNLOAD" desc="Message shown in the download shelf when a download is being scanned for an Advanced Protection user">
<ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> is being scanned.
</message>
<message name="IDS_PROMPT_CONFIRM_MIXED_CONTENT_DOWNLOAD" desc="Message shown to the user to validate the download when the download content is a mixed-content download.">
<ph name="FILE_NAME">$1<ex>bla.exe</ex></ph> can't be downloaded securely
</message>
@@ -1869,6 +1875,9 @@ are declared in tools/grit/grit_rule.gni.
</message>
</else>
</if>
<message name="IDS_DEEP_SCANNING_ACCESSIBLE_ALERT" desc="The title of a download notification inidcating that the file may be malicious, and the Advanced Protection Program recommends sending the file to Brave. This message is for screen reader users">
<ph name="FILE_NAME">$1<ex>file.exe</ex></ph> is being scanned.
</message>
<!-- Download Notification Labels -->
<message name="IDS_DOWNLOAD_NOTIFICATION_COPY_TO_CLIPBOARD" desc="In the download notification, the text of 'Copy to clipboard' button, which is to copy the file content (eg. an image for image files) to the clipboard">
@@ -2110,6 +2119,12 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_INSTALL_PWA_BUTTON_LABEL" desc="Text for button that installs a web app to the operating system.">
Install
</message>
<message name="IDS_INSTALL_PWA_RUN_ON_OS_LOGIN_LABEL" desc="Text for checkbox label for auto starting the web app with user login to the operating system session.">
{0, select,
tablet {Start app when you sign in to your tablet}
computer {Start app when you sign in to your computer}
other {Start app when you sign in to your device}}
</message>
<message name="IDS_BOOKMARK_APP_AX_BUBBLE_NAME_LABEL" desc="Text preceding the name of a bookmark app, read by spoken feedback.">
Shortcut name
@@ -2446,12 +2461,18 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION" desc="Radio button choice to allow a site to access microphone and camera, displayed in bubble when a page is accessing microphone and camera.">
Continue allowing <ph name="HOST">$1<ex>mail.google.com</ex></ph> to access your camera and microphone
</message>
<message name="IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_PAN_TILT_ZOOM_NO_ACTION" desc="Radio button choice to allow a site to use and move camera, and use microphone, displayed in bubble when a page is accessing microphone and camera.">
Continue allowing <ph name="HOST">$1<ex>mail.google.com</ex></ph> to use and move your camera, and use your microphone
</message>
<message name="IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION" desc="Radio button choice to allow a site to access microphone, displayed in bubble when a page is accessing microphone.">
Continue allowing <ph name="HOST">$1<ex>mail.google.com</ex></ph> to access your microphone
</message>
<message name="IDS_ALLOWED_MEDIASTREAM_CAMERA_NO_ACTION" desc="Radio button choice to allow a site to access camera, displayed in bubble when a page is accessing camera.">
Continue allowing <ph name="HOST">$1<ex>mail.google.com</ex></ph> to access your camera
</message>
<message name="IDS_ALLOWED_CAMERA_PAN_TILT_ZOOM_NO_ACTION" desc="Radio button choice to allow a site to use and move camera, displayed in bubble when a page is accessing camera.">
Continue allowing <ph name="HOST">$1<ex>mail.google.com</ex></ph> to use and move your camera
</message>
<message name="IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT" desc="Explanatory animated text that appears (and then disappears) in the address line when popup is blocked">
Pop-up blocked
</message>
@@ -3340,8 +3361,11 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_TASK_MANAGER_PRERENDER_PREFIX" desc="The prefix for a Task Manager prerender row">
Prerender: <ph name="PRERENDER_CONTENTS_NAME">$1<ex>http://www.google.com</ex></ph>
</message>
<message name="IDS_TASK_MANAGER_RENDERER_PREFIX" desc="The prefix for a Task Manager renderer row, only is visible when no other task claims that process">
Renderer: <ph name="RENDERER_URL">$1<ex>http://www.google.com</ex></ph>
<message name="IDS_TASK_MANAGER_SPARE_RENDERER_PREFIX" desc="Task Manager row for a 'spare' render process. That is a render process that was started in anticipation of it being needed so that when it is needed it is immediately ready for use">
Spare Renderer
</message>
<message name="IDS_TASK_MANAGER_UNKNOWN_RENDERER_PREFIX" desc="Task Manager row for an 'unknown' render process. That is a render process that the Task Manager knows is running, but that the Task Manager doesn't have any other information about, so that it is unable to present it to the user classified more precisely">
Renderer
</message>
<message name="IDS_TASK_MANAGER_DEDICATED_WORKER_PREFIX" desc="The prefix for a Task Manager dedicated worker row">
Dedicated Worker: <ph name="SCRIPT_URL">$1<ex>https://googlechrome.github.io/samples/dedicated-worker/basic/dedicated-worker.js</ex></ph>
@@ -3957,6 +3981,15 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_EXTENSION_PROMPT_WARNING_TRANSIENT_BACKGROUND" desc="Permission string for transient background permission.">
Run in the background when requested by a cooperating native application
</message>
<message name="IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_DEVICE_ATTRIBUTES" desc="Permission string for enterprise device attributes permission.">
See device information, such as its serial number or asset ID
</message>
<message name="IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_NETWORKING_ATTRIBUTES" desc="Permission string for enterprise networking attributes permission.">
See network information, such as your IP or MAC address
</message>
<message name="IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_PLATFORMKEYS" desc="Permission string for enterprise platform keys permission.">
Perform security-related tasks for your organization, such as managing certificates and keys stored on the device
</message>
</if>
<!-- Extension/App error messages -->
@@ -4205,9 +4238,6 @@ are declared in tools/grit/grit_rule.gni.
<message name="IDS_EXTENSIONS_LOCKED_SUPERVISED_USER" desc="The error message (either shown in the extensions UI or logged) informing a supervised user that extensions cannot be changed.">
Apps and extensions can only be modified by the manager (<ph name="CUSTODIAN_NAME">$1<ex>Jane Doe</ex></ph>).
</message>
<message name="IDS_EXTENSIONS_INSTALLED_BY_SUPERVISED_USER_CUSTODIAN" desc="The text in the extensions UI informing a supervised user that an extension was installed by their custodian and cannot be changed">
Installed by your custodian.
</message>
<message name="IDS_EXTENSION_LOAD_FROM_DIRECTORY" desc="Title of directory browse dialog when user wants to load an extension from a directory.">
Select the extension directory.
</message>
@@ -5058,6 +5088,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_PASTE_AND_SEARCH" desc="The text label of the Paste And Go menu item when the clipboard contains a string to search for">
Pa&amp;ste and search for “<ph name="SEARCH_TERMS">$1<ex>flowers</ex></ph>”
</message>
<message name="IDS_PASTE_AND_GO_EMPTY" desc="The text label of the Paste And Go menu item when the clipboard is empty">
Pa&amp;ste and go
</message>
</if>
<if expr="use_titlecase">
<message name="IDS_PASTE_AND_GO" desc="In Title Case: The text label of the Paste And Go menu item when the clipboard contains a URL">
@@ -5066,10 +5099,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_PASTE_AND_SEARCH" desc="In Title Case: The text label of the Paste And Go menu item when the clipboard contains a string to search for">
Pa&amp;ste and Search for “<ph name="SEARCH_TERMS">$1<ex>flowers</ex></ph>”
</message>
<message name="IDS_PASTE_AND_GO_EMPTY" desc="In Title Case: The text label of the Paste And Go menu item when the clipboard is empty">
Pa&amp;ste and Go
</message>
</if>
<message name="IDS_SHOW_URL" desc="The text label of the Show URL menu item when the omnibox contains an elided URL or search query terms">
S&amp;how URL
</message>
<message name="IDS_OMNIBOX_KEYWORD_HINT" desc="Shown to the user when the url in the omnibox has a keyword associated with it. $1 is replaced with an image showing the tab key. $2 is replaced with the description of the keyword.">
Press <ph name="SEARCH_KEY">$1<ex>Tab</ex></ph> to search <ph name="SITE_NAME">$2<ex>google.com</ex></ph>
</message>
@@ -5606,6 +5639,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_REOPEN_TAB_PROMO_SCREENREADER" desc="Text announced encouraging users to reopen a tab with the given shortcut">
<ph name="SHORTCUT">$1<ex>CTRL+SHIFT+T</ex></ph> can reopen accidentally closed tabs
</message>
<message name="IDS_TAB_GROUPS_NEW_GROUP_PROMO" desc="Text shown on promotional UI encouraging users to create a tab group in their tab strip">
To group tabs together, right-click a tab
</message>
<!-- Browser Hung Plugin Detector -->
<if expr="is_win">
@@ -5708,6 +5744,24 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_PASSWORD_MANAGER_BUBBLE_BLACKLIST_BUTTON" desc="Button text for the 'Save Password' bubble's 'Never remember for this site' option">
Never
</message>
<message name="IDS_PASSWORD_MANAGER_DESTINATION_DROPDOWN_ACCESSIBLE_NAME" desc="Accessible name of destination dropdown in the password save bubble">
Select where to save your password
</message>
<message name="IDS_PASSWORD_MANAGER_DESTINATION_DROPDOWN_SAVE_TO_ACCOUNT" desc="Text shown in the destination dropdown in the password save bubble when saving to the account">
Save in your Brave Account
</message>
<message name="IDS_PASSWORD_MANAGER_DESTINATION_DROPDOWN_SAVE_TO_DEVICE" desc="Text shown in the destination dropdown in the password save bubble when saving to the device">
Save only on this device
</message>
<message name="IDS_PASSWORD_MANAGER_IPH_TITLE_SAVE_TO_ACCOUNT" desc="Title of the in Product Help shown when the 'Save to account` is selected ">
Choose where to save
</message>
<message name="IDS_PASSWORD_MANAGER_IPH_BODY_SAVE_REAUTH_FAIL" desc="Body of the in Product Help shown in the password save bubble when the account auth fails">
This password will be saved on this device
</message>
<message name="IDS_PASSWORD_MANAGER_IPH_BODY_SAVE_TO_ACCOUNT" desc="Body of the in Product Help shown when the 'Save to account` is selected">
You can save this password in your Brave Account or only on this device
</message>
<message name="IDS_PASSWORD_MANAGER_TOOLTIP_SAVE" desc="Text for the 'Manage Passwords' icon's 'password to be saved' state">
Save your password
</message>
@@ -5738,6 +5792,18 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_PASSWORD_MANAGER_MOVE_HINT" desc="Label describing the effect of moving an existing credential to the user's account store">
Move your password to your Brave account to access it securely wherever you're signed in
</message>
<message name="IDS_PASSWORD_MANAGER_UNSYNCED_CREDENTIALS_BUBBLE_TITLE" desc="The title of the 'save unsynced credentials' bubble.">
Passwords not saved
</message>
<message name="IDS_PASSWORD_MANAGER_UNSYNCED_CREDENTIALS_BUBBLE_DESCRIPTION" desc="The description text of the 'save unsynced credentials' bubble.">
Brave couldn't save these passwords in your Brave Account. You can still save them on this device.
</message>
<message name="IDS_PASSWORD_MANAGER_SAVE_UNSYNCED_CREDENTIALS_BUTTON" desc="Button text for the 'save unsynced credentials' bubble's save option.">
Save
</message>
<message name="IDS_PASSWORD_MANAGER_DISCARD_UNSYNCED_CREDENTIALS_BUTTON" desc="Button text for the 'save unsynced credentials' bubble's discard option.">
No thanks
</message>
</if>
<if expr="is_android">
<message name="IDS_PASSWORD_MANAGER_SAVE_BUTTON" desc="Mobile: Button text for the 'Save Password' infobar's 'Remember password' option">
@@ -5835,6 +5901,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<if expr="enable_extensions">
<!-- Feedback Dialog -->
<message name="IDS_FEEDBACK_REPORT_APP_TITLE" desc="The title of the feedback app as shown in the app switcher and system tray">
Feedback
</message>
<if expr="use_titlecase">
<message name="IDS_FEEDBACK_REPORT_PAGE_TITLE" desc="Label showing the title of the page that will be reported">
Send Feedback to Brave
@@ -5962,14 +6031,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_MEDIA_MENU_NO_DEVICE_TITLE" desc="The title of the media select menu if there is no microphone or camera available on the machine">
None available
</message>
<if expr="is_android">
<message name="IDS_POPUPS_BLOCKED_INFOBAR_BUTTON_SHOW" desc="Pop-up Blocking Show Button [CHAR-LIMIT=32]">
Always show
</message>
<message name="IDS_POPUPS_BLOCKED_INFOBAR_TEXT" desc="Pop-up Blocking Title [CHAR-LIMIT=32] [ICU Syntax]">
{NUM_POPUPS,plural,=1{Pop-up blocked} other{# pop-ups blocked}}
</message>
</if>
<message name="IDS_ZOOMLEVELS_CHROME_ERROR_PAGES_LABEL" desc="Label for zoom level list entry for Brave error pages.">
(Brave error pages)
@@ -6824,6 +6885,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_BROWSER_SHARING_QR_CODE_DIALOG_DOWNLOAD_BUTTON_LABEL" desc="Button text for the QR code generator's download button.">
Download
</message>
<message name="IDS_BROWSER_SHARING_QR_CODE_DIALOG_ERROR_TOO_LONG" desc="Error message displayed when a URL exceeds the limit for which we can generate a QR code.">
Use <ph name="CHARACTER_LIMIT">$1<ex>300</ex></ph> characters or fewer
</message>
<message name="IDS_BROWSER_SHARING_QR_CODE_DIALOG_ERROR_UNKNOWN" desc="Error message displayed when an unknown error occurs.">
Can't create QR code
</message>
<!-- Sharing features. -->
<message name="IDS_SHARING_REMOTE_COPY_NOTIFICATION_TITLE_TEXT_CONTENT_UNKNOWN_DEVICE" desc="Title text displayed in a Remote Copy (for text content) notification when the source device name is unknown.">
@@ -7428,6 +7495,29 @@ Keep your key file in a safe place. You will need it to create new versions of y
Continue
</message>
<!-- Account password storage reauth tab modal dialog -->
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_SAVE_TITLE" desc="Title of the account password storage reauth tab modal dialog. The dialog was shown because the user requested to save a password to their Brave account.">
Save this and other passwords in your Brave Account?
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_SHOW_TITLE" desc="Title of the account password storage reauth tab modal dialog. The dialog was shown because the user requested to get passwords from their Brave account.">
Show passwords from your Brave Account
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_DESC" desc="Body of the account password storage reauth tab modal dialog.">
Your passwords from your Brave Account will also be available on this device while you're signed in
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_SAVE_BUTTON_LABEL" desc="Label of the confirmation button in the account password storage reauth tab modal dialog. The dialog was shown because the user requested to save a password to their Brave account.">
Save
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_SHOW_BUTTON_LABEL" desc="Label of the confirmation button in the account password storage reauth tab modal dialog. The dialog was shown because the user requested to get passwords from their Brave account.">
Show
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_CLOSE_BUTTON_LABEL" desc="Label of the close button in the account password storage reauth tab modal dialog.">
Cancel
</message>
<message name="IDS_ACCOUNT_PASSWORDS_REAUTH_NEXT_BUTTON_LABEL" desc="Label of the next button in the account password storage reauth tab modal dialog. This button invites the user to authenticate to unlock the account password storage.">
Next
</message>
<message name="IDS_PLUGIN_OUTDATED_PROMPT" desc="Infobar message when an outdated plugin was disabled">
<ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> was blocked because it is out of date
</message>
@@ -8580,6 +8670,9 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_MANAGE_PASSWORDS_DIFFERENT_DOMAIN_NO_PASSWORDS_TITLE" desc="The title text that is used in the manage passwords bubble when no passwords are available for a different domain.">
No passwords saved for <ph name="ORIGIN">$1<ex>example.com</ex></ph>
</message>
<message name="IDS_MANAGE_PASSWORDS_ACCOUNT_STORE_ICON_DESCRIPTION" desc="An accessibility text for images that mark passwords as stored in the user's profile.">
Password stored in your Brave account
</message>
<message name="IDS_MANAGE_PASSWORDS_DELETED" desc="The text that is used in the manage passwords bubble when a password is deleted.">
Password deleted
</message>
@@ -8903,15 +8996,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
<!-- App List. -->
<if expr="chromeos">
<message name="IDS_SEARCH_BOX_ACCESSIBILITY_NAME" desc="Hint text for the search box in fullscreen app list window with additional instructions to use the arrow keys in Accessibility mode.">
Search your device, apps, and web. Use the arrow keys to navigate your apps.
</message>
<message name="IDS_SEARCH_BOX_ACCESSIBILITY_NAME_TABLET" desc="Hint text for the search box in fullscreen app list window. Tablet mode only, so we don't mention the arrow keys.">
Search your device, apps, and web.
</message>
<message name="IDS_SEARCH_BOX_HINT_FULLSCREEN" desc="Hint text for the search box in fullscreen app list window.">
Search your device, apps, web...
</message>
<message name="IDS_APP_ACTION_SHORTCUT_ACCESSIBILITY_NAME" desc="Hint text for the search result that performs a specific action with an app.">
<ph name="ACTION_NAME">$1<ex>Compose</ex></ph> with <ph name="APP_NAME">$2<ex>GMail</ex></ph> App
</message>
@@ -9201,11 +9285,17 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_TAB_AX_LABEL_NAMED_GROUP_FORMAT" desc="Accessibility label text for a tab, when it is in a group that has been named by the user. Example: 'Brave Search - Part of group MyGroupName'">
<ph name="WINDOW_TITLE">$1<ex>Brave Search</ex></ph> - Part of group <ph name="GROUP_NAME">$2</ph>
</message>
<message name="IDS_GROUP_AX_LABEL_UNNAMED_GROUP_FORMAT" desc="Accessibility label text for a tab group header, when it has not been named by the user. Example: 'Unnamed group - Brave Search and 3 other tabs'">
Unnamed group - <ph name="GROUP_CONTENTS">$1<ex>Brave Search and 3 other tabs</ex></ph>
<message name="IDS_GROUP_AX_LABEL_UNNAMED_GROUP_FORMAT" desc="Spoken by screen readers when a tab group header that has not been named by the user gets focused but is not visually rendered. Example: 'Unnamed group - Brave Search and 3 other tabs - Expanded'">
Unnamed group - <ph name="GROUP_CONTENTS">$2<ex>Brave Search and 3 other tabs</ex></ph> - <ph name="COLLAPSED_STATE">$1</ph>
</message>
<message name="IDS_GROUP_AX_LABEL_NAMED_GROUP_FORMAT" desc="Accessibility label text for a tab group header, when it has been named by the user. Example: 'Group MyGroupName - Brave Search and 3 other tabs'">
Group <ph name="GROUP_NAME">$1</ph> - <ph name="GROUP_CONTENTS">$2<ex>Brave Search and 3 other tabs</ex></ph>
<message name="IDS_GROUP_AX_LABEL_NAMED_GROUP_FORMAT" desc="Spoken by screen readers when a tab group header that has been named by the user gets focused but is not visually rendered. Example: 'Group MyGroupName - Brave Search and 3 other tabs - Collapsed'">
Group <ph name="GROUP_NAME">$2</ph> - <ph name="GROUP_CONTENTS">$3<ex>Brave Search and 3 other tabs</ex></ph> - <ph name="COLLAPSED_STATE">$1</ph>
</message>
<message name="IDS_GROUP_AX_LABEL_COLLAPSED" desc="Used as part of the accessibility label text of a group header for a collapsed tab group.">
Collapsed
</message>
<message name="IDS_GROUP_AX_LABEL_EXPANDED" desc="Used as part of the accessibility label text of a group header for an expanded tab group.">
Expanded
</message>
<!-- ProcessSingleton -->
@@ -9331,25 +9421,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
<ph name="EVENT_NAME">$3<ex>Event Description</ex></ph>
</message>
<!-- External Navigation Strings -->
<if expr="is_android or chromeos">
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING" desc="Alert dialog text warning the user (who is currently in private mode) that the site they are currently using is going to share data with an external application." formatter_data="android_java">
This site is about to share information with an app outside of private mode.
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING_TITLE" desc="Title for dialog asking if the user wants to leave private mode. [CHAR-LIMIT=32]" formatter_data="android_java">
Leave private mode?
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_STAY" desc="Label for the dialog button to stay in private mode. [CHAR-LIMIT=20]" formatter_data="android_java">
Stay
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_LEAVE" desc="Label for the dialog button to leave private mode. [CHAR-LIMIT=20]" formatter_data="android_java">
Leave
</message>
<message name="IDS_EXTERNAL_APP_RESTRICTED_ACCESS_ERROR" desc="A message shown to the user if Brave receives a file view request to something Brave does not have access to view." formatter_data="android_java">
Brave does not have access to the requested resource.
</message>
</if>
<!-- WebUsb Notification -->
<message name="IDS_WEBUSB_DEVICE_DETECTED_NOTIFICATION" desc="Content for notification shown to the user when a USB device gets plugged in.">
Go to <ph name="LANDING_PAGE">$1<ex>www.google.com</ex></ph> to connect.
@@ -9567,7 +9638,10 @@ Please help our engineers fix this problem. Tell us what happened right before y
Ad removed.
</message>
<message name="IDS_HEAVY_AD_INTERVENTION_SUMMARY" desc="Summary in heavy ad intervention page when ad was removed for using too many system resources.">
This ad uses too many resources for your device, so Brave removed it.
This ad used too many resources for your device, so Brave removed it.
</message>
<message name="IDS_HEAVY_AD_INTERVENTION_BUTTON_RELOAD" desc="Label for the button that reloads the page and disables the intervention">
Reload and show anyway
</message>
<if expr="is_win">
@@ -9681,17 +9755,9 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_NATIVE_FILE_SYSTEM_WRITE_PERMISSION_TITLE" desc="Title of dialog for confirming write access to a file, or a directory and the files it contains, using the Native File System API">
Save changes to <ph name="FILE_OR_FOLDER_NAME">$1<ex>README.md</ex></ph>?
</message>
<message name="IDS_NATIVE_FILE_SYSTEM_WRITE_PERMISSION_FILE_TEXT" desc="Text of the dialog for confirming write access to files using the Native File System API">
<ph name="ORIGIN">$1<ex>example.com</ex></ph> will be able to edit <ph name="FILENAME">$2<ex>README.md</ex></ph> until you close this tab
</message>
<message name="IDS_NATIVE_FILE_SYSTEM_WRITE_PERMISSION_DIRECTORY_TEXT" desc="Text of the dialog for confirming write access to a directory using the Native File System API">
<ph name="ORIGIN">$1<ex>example.com</ex></ph> will be able to edit files in <ph name="FOLDERNAME">$2<ex>My Project</ex></ph> until you close this tab
</message>
<message name="IDS_NATIVE_FILE_SYSTEM_WRITE_PERMISSION_ALLOW_TEXT" desc="Text of the 'allow' button in the dialog for confirming write access to files or directories using the Native File System API">
Save changes
</message>
<!-- New Native File System permission dialog -->
<message name="IDS_NATIVE_FILE_SYSTEM_ORIGIN_SCOPED_WRITE_PERMISSION_FILE_TEXT" desc="Text of the dialog for confirming origin scoped write access to files using the Native File System API">
<ph name="ORIGIN">$1<ex>example.com</ex></ph> will be able to edit <ph name="FILENAME">$2<ex>README.md</ex></ph> until you close all tabs for this site
</message>
@@ -9812,17 +9878,6 @@ Please help our engineers fix this problem. Tell us what happened right before y
Choose a different file
</message>
<!-- Native File System directory access confirmation dialog. -->
<message name="IDS_NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS_CONFIRMATION_TITLE" desc="Title of dialog asking user if they intended to share a particular directory">
Let site view files?
</message>
<message name="IDS_NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS_CONFIRMATION_TEXT" desc="Text of dialog asking user if they intended to share a particular directory">
<ph name="ORIGIN">$1<ex>example.com</ex></ph> will be able to view files in <ph name="FOLDERNAME">$2<ex>My Project</ex></ph> until you close this tab
</message>
<message name="IDS_NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS_ALLOW_BUTTON" desc="'allow' button in the dialog asking user if they intended to share a particular directory">
View files
</message>
<!-- Relaunch notification bubble and dialog. -->
<if expr="not is_android">
<if expr="not chromeos">
+81 -96
View File
@@ -7,86 +7,86 @@ are declared in tools/grit/grit_rule.gni.
-->
<grit base_dir="." latest_public_release="0" current_release="1" output_all_resource_defines="false" source_lang_id="en" enc_check="möl">
<translations>
<file path="resources/generated_resources_override_af.xtb" lang="af" />
<file path="resources/generated_resources_override_am.xtb" lang="am" />
<file path="resources/generated_resources_override_ar.xtb" lang="ar" />
<file path="resources/generated_resources_override_as.xtb" lang="as" />
<file path="resources/generated_resources_override_az.xtb" lang="az" />
<file path="resources/generated_resources_override_be.xtb" lang="be" />
<file path="resources/generated_resources_override_bg.xtb" lang="bg" />
<file path="resources/generated_resources_override_bn.xtb" lang="bn" />
<file path="resources/generated_resources_override_bs.xtb" lang="bs" />
<file path="resources/generated_resources_override_ca.xtb" lang="ca" />
<file path="resources/generated_resources_override_cs.xtb" lang="cs" />
<file path="resources/generated_resources_override_da.xtb" lang="da" />
<file path="resources/generated_resources_override_de.xtb" lang="de" />
<file path="resources/generated_resources_override_el.xtb" lang="el" />
<file path="resources/generated_resources_override_en-GB.xtb" lang="en-GB" />
<file path="resources/generated_resources_override_es.xtb" lang="es" />
<file path="resources/generated_resources_override_es-419.xtb" lang="es-419" />
<file path="resources/generated_resources_override_et.xtb" lang="et" />
<file path="resources/generated_resources_override_eu.xtb" lang="eu" />
<file path="resources/generated_resources_override_fa.xtb" lang="fa" />
<file path="resources/generated_resources_override_fi.xtb" lang="fi" />
<file path="resources/generated_resources_override_fil.xtb" lang="fil" />
<file path="resources/generated_resources_override_fr.xtb" lang="fr" />
<file path="resources/generated_resources_override_fr-CA.xtb" lang="fr-CA" />
<file path="resources/generated_resources_override_gl.xtb" lang="gl" />
<file path="resources/generated_resources_override_gu.xtb" lang="gu" />
<file path="resources/generated_resources_override_hi.xtb" lang="hi" />
<file path="resources/generated_resources_override_hr.xtb" lang="hr" />
<file path="resources/generated_resources_override_hu.xtb" lang="hu" />
<file path="resources/generated_resources_override_hy.xtb" lang="hy" />
<file path="resources/generated_resources_override_id.xtb" lang="id" />
<file path="resources/generated_resources_override_is.xtb" lang="is" />
<file path="resources/generated_resources_override_it.xtb" lang="it" />
<file path="resources/generated_resources_override_iw.xtb" lang="he" />
<file path="resources/generated_resources_override_ja.xtb" lang="ja" />
<file path="resources/generated_resources_override_ka.xtb" lang="ka" />
<file path="resources/generated_resources_override_kk.xtb" lang="kk" />
<file path="resources/generated_resources_override_km.xtb" lang="km" />
<file path="resources/generated_resources_override_kn.xtb" lang="kn" />
<file path="resources/generated_resources_override_ko.xtb" lang="ko" />
<file path="resources/generated_resources_override_ky.xtb" lang="ky" />
<file path="resources/generated_resources_override_lo.xtb" lang="lo" />
<file path="resources/generated_resources_override_lt.xtb" lang="lt" />
<file path="resources/generated_resources_override_lv.xtb" lang="lv" />
<file path="resources/generated_resources_override_mk.xtb" lang="mk" />
<file path="resources/generated_resources_override_ml.xtb" lang="ml" />
<file path="resources/generated_resources_override_mn.xtb" lang="mn" />
<file path="resources/generated_resources_override_mr.xtb" lang="mr" />
<file path="resources/generated_resources_override_ms.xtb" lang="ms" />
<file path="resources/generated_resources_override_my.xtb" lang="my" />
<file path="resources/generated_resources_override_ne.xtb" lang="ne" />
<file path="resources/generated_resources_override_nl.xtb" lang="nl" />
<file path="resources/generated_resources_override_no.xtb" lang="no" />
<file path="resources/generated_resources_override_or.xtb" lang="or" />
<file path="resources/generated_resources_override_pa.xtb" lang="pa" />
<file path="resources/generated_resources_override_pl.xtb" lang="pl" />
<file path="resources/generated_resources_override_pt-BR.xtb" lang="pt-BR" />
<file path="resources/generated_resources_override_pt-PT.xtb" lang="pt-PT" />
<file path="resources/generated_resources_override_ro.xtb" lang="ro" />
<file path="resources/generated_resources_override_ru.xtb" lang="ru" />
<file path="resources/generated_resources_override_si.xtb" lang="si" />
<file path="resources/generated_resources_override_sk.xtb" lang="sk" />
<file path="resources/generated_resources_override_sl.xtb" lang="sl" />
<file path="resources/generated_resources_override_sq.xtb" lang="sq" />
<file path="resources/generated_resources_override_sr.xtb" lang="sr" />
<file path="resources/generated_resources_override_sr-Latn.xtb" lang="sr-Latn" />
<file path="resources/generated_resources_override_sv.xtb" lang="sv" />
<file path="resources/generated_resources_override_sw.xtb" lang="sw" />
<file path="resources/generated_resources_override_ta.xtb" lang="ta" />
<file path="resources/generated_resources_override_te.xtb" lang="te" />
<file path="resources/generated_resources_override_th.xtb" lang="th" />
<file path="resources/generated_resources_override_tr.xtb" lang="tr" />
<file path="resources/generated_resources_override_uk.xtb" lang="uk" />
<file path="resources/generated_resources_override_ur.xtb" lang="ur" />
<file path="resources/generated_resources_override_uz.xtb" lang="uz" />
<file path="resources/generated_resources_override_vi.xtb" lang="vi" />
<file path="resources/generated_resources_override_zh-CN.xtb" lang="zh-CN" />
<file path="resources/generated_resources_override_zh-HK.xtb" lang="zh-HK" />
<file path="resources/generated_resources_override_zh-TW.xtb" lang="zh-TW" />
<file path="resources/generated_resources_override_zu.xtb" lang="zu" />
<file path="resources\generated_resources_override_af.xtb" lang="af" />
<file path="resources\generated_resources_override_am.xtb" lang="am" />
<file path="resources\generated_resources_override_ar.xtb" lang="ar" />
<file path="resources\generated_resources_override_as.xtb" lang="as" />
<file path="resources\generated_resources_override_az.xtb" lang="az" />
<file path="resources\generated_resources_override_be.xtb" lang="be" />
<file path="resources\generated_resources_override_bg.xtb" lang="bg" />
<file path="resources\generated_resources_override_bn.xtb" lang="bn" />
<file path="resources\generated_resources_override_bs.xtb" lang="bs" />
<file path="resources\generated_resources_override_ca.xtb" lang="ca" />
<file path="resources\generated_resources_override_cs.xtb" lang="cs" />
<file path="resources\generated_resources_override_da.xtb" lang="da" />
<file path="resources\generated_resources_override_de.xtb" lang="de" />
<file path="resources\generated_resources_override_el.xtb" lang="el" />
<file path="resources\generated_resources_override_en-GB.xtb" lang="en-GB" />
<file path="resources\generated_resources_override_es.xtb" lang="es" />
<file path="resources\generated_resources_override_es-419.xtb" lang="es-419" />
<file path="resources\generated_resources_override_et.xtb" lang="et" />
<file path="resources\generated_resources_override_eu.xtb" lang="eu" />
<file path="resources\generated_resources_override_fa.xtb" lang="fa" />
<file path="resources\generated_resources_override_fi.xtb" lang="fi" />
<file path="resources\generated_resources_override_fil.xtb" lang="fil" />
<file path="resources\generated_resources_override_fr.xtb" lang="fr" />
<file path="resources\generated_resources_override_fr-CA.xtb" lang="fr-CA" />
<file path="resources\generated_resources_override_gl.xtb" lang="gl" />
<file path="resources\generated_resources_override_gu.xtb" lang="gu" />
<file path="resources\generated_resources_override_hi.xtb" lang="hi" />
<file path="resources\generated_resources_override_hr.xtb" lang="hr" />
<file path="resources\generated_resources_override_hu.xtb" lang="hu" />
<file path="resources\generated_resources_override_hy.xtb" lang="hy" />
<file path="resources\generated_resources_override_id.xtb" lang="id" />
<file path="resources\generated_resources_override_is.xtb" lang="is" />
<file path="resources\generated_resources_override_it.xtb" lang="it" />
<file path="resources\generated_resources_override_iw.xtb" lang="he" />
<file path="resources\generated_resources_override_ja.xtb" lang="ja" />
<file path="resources\generated_resources_override_ka.xtb" lang="ka" />
<file path="resources\generated_resources_override_kk.xtb" lang="kk" />
<file path="resources\generated_resources_override_km.xtb" lang="km" />
<file path="resources\generated_resources_override_kn.xtb" lang="kn" />
<file path="resources\generated_resources_override_ko.xtb" lang="ko" />
<file path="resources\generated_resources_override_ky.xtb" lang="ky" />
<file path="resources\generated_resources_override_lo.xtb" lang="lo" />
<file path="resources\generated_resources_override_lt.xtb" lang="lt" />
<file path="resources\generated_resources_override_lv.xtb" lang="lv" />
<file path="resources\generated_resources_override_mk.xtb" lang="mk" />
<file path="resources\generated_resources_override_ml.xtb" lang="ml" />
<file path="resources\generated_resources_override_mn.xtb" lang="mn" />
<file path="resources\generated_resources_override_mr.xtb" lang="mr" />
<file path="resources\generated_resources_override_ms.xtb" lang="ms" />
<file path="resources\generated_resources_override_my.xtb" lang="my" />
<file path="resources\generated_resources_override_ne.xtb" lang="ne" />
<file path="resources\generated_resources_override_nl.xtb" lang="nl" />
<file path="resources\generated_resources_override_no.xtb" lang="no" />
<file path="resources\generated_resources_override_or.xtb" lang="or" />
<file path="resources\generated_resources_override_pa.xtb" lang="pa" />
<file path="resources\generated_resources_override_pl.xtb" lang="pl" />
<file path="resources\generated_resources_override_pt-BR.xtb" lang="pt-BR" />
<file path="resources\generated_resources_override_pt-PT.xtb" lang="pt-PT" />
<file path="resources\generated_resources_override_ro.xtb" lang="ro" />
<file path="resources\generated_resources_override_ru.xtb" lang="ru" />
<file path="resources\generated_resources_override_si.xtb" lang="si" />
<file path="resources\generated_resources_override_sk.xtb" lang="sk" />
<file path="resources\generated_resources_override_sl.xtb" lang="sl" />
<file path="resources\generated_resources_override_sq.xtb" lang="sq" />
<file path="resources\generated_resources_override_sr.xtb" lang="sr" />
<file path="resources\generated_resources_override_sr-Latn.xtb" lang="sr-Latn" />
<file path="resources\generated_resources_override_sv.xtb" lang="sv" />
<file path="resources\generated_resources_override_sw.xtb" lang="sw" />
<file path="resources\generated_resources_override_ta.xtb" lang="ta" />
<file path="resources\generated_resources_override_te.xtb" lang="te" />
<file path="resources\generated_resources_override_th.xtb" lang="th" />
<file path="resources\generated_resources_override_tr.xtb" lang="tr" />
<file path="resources\generated_resources_override_uk.xtb" lang="uk" />
<file path="resources\generated_resources_override_ur.xtb" lang="ur" />
<file path="resources\generated_resources_override_uz.xtb" lang="uz" />
<file path="resources\generated_resources_override_vi.xtb" lang="vi" />
<file path="resources\generated_resources_override_zh-CN.xtb" lang="zh-CN" />
<file path="resources\generated_resources_override_zh-HK.xtb" lang="zh-HK" />
<file path="resources\generated_resources_override_zh-TW.xtb" lang="zh-TW" />
<file path="resources\generated_resources_override_zu.xtb" lang="zu" />
</translations>
<release seq="1" allow_pseudo="false">
<messages fallback_to_english="true">
@@ -116,8 +116,6 @@ are declared in tools/grit/grit_rule.gni.
<if expr="enable_vr">
<part file="vr_strings_override.grdp" />
<if expr="not is_android">
</if>
</if>
<if expr="enable_supervised_users">
@@ -251,7 +249,6 @@ are declared in tools/grit/grit_rule.gni.
<else>
</else>
</if>
<if expr="not is_android">
<if expr="not use_titlecase">
<if expr="is_macosx">
@@ -526,9 +523,6 @@ are declared in tools/grit/grit_rule.gni.
</if>
</if>
<if expr="is_android">
</if>
<if expr="is_macosx">
</if>
@@ -788,16 +782,7 @@ are declared in tools/grit/grit_rule.gni.
<if expr="chromeos">
</if>
<if expr="is_android or chromeos">
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING" desc="Alert dialog text warning the user (who is currently in private mode) that the site they are currently using is going to share data with an external application." formatter_data="android_java">
This site is about to share information with an app outside of private mode.
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING_TITLE" desc="Title for dialog asking if the user wants to leave private mode. [CHAR-LIMIT=32]" formatter_data="android_java">
Leave private mode?
</message>
</if>
<if expr="chromeos">
<if expr="chromeos">
</if>
<if expr="is_win">
+161 -79
View File
@@ -2,7 +2,7 @@
<!-- Search tags used for CrOS settings search (go/cros-settings-search). -->
<!--This file is created by l10nUtil.js. Do not edit manually.-->
<grit-part>
<!-- Newtork section. -->
<!-- Network section. -->
<message name="IDS_OS_SETTINGS_TAG_NETWORK_SETTINGS" desc="Text for search result item which, when clicked, navigates the user to network settings. Alternate phrase for: 'Internet'">
Network
</message>
@@ -15,15 +15,12 @@
<message name="IDS_OS_SETTINGS_TAG_ETHERNET_CONFIGURE" desc="Text for search result item which, when clicked, navigates the user to Ethernet settings, with a button to configure security preferences.">
Configure Ethernet
</message>
<message name="IDS_OS_SETTINGS_TAG_WIFI" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings. Alternate phrase for: 'Wireless', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_WIFI" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings. Alternate phrase for: 'Wireless'">
Wi-Fi networks
</message>
<message name="IDS_OS_SETTINGS_TAG_WIFI_ALT1" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings. Alternate phrase for: 'Wi-Fi networks', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_WIFI_ALT1" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings. Alternate phrase for: 'Wi-Fi networks'">
Wireless
</message>
<message name="IDS_OS_SETTINGS_TAG_WIFI_ALT2" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings. Alternate phrase for: 'Wi-Fi networks', 'Wireless'">
Connectivity
</message>
<message name="IDS_OS_SETTINGS_TAG_KNOWN_NETWORKS" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings with saved (i.e., known) networks. Alternate phrase for: 'Saved Wi-Fi networks', 'Preferred Wi-Fi networks'">
Known Wi-Fi networks
</message>
@@ -57,24 +54,21 @@
<message name="IDS_OS_SETTINGS_TAG_DISCONNECT_WIFI" desc="Text for search result item which, when clicked, navigates the user to network settings for currently-connected network.">
Disconnect Wi-Fi network
</message>
<message name="IDS_OS_SETTINGS_TAG_WIFI_CONFIGURE" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi network settings, with a button to configure security preferences.">
Configure Wi-Fi
<message name="IDS_OS_SETTINGS_TAG_ADD_WIFI" desc="Text for search result item which, when clicked, navigates the user to Wi-Fi settings, with a button to add a new Wi-Fi network by manually typing the network's SSID and, if aplicable, password.">
Add Wi-Fi
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Mobile', 'LTE', 'Wireless', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_CELLULAR" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Mobile', 'LTE', 'Wireless'">
Cellular
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT1" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'LTE', 'Wireless', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT1" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'LTE', 'Wireless'">
Mobile
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT2" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'Mobile', 'Wireless', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT2" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'Mobile', 'Wireless'">
LTE
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT3" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'Mobile', 'LTE', 'Connectivity'">
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT3" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'Mobile', 'LTE'">
Wireless
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ALT4" desc="Text for search result item which, when clicked, navigates the user to cellular network settings (e.g., LTE). Alternate phrase for: 'Cellular', 'Mobile', 'LTE', 'Wireless'">
Connectivity
</message>
<message name="IDS_OS_SETTINGS_TAG_CELLULAR_ROAMING" desc="Text for search result item which, when clicked, navigates the user to Cellular network settings, with a toggle to enable/disable mobile roaming.">
Cellular roaming
</message>
@@ -199,36 +193,24 @@
</message>
<!-- MultiDevice section. -->
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Better Together', 'Multi-device', 'Phone'">
Connected devices settings
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Phone'">
Connected devices
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_ALT1" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Connected devices settings', 'Multi-device', 'Phone'">
Better Together
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_ALT2" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Connected devices settings', 'Better Together', 'Phone'">
Multi-device
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_ALT3" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Connected devices settings', 'Better Together', 'Multi-device'">
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_ALT1" desc="Text for search result item which, when clicked, navigates the user to multi-device settings (connects Android phone to Bravebook). Alternate phrase for: 'Connected devices'">
Phone
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK" desc="Text for search result item which, when clicked, navigates the user to Smart Lock settings (unlock Bravebook with Android phone). Alternate phrase for: 'EasyUnlock'">
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK" desc="Text for search result item which, when clicked, navigates the user to Smart Lock settings (unlock Bravebook with Android phone).">
Smart Lock
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK_ALT1" desc="Text for search result item which, when clicked, navigates the user to Smart Lock settings (unlock Bravebook with Android phone). Alternate phrase for: 'Smart Lock settings'">
EasyUnlock
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_MESSAGES" desc="Text for search result item which, when clicked, navigates the user to Messages settings (sync SMS between Bravebook and Android phone). Alternate phrase for: 'Android messages'">
Messages settings
Messages
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_MESSAGES_ALT1" desc="Text for search result item which, when clicked, navigates the user to Messages settings (sync SMS between Bravebook and Android phone). Alternate phrase for: 'Messages settings'">
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_MESSAGES_ALT1" desc="Text for search result item which, when clicked, navigates the user to Messages settings (sync SMS between Bravebook and Android phone). Alternate phrase for: 'Messages'">
Android messages
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK_OPTIONS" desc="Text for search result item which, when clicked, navigates the user to Smart Lock screen lock settings (for signing into Bravebook with Android phone). Alternate phrase for: 'EasyUnlock screen lock'">
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK_OPTIONS" desc="Text for search result item which, when clicked, navigates the user to Smart Lock screen lock settings (for signing into Bravebook with Android phone).">
Smart Lock screen lock options
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SMART_LOCK_OPTIONS_ALT1" desc="Text for search result item which, when clicked, navigates the user to Smart Lock screen lock settings (for signing into Bravebook with Android phone). Alternate phrase for: 'Smart Lock screen lock options'">
EasyUnlock screen lock
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_FORGET" desc="Text for search result item which, when clicked, navigates the user to multi-device settings, which an option to disconnect the currently-connected Android phone. Alternate phrase for: 'Disconnect connected phone'">
Forget connected phone
</message>
@@ -236,8 +218,24 @@
Disconnect connected phone
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_SET_UP" desc="Text for search result item which, when clicked, navigates the user to connected devices settings, with a button to set up the feature.">
Connected devices setup
Set up connected devices
</message>
<message name="IDS_OS_SETTINGS_TAG_MULTIDEVICE_NEARBY_SHARE" desc="Text for search result item which, when clicked, navigates the user to connected multi-device settings Nearby Share.">
Nearby Share
</message>
<message name="IDS_OS_SETTINGS_TAG_NEARBY_SHARE_TURN_ON" desc="Text for search result item which, when clicked, navigates the user to Nearby Share settings. Alternate phrase for: 'Enable Nearby Share'">
Turn on Nearby Share
</message>
<message name="IDS_OS_SETTINGS_TAG_NEARBY_SHARE_TURN_ON_ALT1" desc="Text for search result item which, when clicked, navigates the user to Nearby Share settings. Alternate phrase for: 'Turn on Nearby Share'">
Enable Nearby Share
</message>
<message name="IDS_OS_SETTINGS_TAG_NEARBY_SHARE_TURN_OFF" desc="Text for search result item which, when clicked, navigates the user to Nearby Share settings. Alternate phrase for: 'Disable Nearby Share'">
Turn off Nearby Share
</message>
<message name="IDS_OS_SETTINGS_TAG_NEARBY_SHARE_TURN_OFF_ALT1" desc="Text for search result item which, when clicked, navigates the user to Nearby Share settings. Alternate phrase for: 'Turn off Nearby Share'">
Disable Nearby Share
</message>
<!-- Profiles section. -->
<message name="IDS_OS_SETTINGS_TAG_PEOPLE" desc="Text for search result item which, when clicked, navigates the user to profiles settings.">
@@ -264,8 +262,11 @@
<message name="IDS_OS_SETTINGS_TAG_LOCK_SCREEN_WHEN_WAKING_ALT1" desc="Text for search result item which, when clicked, navigates the user to lock screen settings. Alternate phrase for: 'Lock screen settings'">
Login screen
</message>
<message name="IDS_OS_SETTINGS_TAG_LOCK_SCREEN_PIN_OR_PASSWORD" desc="Text for search result item which, when clicked, navigates the user to lock screen settings, with an option to determine whether the device can be unlocked with a PIN.">
PIN lock screen settings
<message name="IDS_OS_SETTINGS_TAG_LOCK_SCREEN_PIN_OR_PASSWORD" desc="Text for search result item which, when clicked, navigates the user to lock screen settings, with an option to determine whether the device can be unlocked with a PIN or a password. Alternate phrase for: 'Screen lock password'">
Screen lock PIN
</message>
<message name="IDS_OS_SETTINGS_TAG_LOCK_SCREEN_PIN_OR_PASSWORD_ALT1" desc="Text for search result item which, when clicked, navigates the user to lock screen settings, with an option to determine whether the device can be unlocked with a PIN or a password. Alternate phrase for: 'Screen lock PIN'">
Screen lock password
</message>
<message name="IDS_OS_SETTINGS_TAG_GUEST_BROWSING" desc="Text for search result item which, when clicked, navigates the user to account settings, with a toggle to enable/disable guest browsing.">
Guest browsing
@@ -333,6 +334,27 @@
<message name="IDS_OS_SETTINGS_TAG_PARENTAL_CONTROLS_ALT2" desc="Text for search result item which, when clicked, navigates the user to parental control settings. Alternate phrase for: 'Parental controls', 'Child accounts'">
Family Link
</message>
<message name="IDS_OS_SETTINGS_TAG_SYNC_AND_GOOGLE_SERVICES" desc="Text for search result item which, when clicked, navigates the user to settings for Sync (syncs data between multiple Bravebooks) and Brave Services.">
Sync and Brave services
</message>
<message name="IDS_OS_SETTINGS_TAG_SYNC_ENCRYPTION_OPTIONS" desc="Text for search result item which, when clicked, navigates the user to sync settings, with an option to choose whether synced data is encrypted with the user's Brave account password or with a custom password chosen by the user. Alternate phrase for: 'Sync encryption password'">
Sync encryption options
</message>
<message name="IDS_OS_SETTINGS_TAG_SYNC_ENCRYPTION_OPTIONS_ALT1" desc="Text for search result item which, when clicked, navigates the user to sync settings, with an option to choose whether synced data is encrypted with the user's Brave account password or with a custom password chosen by the user. Alternate phrase for: 'Sync encryption options'">
Sync encryption password
</message>
<message name="IDS_OS_SETTINGS_TAG_SYNC_MANAGEMENT" desc="Text for search result item which, when clicked, navigates the user to sync settings, with the option to decide which types of data are synced via Brave Sync.">
Sync management
</message>
<message name="IDS_OS_SETTINGS_TAG_AUTOCOMPLETE_SEARCHES_AND_URLS" desc="Text for search result item which, when clicked, navigates the user to Brave services settings, with a toggle to enable/disable a feature which autocompletes user searches and URLs using browser history and cookies.">
Autocomplete searches and URLs
</message>
<message name="IDS_OS_SETTINGS_TAG_MAKE_SEARCHES_AND_BROWSER_BETTER" desc="Text for search result item which, when clicked, navigates the user to Brave services settings, with a toggle to enable/disable a feature which sends URLs of pages the user has visited to Brave, which helps to improve search/browsing results.">
Send URLs of pages you visit to Brave
</message>
<message name="IDS_OS_SETTINGS_TAG_GOOGLE_DRIVE_SEARCH_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to Brave services settings, with a toggle to enable/disable a feature which provides suggestions to visit Google Drive items when the user types in the address bar.">
Google Drive search suggestions
</message>
<!-- Device section. -->
<message name="IDS_OS_SETTINGS_TAG_DEVICE" desc="Text for search result item which, when clicked, navigates the user to device settings.">
@@ -401,11 +423,17 @@
<message name="IDS_OS_SETTINGS_TAG_POWER" desc="Text for search result item which, when clicked, navigates the user to power settings.">
Power
</message>
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior. Alternate phrase for: 'Sleep settings'">
Idle power
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE_WHILE_CHARGING" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior while charging. Alternate phrase for: 'Sleep while charging'">
Idle power while charging
</message>
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE_ALT1" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior. Alternate phrase for: 'Idle power settings'">
Sleep settings
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE_WHILE_CHARGING_ALT1" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior while charging. Alternate phrase for: 'Idle power while charging'">
Sleep while charging
</message>
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE_WHILE_ON_BATTERY" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior while on the device is being powered by its battery. Alternate phrase for: 'Sleep while on battery'">
Idle power on battery
</message>
<message name="IDS_OS_SETTINGS_TAG_POWER_IDLE_WHILE_ON_BATTERY_ALT1" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set the idle (i.e., sleep) behavior while on the device is being powered by its battery. Alternate phrase for: 'Idle power on battery'">
Sleep while on battery
</message>
<message name="IDS_OS_SETTINGS_TAG_TOUCHPAD" desc="Text for search result item which, when clicked, navigates the user to touchpad settings. Alternate phrase for: 'Trackpad'">
Touchpad
@@ -485,14 +513,44 @@
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ARRANGEMENT_ALT2" desc="Text for search result item which, when clicked, navigates the user to display settings, with the ability to rearrange screen positioning. Alternate phrase for: 'Display arrangement', 'Monitor arrangement'">
Screen arrangement
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ORIENTATION" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen orientation. Alternate phrase for: 'Monitor orientation', 'Screen orientation'">
<message name="IDS_OS_SETTINGS_TAG_MIRRORING" desc="Text for search result item which, when clicked, navigates the user to display settings, with a checkbox to enable/disable display mirroring.">
Display mirroring
</message>
<message name="IDS_OS_SETTINGS_TAG_UNIFIED_DESKTOP" desc="Text for search result item which, when clicked, navigates the user to display settings, with a toggle to enable/disable Unified Desktop mode, which allows windows to span multiple displays.">
Allow windows to span displays
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ORIENTATION" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select display orientation (normal, or rotated 90/180/270 degrees). Alternate phrase for 'Display rotation'">
Display orientation
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ORIENTATION_ALT1" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen orientation. Alternate phrase for: 'Display orientation', 'Screen orientation'">
Monitor orientation
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ORIENTATION_ALT1" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select display orientation (normal, or rotated 90/180/270 degrees). Alternate phrase for 'Display orientation'">
Display rotation
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_ORIENTATION_ALT2" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen orientation. Alternate phrase for: 'Display orientation', 'Monitor orientation'">
Screen orientation
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_AMBIENT_COLORS" desc="Text for search result item which, when clicked, navigates the user to display settings, with a toggle to enable/disable ambient colors, which adapts the screen color to match the environment.">
Ambient colors
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_TOUCHSCREEN_CALIBRATION" desc="Text for search result item which, when clicked, navigates the user to display settings, with a link to open the touchscreen calibration UI.">
Touchscreen calibration
</message>
<message name="IDS_OS_SETTINGS_TAG_NIGHT_LIGHT_COLOR_TEMPERATURE" desc="Text for search result item which, when clicked, navigates the user to display settings, with a slider to increase/decrease the 'color temperature' for Night Light, which makes it easier to look at the screen in dim light.">
Night Light color temperature
</message>
<message name="IDS_OS_SETTINGS_TAG_DOWNLOADED_CONTENT" desc="Text for search result item which, when clicked, navigates the user to downloaded content. Alternate phrase for: 'DLC'">
Downloaded Content
</message>
<message name="IDS_OS_SETTINGS_TAG_DOWNLOADED_CONTENT_ALT1" desc="Text for search result item which, when clicked, navigates the user to downloaded content. Alternate phrase for: 'Downloaded Content'">
DLC
</message>
<message name="IDS_OS_SETTINGS_TAG_REMOVE_DOWNLOADED_CONTENT" desc="Text for search result item which, when clicked, navigates the user to downloaded content subpage where they can choose to delete a DLC from the device. Alternate phrase for: 'Delete Downloaded Content', 'Remove DLC', 'Delete DLC'">
Remove Downloaded Content
</message>
<message name="IDS_OS_SETTINGS_TAG_REMOVE_DOWNLOADED_CONTENT_ALT1" desc="Text for search result item which, when clicked, navigates the user to downloaded content subpage where they can choose to delete a DLC from the device. Alternate phrase for: 'Delete Downloaded Content', 'Remove Downloaded Content', 'Delete DLC'">
Remove DLC
</message>
<message name="IDS_OS_SETTINGS_TAG_REMOVE_DOWNLOADED_CONTENT_ALT2" desc="Text for search result item which, when clicked, navigates the user to downloaded content subpage where they can choose to delete a DLC from the device. Alternate phrase for: 'Remove Downloaded Content', 'Remove DLC', 'Delete DLC'">
Delete Downloaded Content
</message>
<message name="IDS_OS_SETTINGS_TAG_REMOVE_DOWNLOADED_CONTENT_ALT3" desc="Text for search result item which, when clicked, navigates the user to downloaded content subpage where they can choose to delete a DLC from the device. Alternate phrase for: 'Delete Downloaded Content', 'Remove DLC', 'Remove Downloaded Content'">
Delete DLC
</message>
<message name="IDS_OS_SETTINGS_TAG_EXTERNAL_STORAGE" desc="Text for search result item which, when clicked, navigates the user to external storage preferences.">
External storage preferences
@@ -515,7 +573,7 @@
<message name="IDS_OS_SETTINGS_TAG_POWER_SLEEP_COVER_CLOSED_ALT2" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to set whether the device sleeps when the lid is closed. Alternate phrase for: 'Sleep when cover is closed', 'Sleep when laptop is closed'">
Sleep when lid is closed
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_RESOLUTION" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen orientation. Alternate phrase for: 'Monitor orientation', 'Screen orientation'">
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_RESOLUTION" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen resolution. Alternate phrase for: 'Monitor resolution', 'Screen resolution'">
Display resolution
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_RESOLUTION_ALT1" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen resolution. Alternate phrase for: 'Display resolution', 'Screen resolution'">
@@ -524,7 +582,7 @@
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_RESOLUTION_ALT2" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen resolution. Alternate phrase for: 'Display resolution', 'Monitor resolution'">
Screen resolution
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_REFRESH_RATE" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen orientation. Alternate phrase for: 'Monitor orientation', 'Screen orientation'">
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_REFRESH_RATE" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen refresh rate. Alternate phrase for: 'Monitor refresh rate', 'Screen refresh rate'">
Display refresh rate
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_REFRESH_RATE_ALT1" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen refresh rate. Alternate phrase for: 'Display refresh rate', 'Screen refresh rate'">
@@ -533,6 +591,9 @@
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_REFRESH_RATE_ALT2" desc="Text for search result item which, when clicked, navigates the user to display settings, with a dropdown to select screen refresh rate. Alternate phrase for: 'Display refresh rate', 'Monitor refresh rate'">
Screen refresh rate
</message>
<message name="IDS_OS_SETTINGS_TAG_DISPLAY_OVERSCAN" desc="Text for search result item which, when clicked, navigates the user to display settings, with an option to adjust monitor overscan.">
Overscan
</message>
<!-- Personalization section. -->
<message name="IDS_OS_SETTINGS_TAG_PERSONALIZATION" desc="Text for search result item which, when clicked, navigates the user to personalization settings. Alternate phrase for: 'Customization', 'Personal'">
@@ -627,6 +688,9 @@
<message name="IDS_OS_SETTINGS_TAG_ASSISTANT_TURN_ON_ALT1" desc="Text for search result item which, when clicked, navigates the user to Brave Assistant settings, with an option to turn functionality on. Alternate phrase for: 'Turn on Brave Assistant'">
Enable Brave Assistant
</message>
<message name="IDS_OS_SETTINGS_TAG_ASSISTANT_TRAIN_VOICE_MODEL" desc="Text for search result item which, when clicked, navigates the user to Brave Assistant settings, with an option to train a voice model to listen for commands such as 'Okay Brave' or 'Hey Brave'">
Train Brave Assistant voice model
</message>
<!-- Apps section. -->
<message name="IDS_OS_SETTINGS_TAG_APPS" desc="Text for search result item which, when clicked, navigates the user to apps settings.">
@@ -703,11 +767,11 @@
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_REMOVE_ALT5" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to delete the Linux installation on Bravebook. Alternate phrase for: 'Remove Linux', 'Remove Crostini', 'Uninstall Linux', 'Uninstall Crostini', 'Delete Linux'">
Delete Crostini
</message>
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_SETUP" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to set up Linux integration with Bravebook. Alternate phrase for: 'Crostini setup'">
Linux setup
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_SETUP" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to set up Linux integration with Bravebook. Alternate phrase for: 'Set up Crostini'">
Set up Linux
</message>
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_SETUP_ALT1" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to set up Linux integration with Bravebook. Alternate phrase for: 'Linux setup'">
Crostini setup
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_SETUP_ALT1" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to set up Linux integration with Bravebook. Alternate phrase for: 'Set up Linux'">
Set up Crostini
</message>
<message name="IDS_OS_SETTINGS_TAG_CROSTINI_BACKUP_RESTORE" desc="Text for search result item which, when clicked, navigates the user to Linux (a.k.a. Crostini) settings, with an option to back up and restore Linux apps/files. Alternate phrase for: 'Crostini backup'">
Linux backup and restore
@@ -773,8 +837,8 @@
<message name="IDS_OS_SETTINGS_TAG_PRIVACY" desc="Text for search result item which, when clicked, navigates the user to privacy settings.">
Privacy settings
</message>
<message name="IDS_OS_SETTINGS_TAG_PRIVACY_VERIFIED_ACCESS" desc="Text for search result item which, when clicked, navigates the user to pirvacy settings, with a toggle to enable/disable verified access.">
Privacy verified access
<message name="IDS_OS_SETTINGS_TAG_PRIVACY_VERIFIED_ACCESS" desc="Text for search result item which, when clicked, navigates the user to privacy settings, with a toggle to enable/disable verified access.">
Verified access
</message>
<message name="IDS_OS_SETTINGS_TAG_PRIVACY_WIFI_SLEEP" desc="Text for search result item which, when clicked, navigates the user to privacy settings, with a toggle to enable/disable allowing Wi-Fi to remain active while Bravebook is sleeping. Alternate phrase for: 'Keep Wi-Fi on while idle'">
Keep Wi-Fi on during sleep
@@ -791,7 +855,7 @@
<!-- Languages and Input section. -->
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_INPUT" desc="Text for search result item which, when clicked, navigates the user to languages and input settings.">
Languages and input settings
Languages and input
</message>
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_INPUT_ADD_LANGUAGE" desc="Text for search result item which, when clicked, navigates the user to languages and input settings, with an option to add a new language.">
Add languages
@@ -811,6 +875,9 @@
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_PERSONAL_INFORMATION_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to smart input settings, which with a toggle to enable/disable showing personal information suggestions.">
Personal information suggestions
</message>
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_EMOJI_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to smart input settings, with a section having a toggle to enable/disable showing emoji suggestions after an user types a word.">
Emoji suggestions
</message>
<!-- Files section. -->
<message name="IDS_OS_SETTINGS_TAG_FILES" desc="Text for search result item which, when clicked, navigates the user to files settings.">
@@ -827,24 +894,18 @@
</message>
<!-- Printing section. -->
<message name="IDS_OS_SETTINGS_TAG_PRINTING" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printing', 'CUPS'">
Printer
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ALT1" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printer settings', 'CUPS'">
<message name="IDS_OS_SETTINGS_TAG_PRINTING" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printers', 'CUPS'">
Printing
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ALT2" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printer settings', 'Printing'">
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ALT1" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printing', 'CUPS'">
Printers
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ALT2" desc="Text for search result item which, when clicked, navigates the user to printer settings for CUPS printers (a.k.a. those that can use the Unix protocol). Alternate phrase for: 'Printers', 'Printing'">
CUPS
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ADD_PRINTER" desc="Text for search result item which, when clicked, navigates the user to printer settings, with the option to add a printer. Alternate phrase for: 'Install printer', 'Setup printer'">
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ADD_PRINTER" desc="Text for search result item which, when clicked, navigates the user to printer settings, with the option to add a printer.">
Add printer
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ADD_PRINTER_ALT1" desc="Text for search result item which, when clicked, navigates the user to printer settings, with the option to add a printer. Alternate phrase for: 'Add printer', 'Setup printer'">
Install printer
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_ADD_PRINTER_ALT2" desc="Text for search result item which, when clicked, navigates the user to printer settings, with the option to add a printer. Alternate phrase for: 'Add printer', 'Install printer'">
Setup printer
</message>
<message name="IDS_OS_SETTINGS_TAG_PRINTING_SAVED_PRINTERS" desc="Text for search result item which, when clicked, navigates the user to printer settings, with the option to edit saved printers.">
Saved printers
</message>
@@ -883,11 +944,17 @@
<message name="IDS_OS_SETTINGS_TAG_A11y_CHROMEVOX_ALT1" desc="Text for search result item which, when clicked, navigates the user to accessibility settings, with a toggle to enable/disable BraveVox (spoken feedback). Alternate phrase for: 'BraveVox (spoken feedback)'">
Screen reader
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_CURSOR_COLOR" desc="Text for search result item which, when clicked, navigates the user to accessibility settings, with a toggle to enable/disable custom cursor colors.">
Cursor color
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_SELECT_TO_SPEAK" desc="Text for search result item which, when clicked, navigates the user to accessibility settings, with a toggle to enable/disable select-to-speak (hearing text read aloud after it is selected).">
Select-to-speak
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_TEXT_TO_SPEECH" desc="Text for search result item which, when clicked, navigates the user to text-to-speech voice accessibility settings.">
Text-to-speech voice settings
<message name="IDS_OS_SETTINGS_TAG_A11Y_TEXT_TO_SPEECH" desc="Text for search result item which, when clicked, navigates the user to text-to-speech voice accessibility settings. Alternate phrase for 'TTS'">
Text-to-speech
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_TEXT_TO_SPEECH_ALT1" desc="Text for search result item which, when clicked, navigates the user to text-to-speech voice accessibility settings. Alternate phrase for 'Text-to-speech'">
TTS
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_SPEECH_RATE" desc="Text for search result item which, when clicked, navigates the user to text-to-speech voice accessibility settings, with a slider to set the speech rate.">
Text-to-speech rate
@@ -958,6 +1025,9 @@
<message name="IDS_OS_SETTINGS_TAG_A11Y_CAPTIONS" desc="Text for search result item which, when clicked, navigates the user to accessibility captions settings.">
Captions
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_LIVE_CAPTIONS" desc="Text for a search result item which, when clicked, navigates the user to accessibility settings, with a toggle to enable/disable live captions.">
Live Captions
</message>
<message name="IDS_OS_SETTINGS_TAG_A11Y_ENABLE_SWITCH_ACCESS" desc="Text for search result item which, when clicked, navigates the user to accessibility settings, with a toggle to enable/disable switch access, which allows users to control the computer with just one or two switches.">
Switch access
</message>
@@ -989,19 +1059,31 @@
</message>
<!-- About Chrome OS section. -->
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS" desc="Text for search result item which, when clicked, navigates the user to about Chrome OS settings, which gives information about the current Chrome OS version.">
About Chrome OS
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS_VERSION" desc="Text for search result item which, when clicked, navigates the user to about Chrome OS settings, which gives information about the current Chrome OS version.">
Chrome OS version
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS_DETAILED_BUILD" desc="Text for search result item which, when clicked, navigates the user to detailed build information settings. Alternate phrase for: 'Device version'">
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS_DETAILED_BUILD" desc="Text for search result item which, when clicked, navigates the user to detailed build information settings.">
Detailed build information
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS_DETAILED_BUILD_ALT1" desc="Text for search result item which, when clicked, navigates the user to detailed build information settings. Alternate phrase for: 'Detailed build information'">
Device version
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_CHROME_OS_CHANNEL" desc="Text for search result item which, when clicked, navigates the user to detailed build information settings, with a button to change to another channel (stable vs. beta vs. dev).">
Change channel
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_OS_UPDATE" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a section to check for the latest OS update.">
Check for update
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_RELEASE_NOTES" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link which takes users to a page showing what is new in the latest version of the OS. Alternate phrase for: 'Release notes'">
See what's new
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_RELEASE_NOTES_ALT1" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link which takes users to a page showing what is new in the latest version of the OS. Alternate phrase for: 'See what's new'">
Release notes
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_HELP" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link which opens the 'Help' app.">
Help
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_REPORT_ISSUE" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link which opens the 'Send feedback to Brave' app. Alternate phrase for: 'Report a bug'">
Report an issue
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_REPORT_ISSUE_ALT1" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link which opens the 'Send feedback to Brave' app. Alternate phrase for: 'Report an issue'">
Report a bug
</message>
<message name="IDS_OS_SETTINGS_TAG_ABOUT_TERMS_OF_SERVICE" desc="Text for search result item which, when clicked, navigates the user to 'About Chrome OS' settings, with a link to the Terms of Service.">
Terms of Service
</message>
</grit-part>
+197 -27
View File
@@ -24,12 +24,6 @@
<message name="IDS_OS_SEARCH_RESULT_ROW_A11Y_RESULT_SELECTED" desc="BraveVox alert to indicate the position number of a selected result in a list of search results and the selected result text itself, and that the user can press enter to navigate to section described by the search result.">
Search result <ph name="LIST_POSITION">$1<ex>1</ex></ph> of <ph name="LIST_SIZE">$2<ex>2</ex></ph>: <ph name="SEARCH_RESULT_TEXT">$3<ex>Network Settings</ex></ph>. Press Enter to navigate to section.
</message>
<message name="IDS_OS_SEARCH_BOX_A11Y_ONE_RESULT" desc="BraveVox alert to indicate the that one search result has been found.">
Displaying 1 search result for <ph name="QUERY">$1<ex>Wi-Fi</ex>.</ph>
</message>
<message name="IDS_OS_SEARCH_BOX_A11Y_RESULT_COUNT" desc="BraveVox alert to indicate the number of settings search results found.">
Displaying <ph name="NUMBER">$1<ex>1</ex></ph> search results for <ph name="QUERY">$2<ex>Wi-Fi</ex>.</ph>
</message>
<!-- About (OS Settings) -->
<message name="IDS_OS_SETTINGS_ABOUT_PAGE_BUILD_DETAILS" desc="Label of the row button that clicks into Build details">
@@ -162,7 +156,7 @@
This device stopped getting automatic software and security updates in <ph name="MONTH_AND_YEAR">$1<ex>September 2020</ex></ph>. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$2<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_ABOUT_PAGE_LAST_UPDATE_MESSAGE" desc="Message shown on the top level about page to inform the user that this device will no longer receive latest software updates.">
This is the last automatic software and security update for this <ph name="DEVICE_TYPE">$1<ex>Bravebook</ex></ph>. To get future updates, upgrade to a newer model. &lt;a target="_blank" href="<ph name="URL">$2<ex>https://google.com/</ex></ph>"&gt;Learn more&lt;/a&gt;
This is the last automatic software and security update for this <ph name="DEVICE_TYPE">$1<ex>Bravebook</ex></ph>. To get future updates, upgrade to a newer model. &lt;a target="_blank" href="<ph name="URL">$2<ex>https://google.com/</ex></ph>"&gt;Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<!-- Profiles (OS settings) -->
@@ -264,6 +258,9 @@
<message name="IDS_SETTINGS_LANGUAGES_MANAGE_INPUT_METHODS_TITLE" desc="Name of the settings sub-page which allows enabling and disabling input methods.">
Manage input methods
</message>
<message name="IDS_SETTINGS_LANGUAGES_INPUT_METHOD_OPTIONS_TITLE" translateable="false" desc="Name of the settings sub-page which allows changing input method options.">
Input method options
</message>
<message name="IDS_SETTINGS_LANGUAGES_SHOW_IME_MENU" desc="The label for the toggle button controlling showing the IME menu in the shelf.">
Show input options in the shelf
</message>
@@ -286,14 +283,97 @@
Personal information suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_PERSONAL_INFO_DESCRIPTION" desc="The description for personal information suggestion section.">
Personal information suggestions help you write faster by suggesting your name, address or phone number when you type some specific words. Only you see your own private, personalized suggestions for your account.
Personal information suggestions help you write faster with suggestions such as your name, address or phone number. Only you see your own private, personalized suggestions for your account.
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_SHOW_PERSONAL_INFO" desc="The label for the toggle button controlling showing personal information suggestions.">
Show input personal information suggestions
Show personal information suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_MANAGE_PERSONAL_INFO" desc="The label for opening Brave's browser settings page for managing personal addresses">
Manage personal information
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_TITLE" desc="The label for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
Emoji suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_DESCRIPTION" desc="The description for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
Get emoji suggestions based on what you are typing
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_SHOW_EMOJI_SUGGESTION" desc="The label for the toggle button controlling showing emoji suggestions (when an user types a word, some emojis might be suggested for the user to insert after).">
Show emoji suggestions
</message>
<!-- Input Method Options Section -->
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_BASIC" desc="The label for the section in input method options page containing basic options.">
Basics
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ADVANCED" desc="The label for the section in input method options page containing advanced options.">
Advanced
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PHYSICAL_KEYBOARD" desc="The label for the section in input method options page containing physical keyboard options.">
Physical keyboard
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_VIRTUAL_KEYBOARD" desc="The label for the section in input method options page containing the virtual keyboard options.">
On-screen keyboard
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ENABLE_DOUBLE_SPACE_PERIOD" desc="The label for the input method option to enable double-space to type period (when an user types two consecutive space, it outputs a period).">
Double-space to type period
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ENABLE_GESTURE_TYPING" desc="The label for the input method option to enable gesture typing.">
Enable glide typing
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ENABLE_PREDICTION" desc="The label for the input method option to enable next-word prediction.">
Enable next-word prediction
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ENABLE_SOUND_ON_KEYPRESS" desc="The label for the input method option to enable sound on keypress.">
Sound on keypress
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_ENABLE_CAPITALIZATION" desc="The label for the input method option to enable auto-capitalization.">
Auto-capitalization
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_AUTO_CORRECTION" desc="The label for the input method option to enable auto correction.">
Auto-correction
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_XKB_LAYOUT" desc="The label for the input method option to let the users choose their keyboard layout.">
Keyboard layout
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_EDIT_USER_DICT" desc="The label for the input method option to let the users edit their personal dictionary.">
Edit dictionary entries
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_CHINESE_PUNCTUATION" desc="The label for the pinyin input method option for whether to output full-width or half-with punctuation.">
Initial punctuation width is Full
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_DEFAULT_CHINESE" desc="The label for the pinyin input method option for whether to use Chinese or English as the default input language.">
Initial input language is Chinese
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_ENABLE_FUZZY" desc="The label for the pinyin input method option to enable fuzzy-pinyin.">
Enable Fuzzy-Pinyin mode
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_ENABLE_LOWER_PAGING" desc="The label for the pinyin input method option for whether to use , and . for paging candidates.">
Use <ph name="COMMA">,</ph> and <ph name="PERIOD">.</ph> keys to page a candidate list
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_ENABLE_UPPER_PAGING" desc="The label for the pinyin input method option for whether to use - and = for paging candidates.">
Use <ph name="MINUS">-</ph> and <ph name="EQUAL">=</ph> keys to page a candidate list
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_PINYIN_FULL_WIDTH_CHARACTER" desc="The label for the pinyin input method option for whether to output latin letters and numbers as full-width or half-width character.">
Initial character width is Full
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_AUTO_CORRECTION_OFF" desc="The label for the choice to disable auto correction.">
Off
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_AUTO_CORRECTION_MODEST" desc="The label for the choice to use modest auto correction.">
Modest
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_AUTO_CORRECTION_AGGRESSIVE" desc="The label for the choice to use aggressive auto correction.">
Aggressive
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_KEYBOARD_US" desc="The label for the choice to use US keyboard.">
US
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_KEYBOARD_DVORAK" desc="The label for the choice to use Dvorak keyboard.">
Dvorak
</message>
<message name="IDS_SETTINGS_INPUT_METHOD_OPTIONS_KEYBOARD_COLEMAK" desc="The label for the choice to use Colemak keyboard.">
Colemak
</message>
<!-- Device Page (OS Settings) -->
<message name="IDS_OS_SETTINGS_TOUCHPAD_REVERSE_SCROLL_LABEL">
@@ -485,6 +565,27 @@
<message name="IDS_SETTINGS_LARGE_MOUSE_CURSOR_SIZE_LARGE_LABEL" desc="Label in the slider which indicates that this side makes the cursor large.">
Large
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_ENABLED_LABEL" desc="Label for a checkbox which enables selecting custom cursor colors.">
Custom cursor color
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_OPTIONS_LABEL" desc="Label for a drop-down menu of cursor color options for custom cursor colors.">
Color
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_RED" desc="Label for a cursor color option which colors the cursor red.">
Red
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_ORANGE" desc="Label for a cursor color option which colors the cursor orange.">
Orange
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_GREEN" desc="Label for a cursor color option which colors the cursor green.">
Green
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_BLUE" desc="Label for a cursor color option which colors the cursor blue.">
Blue
</message>
<message name="IDS_SETTINGS_CURSOR_COLOR_PURPLE" desc="Label for a cursor color option which colors the cursor purple.">
Purple
</message>
<message name="IDS_SETTINGS_HIGH_CONTRAST_LABEL" desc="Label for checkbox which enables high-contrast UI.">
Use high contrast mode
</message>
@@ -794,11 +895,12 @@
Manage your signed-in accounts. Websites, apps, and extensions in Brave and Google Play may use these accounts to customize your experience, depending on permissions. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_DESCRIPTION" desc="Description of the Account Manager Settings page for child users. Shown just below the title of the page.">
Add a school account or manage child accounts here. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
Manage your accounts here. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_DESCRIPTION_2" desc="Description of the Account Manager Settings page for child users. Shown just below the title of the page.">
Manage your accounts here. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>&lt;br&gt;&lt;br&gt;
Bookmarks, passwords, and other browser data are synced with the primary account.&lt;br&gt;&lt;br&gt;
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_FIRST_MESSAGE" desc="Description of the Account Manager Settings page for child users. Shown just below the link to learn more about account management.">
Bookmarks, passwords, and other browser data are synced with the primary account.
</message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_SECOND_MESSAGE" desc="Description of the Account Manager Settings page for child users. Shown just below the link to learn more about account management.">
Adding a school account enables easy sign-in to websites and extensions as a student while still operating under parental controls.
</message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_LIST_HEADER" desc="List header for Account List in Account Manager Settings page.">
@@ -986,8 +1088,11 @@
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_PORT_DIALOG_TITLE" desc="Title for the add port dialog box.">
Add port number
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_PORT_DIALOG_LABEL" desc="Label for the text input of an optional label.">
Label (Optional)
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_PORT_DIALOG_PORT_NUMBER_LABEL" desc="Label for the text input of the port number in the add port dialog. This dialog is for when a user wants to add a new port that network traffic should be redirected by into Crostini.">
Port number
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_PORT_DIALOG_LABEL_LABEL" desc="Label for the text input of an optional label to attach to the port in the add port dialog. This dialog is for when a user wants to add a new port that network traffic should be redirected by into Crostini.">
Label (optional)
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_TCP" desc="Label for the TCP protocol when forwarding ports. The parentheses are for formatting reasons.">
(TCP)
@@ -996,7 +1101,10 @@
(UDP)
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_ERROR" desc="Description for the error when adding an invalid port.">
Error forwarding port
Port must be between 1024 and 65535
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ADD_EXISTING" desc="Description for the error when trying to add a port that already exists.">
Port forward already exists
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_REMOVE_ALL_PORTS" desc="Label for the button to deallocate all ports currently being forwarded in Crostini and clear the list of ports in the Crostini port forwarding settings page.">
Remove all ports
@@ -1004,6 +1112,9 @@
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_REMOVE_PORT" desc="Label for the button to deallocate a specified port and remove it from the list of ports in the Crostini port forwarding settings page.">
Remove port
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_ACTIVATE_PORT_ERROR" desc="The error message shown on a toast that appears when a request to activate a port for forwarding network traffic into Crostini fails.">
Error forwarding port
</message>
<message name="IDS_SETTINGS_CROSTINI_PORT_FORWARDING_TOGGLE_PORT_ARIA_LABEL" desc="The aria label for the toggle that controls the state of a port i.e. the text that screen readers will read out for the button.">
Activate port
</message>
@@ -1641,9 +1752,33 @@
<message name="IDS_SETTINGS_INTERNET_DETAIL" desc="Name of the settings page which displays network details.">
Network Details
</message>
<message name="IDS_SETTINGS_INTERNET_ETHERNET_DETAILS" desc="Name of the settings page which displays details about an Ethernet network.">
Ethernet details
</message>
<message name="IDS_SETTINGS_INTERNET_WIFI_DETAILS" desc="Name of the settings page which displays details about a Wi-Fi network.">
Wi-Fi details
</message>
<message name="IDS_SETTINGS_INTERNET_CELLULAR_DETAILS" desc="Name of the settings page which displays details about a cellular network (e.g., an LTE network).">
Cellular details
</message>
<message name="IDS_SETTINGS_INTERNET_INSTANT_TETHERING_DETAILS" desc="Name of the settings page which displays details about an Instant Tethering network (i.e., using a phone's internet through the Instant Tethering feature).">
Instant Tethering details
</message>
<message name="IDS_SETTINGS_INTERNET_VPN_DETAILS" desc="Name of the settings page which displays details about a VPN connection.">
VPN details
</message>
<message name="IDS_SETTINGS_INTERNET_WIFI_NETWORKS" desc="Name of the settings page which displays a list of Wi-Fi networks which the user can choose to connect to.">
Wi-Fi networks
</message>
<message name="IDS_SETTINGS_INTERNET_MOBILE_DATA_NETWORKS" desc="Name of the settings page which displays a list of mobile data networks which the user can choose to connect to.">
Mobile data networks
</message>
<message name="IDS_SETTINGS_INTERNET_DEVICE_ENABLING" desc="Settings &gt; Internet &gt; Message when a device (e.g a Cellular modem) is enabling.">
Enabling
</message>
<message name="IDS_SETTINGS_INTERNET_DEVICE_DISABLING" desc="Settings &gt; Internet &gt; Message when a Cellular modem is turning off (disabling).">
Turning off
</message>
<message name="IDS_SETTINGS_INTERNET_DEVICE_INITIALIZING" desc="Settings &gt; Internet &gt; Message when a device (e.g a Cellular modem) is initializing.">
Initializing
</message>
@@ -1746,6 +1881,9 @@
<message name="IDS_SETTINGS_INTERNET_NETWORK_IP_CONFIG_AUTO" desc="Settings &gt; Internet &gt; Network details: Label for the checkbox determining whether to automatically configure the network IP config.">
Configure IP address automatically
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_METERED" desc="Settings &gt; Internet &gt; Network details: Label for the toggle indicating whether a network is metered.">
Metered network
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_PREFER" desc="Settings &gt; Internet &gt; Network details: Label for the checkbox determining whether a network is preferred over other networks.">
Prefer this network
</message>
@@ -1773,8 +1911,17 @@
<message name="IDS_SETTINGS_INTERNET_NETWORK_SHARED" desc="Settings &gt; Internet &gt; Network details: Text to show when a network is shared.">
Other users of this device can use this network.
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_SYNCED_SHARED" desc="Settings &gt; Internet &gt; Network details: Text to show when a network is both synced to the users account and shared to all users on the device. Also notes that changes made by other users are not synced.">
Synced with other devices on your account. Other users of this device can use this network. Settings modified by other users will not be synced. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
<message name="IDS_SETTINGS_INTERNET_NETWORK_SHARED_OWNER" desc="Settings &gt; Internet &gt; Network details: Text to show when a network is shared and was configured by the current user.">
You are sharing this network with other users of this device.
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_SHARED_NOT_OWNER" desc="Settings &gt; Internet &gt; Network details: Text to show when a network is shared with you (by another user or configured before login).">
This network is shared with you.
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_NOT_SYNCED" desc="Settings &gt; Internet &gt; Network details: Text to show when a network is not synced to the user's account.">
This network is not synced to your account. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_SYNCED_DEVICE" desc="Settings &gt; Internet &gt; Network details: Text to show when a shared network is synced to the user's account. Also notes that changes to the network that are made by other users are not synced.">
Synced with other devices on your account. Settings modified by other users will not be synced. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_INTERNET_NETWORK_SYNCED_USER" desc="Settings &gt; Internet &gt; Network details: Text to show when a user network is synced.">
Synced with other devices on your account. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
@@ -2371,7 +2518,7 @@
<ph name="REFRESH_RATE">$1<ex>60</ex></ph> Hz - interlaced
</message>
<message name="IDS_SETTINGS_DISPLAY_ZOOM_TITLE" desc="In Device Settings &gt; Displays, the title for the section for changing the display's zoom.">
Display Size
Display size
</message>
<message name="IDS_SETTINGS_DISPLAY_ZOOM_SUBLABEL" desc="In Device Settings &gt; Displays, the text describing the display's zoom.">
Make items on your screen smaller or larger
@@ -2389,10 +2536,10 @@
Looks like <ph name="WIDTH">$1<ex>1600</ex></ph> x <ph name="HEIGHT">$2<ex>1200</ex></ph> (Default)
</message>
<message name="IDS_SETTINGS_DISPLAY_ZOOM_SLIDER_MINIMUM" desc="In Device Settings &gt; Displays, the label of the minimum value for the display size slider">
Tiny
Small
</message>
<message name="IDS_SETTINGS_DISPLAY_ZOOM_SLIDER_MAXIMUM" desc="In Device Settings &gt; Displays, the label of the maximum value for the display size slider">
Huge
Large
</message>
<message name="IDS_SETTINGS_DISPLAY_SCREEN" desc="In Device Settings &gt; Displays, the label for the dropdown menu for changing the dispay type.">
Screen
@@ -2645,23 +2792,40 @@
<ph name="LINE_BREAKS2">&lt;br&gt;&lt;br&gt;</ph>
This doesnt affect apps or content on other devices.
</message>
<message name="IDS_SETTINGS_APP_DETAILS_TITLE" desc="The title of app details subpage, which displays details about a specific app.">
App details
</message>
<!-- Apps > Manage your apps > Plugin VM > Shared folders -->
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS" desc="Label for managing shared folders for Plugin VM.">
<!-- Apps > Manage your apps > Parallels -->
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_PERMISSION_DIALOG_CAMERA_LABEL" desc="Label for the Parallels permissions dialog when camera permissions are being adjusted">
The change in camera setting requires Parallels Desktop to relaunch. Relaunch Parallels Desktop to proceed.
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_PERMISSION_DIALOG_MICROPHONE_LABEL" desc="Label for the Parallels permissions dialog when microphone permissions are being adjusted">
The change in microphone setting requires Parallels Desktop to relaunch. Relaunch Parallels Desktop to proceed.
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_PERMISSION_DIALOG_RELAUNCH_BUTTON" desc="Label for the relaunch button in the Plugin Vm permissions dialog">
Relaunch
</message>
<!-- Apps > Manage your apps > Parallels > Shared folders -->
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS" desc="Label for managing shared folders for Parallels.">
Manage shared folders
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_LIST_HEADING" desc="Label for list of shared folders.">
Shared folders
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_INSTRUCTIONS_ADD" desc="Instructions for how to add shared folders in Plugin VM.">
To share, right-click on a folder in Files app, then select "Share with Plugin VM".
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_INSTRUCTIONS_ADD" desc="Instructions for how to add shared folders in Parallels.">
To share, right-click on a folder in Files app, then select "Share with Parallels Desktop".
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_INSTRUCTIONS_REMOVE" desc="Instructions for removing shared folders in Plugin VM.">
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_INSTRUCTIONS_REMOVE" desc="Instructions for removing shared folders in Parallels.">
Removing folders will stop sharing but will not delete files.
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_REMOVE_SHARING" desc="Tooltip to show when hovering on the remove icon for a Plugin VM shared folder.">
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_REMOVE_SHARING" desc="Tooltip to show when hovering on the remove icon for a Parallels shared folder.">
Stop sharing
</message>
<message name="IDS_SETTINGS_APPS_PLUGIN_VM_SHARED_PATHS_LIST_EMPTY_MESSAGE" desc="Message shown when the user has not yet shared any folders in Parallels.">
Shared folders will appear here
</message>
<!-- Storage -->
<message name="IDS_SETTINGS_STORAGE_TITLE" desc="In Device Settings, the title for storage management.">
@@ -2752,6 +2916,12 @@
<message name="IDS_SETTINGS_ENABLE_LOGGING_TOGGLE_DESC" desc="The description of the checkbox to enable/disable crash and user metrics logging in Chrome OS.">
Automatically sends diagnostic and usage data to Brave
</message>
<message name="IDS_SETTINGS_ENABLE_SUGGESTED_CONTENT_TITLE" desc="The label of the checkbox to enable/disable Suggested Content in Chrome OS settings. Suggested Content includes app search recommendations and website recommendations which can show up in places such as the launcher search and suggestion chips.">
Suggest new content to explore
</message>
<message name="IDS_SETTINGS_ENABLE_SUGGESTED_CONTENT_DESC" desc="The description of the checkbox to enable/disable Suggested Content in Chrome OS settings. Suggested Content includes app search recommendations and website recommendations which can show up in places such as the launcher search and suggestion chips.">
Includes apps, webpages, and more. Sends statistics to improve suggestions only if youve chosen to share usage data.
</message>
<message name="IDS_SETTINGS_ENABLE_CONTENT_PROTECTION_ATTESTATION" desc="description label for verified access about premium contents">
Enable Verified Access
</message>
+56 -21
View File
@@ -107,20 +107,15 @@
<message name="IDS_PRINT_PREVIEW_PRINT_TO_GOOGLE_DRIVE" desc="Option shown on printer drop-down list for saving previewed document to Google Drive.">
Save to Google Drive
</message>
<message name="IDS_PRINT_PREVIEW_SUMMARY_FORMAT_SHORT" desc="Print summary, explaining to the user how many pages will be printed.">
<ph name="NUMBER_OF_SHEETS">$1<ex>10</ex></ph> <ph name="SHEETS_LABEL">$2<ex>sheets of paper</ex></ph>
<message name="IDS_PRINT_PREVIEW_SHEET_SUMMARY_LABEL" desc="Print summary, explaining to the user how many pages will be printed.">
{COUNT, plural,
=1 {1 sheet of paper}
other {{COUNT} sheets of paper}}
</message>
<message name="IDS_PRINT_PREVIEW_SHEETS_LABEL_PLURAL" desc="Label shown in the print preview summary.">
sheets of paper
</message>
<message name="IDS_PRINT_PREVIEW_SHEETS_LABEL_SINGULAR" desc="Label shown in the print preview summary.">
sheet of paper
</message>
<message name="IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR" desc="Label shown in the print preview summary.">
page
</message>
<message name="IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL" desc="Label shown in the print preview summary.">
pages
<message name="IDS_PRINT_PREVIEW_PAGE_SUMMARY_LABEL" desc="Print summary, explaining to the user how many pages will be saved.">
{COUNT, plural,
=1 {1 page}
other {{COUNT} pages}}
</message>
<message name="IDS_PRINT_PREVIEW_PAGE_RANGE_SYNTAX_INSTRUCTION" desc="Instruction shown when the user enters an invalid page range.">
Invalid page range, use <ph name="EXAMPLE_PAGE_RANGE">$1<ex>e.g. 1-5, 8, 11-13</ex></ph>
@@ -324,16 +319,56 @@
<message name="IDS_PRINT_PREVIEW_EULA_URL" desc="Message shown to user when their printer has a EULA associated with its PPD. This message is hyperlinked to the EULA.">
End User License Agreement
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_CONNECTING_TO_DEVICE" desc="Error label to show under the destination dropdown when the device can't connect to the printer.">
Error connecting to <ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_DEVICE_ERROR" desc="Error label to show under the destination dropdown when the printer has a device error.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> has a device error
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_DOOR_OPEN" desc="Error label to show under the destination dropdown when the printer has an open door.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>'s door is open
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_LOW_ON_INK" desc="Error label to show under the destination dropdown when the printer is low on ink.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is low on ink
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_LOW_ON_PAPER" desc="Error label to show under the destination dropdown when the printer is low on paper">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is low on paper
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_OUT_OF_INK" desc="Error label to show under the destination dropdown when the printer is out of ink.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is out of ink
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_OUT_OF_PAPER" desc="Error label to show under the destination dropdown when the printer is out of paper.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is out of paper
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_OUPUT_ALMOST_FULL" desc="Error label to show under the destination dropdown when the printer's output area is almost full.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>'s output area is almost full
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_OUPUT_FULL" desc="Error label to show under the destination dropdown when the printer's output area is full.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>'s output area is full
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_PAPER_JAM" desc="Error label to show under the destination dropdown when the printer has a paper jam.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>'s paper is jammed
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_PAUSED" desc="Error label to show under the destination dropdown when the printer is paused.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is paused
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_PRINTER_QUEUE_FULL" desc="Error label to show under the destination dropdown when the printer has a full queue.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph>'s queue is full
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_PRINTER_UNREACHABLE" desc="Error label to show under the destination dropdown when the printer is unreachable.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is unreachable
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_STOPPED" desc="Error label to show under the destination dropdown when the printer is stopped.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is stopped
</message>
<message name="IDS_PRINT_PREVIEW_PRINTER_STATUS_TRAY_MISSING" desc="Error label to show under the destination dropdown when the printer is missing a tray.">
<ph name="PRINTER_NAME">$1<ex>Home Office Printer</ex></ph> is missing a tray
</message>
<message name="IDS_PRINT_PREVIEW_SHEETS_LIMIT_ERROR_MESSAGE" desc="Sheets limit error message, explaining to the user why printing is blocked.">
Exceeds limit of <ph name="NUMBER_OF_SHEETS">$1<ex>10</ex></ph> <ph name="SHEETS_LABEL">$2<ex>sheets of paper</ex></ph>
{COUNT, plural,
=1 {Exceeds limit of 1 sheet of paper}
other {Exceeds limit of {COUNT} sheets of paper}}
</message>
<message name="IDS_PRINT_PREVIEW_SHEETS_LIMIT_LABEL_SINGULAR" desc="Label shown in the sheets limit error message.">
sheet of paper
</message>
<message name="IDS_PRINT_PREVIEW_SHEETS_LIMIT_LABEL_PLURAL" desc="Label shown in the sheets limit error message.">
sheets of paper
</message>
</if>
<if expr="not chromeos">
<message name="IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION" desc="Option allowing the user to access advanced printer settings using the native print system dialog instead of printing through the print preview mechanism. Shortcut key is not translated">
+3 -4
View File
@@ -27,6 +27,9 @@
<message name="IDS_SETTINGS_ABOUT_OS" desc="Menu title for the About Chrome OS page.">
About Chrome OS
</message>
<message name="IDS_OS_SETTINGS_TAG_OS_VERSION" desc="Text for search result item which, when clicked, navigates the user to about Chrome OS settings, which gives information about the current Chrome OS version.">
Chrome OS version
</message>
<message name="IDS_SETTINGS_ABOUT_SEE_OS_SETTINGS_FOR_UPDATE_MESSAGE" desc="Message shown to users on Brave browser settings which alerts the user that OS updates are shown in Chrome OS settings.">
To see if your device is up to date, go to <ph name="LINK_BEGIN">&lt;a href="chrome://os-settings/help"&gt;</ph>Chrome OS Settings<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
@@ -86,10 +89,6 @@
<!-- Main Page -->
<if expr="chromeos">
<message name="IDS_SETTINGS_BROWSER_SETTINGS_BANNER" desc="Banner displayed in OS settings page that links to Browser settings.">
If a setting doesn't show on this page, look in your <ph name="LINK_BEGIN">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>
Brave browser settings<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<!-- No target="_blank" because OS settings opens its own window. -->
<message name="IDS_SETTINGS_OS_SETTINGS_BANNER" desc="Banner displayed in browser settings page that links to OS settings.">
If a setting doesn't show on this page, look in your <ph name="LINK_BEGIN">&lt;a href="$1<ex>https://google.com/</ex>"&gt;</ph>
+116 -20
View File
@@ -60,6 +60,11 @@
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE" desc="Subtitle of the setting to enable Live Caption.">
Live caption detects speech in media and automatically generates captions for all media playing in Brave.
</message>
<if expr="not chromeos">
<message name="IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION" desc="In the settings tab, the text next to the checkbox to highlight the focused object to make it easier to see.">
Show a quick highlight on the focused object
</message>
</if>
<!-- Appearance Page -->
<message name="IDS_SETTINGS_APPEARANCE" desc="Name of the settings page which displays appearance preferences.">
@@ -281,6 +286,12 @@
<message name="IDS_SETTINGS_CREDIT_CARD_EXPIRED" desc="The error message that is shown when user attempts to enter or save an expired card.">
Your card is expired
</message>
<message name="IDS_SETTINGS_CREDIT_CARD_NICKNAME" desc="The title for the input that lets users modify the nickname of the credit card.">
Card nickname
</message>
<message name="IDS_SETTINGS_CREDIT_CARD_NICKNAME_INVALID" desc="The error message that is shown when user uses digit numbers in credit card nickname">
Nickname cant include numbers
</message>
<message name="IDS_SETTINGS_UPI_ID_LABEL" desc="A label which appears next to UPI IDs, when they are listed as stored payment info, but it is visually separate from the UPI ID. It lets the user know this is a UPI ID (e.g. as opposed to a credit card number). UPI is a system for payments in India. A UPI ID is an email-like string.">
UPI ID
</message>
@@ -290,6 +301,15 @@
<message name="IDS_SETTINGS_PASSWORDS" desc="Name for the password section and settings entry used for managing passwords.">
Passwords
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS" desc="Name for the passwords section used for managing passwords/exceptions stored on the device.">
Passwords
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS_ON_DEVICE_ONLY_HEADING" desc="Title of a subsection in the 'device passwords' page displaying passwords/exceptions that are stored only on the device.">
Passwords on this device only
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS_ON_DEVICE_AND_ACCOUNT_HEADING" desc="Title of a subsection in the 'device passwords' page displaying passwords/exceptions that are stored both on the device and in the account.">
Passwords on this device and in your Brave sync chain
</message>
<message name="IDS_SETTINGS_CHECK_PASSWORDS" desc="Name for the check passwords subsection and settings entry used to perform a password bulk check.">
Check passwords
</message>
@@ -407,6 +427,9 @@
<message name="IDS_SETTINGS_PASSWORD_REMOVE" desc="Label for a context menu item that removes the selected password." meaning="Remove selected password.">
Remove
</message>
<message name="IDS_SETTINGS_PASSWORD_MOVE_TO_ACCOUNT" desc="Label for a context menu item that moves the selected password from the device to the user account.">
Move to Brave sync chain
</message>
<message name="IDS_SETTINGS_PASSWORD_SEARCH" desc="Placeholder/label for the text input field that allows a user to filter saved passwords.">
Search passwords
</message>
@@ -417,7 +440,7 @@
Hide password
</message>
<message name="IDS_SETTINGS_PASSWORDS_VIEW_DETAILS_TITLE" desc="Title for the dialog that shows password details. This dialog lets a user see a saved password and copy the username.">
Saved password details
Password details
</message>
<message name="IDS_SETTINGS_PASSWORD_DETAILS" desc="Label for a context menu item that shows a dialog with details for the selected password.">
Details
@@ -455,24 +478,81 @@
<message name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD" desc="Label for an undo tooltip following a saved password deletion.">
Password deleted
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and add translation screenshots once final mocks are available. -->
<message translateable="false" name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD_FROM_ACCOUNT" desc="Label for an undo tooltip following deletion of a password from the account.">
<message name="IDS_SETTINGS_PASSWORD_STORED_ON_DEVICE" desc="Message displayed in the edit dialog for a password stored on the device.">
Your password is saved on this device
</message>
<message name="IDS_SETTINGS_PASSWORD_STORED_IN_ACCOUNT" desc="Message displayed in the edit dialog for a password stored in the account.">
Your password is saved in your Brave sync chain
</message>
<message name="IDS_SETTINGS_PASSWORD_STORED_IN_ACCOUNT_AND_ON_DEVICE" desc="Message displayed in the edit dialog for a password stored both on the device and in the account.">
Your password is saved on this device and in your Brave sync chain
</message>
<message name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD_FROM_ACCOUNT" desc="Label for an undo tooltip following deletion of a password from the account.">
Password deleted from your Brave sync chain
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and add translation screenshots once final mocks are available. -->
<message translateable="false" name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD_FROM_DEVICE" desc="Label for an undo tooltip following deletion of a password from the device.">
<message name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD_FROM_DEVICE" desc="Label for an undo tooltip following deletion of a password from the device.">
Password deleted from this device
</message>
<message name="IDS_SETTINGS_PASSWORD_DELETED_PASSWORD_FROM_ACCOUNT_AND_DEVICE" desc="Label for an undo tooltip following deletion of a password from the account and the device.">
Password deleted from this device and your Brave sync chain
</message>
<message name="IDS_SETTINGS_PASSWORD_MOVE_TO_ACCOUNT_DIALOG_TITLE" desc="Title for the dialog that confirms whether the user wishes to move a password to their Brave Account.">
Move to Brave sync chain?
</message>
<message name="IDS_SETTINGS_PASSWORD_MOVE_TO_ACCOUNT_DIALOG_BODY" desc="Description message for the dialog that confirms whether the user wishes to move a password to their Brave Account.">
Move your password to your Brave sync chain to access it securely wherever you're signed in
</message>
<message name="IDS_SETTINGS_PASSWORD_MOVE_TO_ACCOUNT_DIALOG_MOVE_BUTTON_TEXT" desc="Text for the button that confirms moving a password to the user Brave Account.">
Move
</message>
<message name="IDS_SETTINGS_PASSWORD_MOVE_TO_ACCOUNT_DIALOG_CANCEL_BUTTON_TEXT" desc="Text for the button that cancels the action of moving a password to the user Brave Account.">
No, thanks
</message>
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_TITLE" desc="Title for the dialog that asks the user which versions of a password to remove (device, Brave Account or both).">
Delete password?
</message>
<!-- TODO(crbug.com/1102294): Inject the website in the string. -->
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_BODY" desc="Description message for the dialog that asks the user which versions of a password to remove (device, Brave Account or both).">
Your password is stored on this device and in your Brave sync chain. Which one do you want to delete?
</message>
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_REMOVE_BUTTON_TEXT" desc="Text for the button that confirms the action in the dialog that asks the user which versions of a password to remove (device, Brave Account or both).">
Delete
</message>
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_CANCEL_BUTTON_TEXT" desc="Text for the button that cancels the action in the dialog that asks the user which versions of a password to remove (device, Brave Account or both).">
Cancel
</message>
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_FROM_ACCOUNT_CHECKBOX_LABEL" desc="The label for the checkbox that represents whether the user wishes to remove a password from their Brave Account.">
From your Brave sync chain
</message>
<message name="IDS_SETTINGS_PASSWORD_REMOVE_DIALOG_FROM_DEVICE_CHECKBOX_LABEL" desc="The label for the checkbox that represents whether the user wishes to remove a password from the device.">
From this device
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS_LINK_LABEL_SINGULAR" desc="The label for the link on settings leading to the 'device passwords' page, when there is 1 device password.">
You have 1 password saved on this device
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS_LINK_LABEL_PLURAL" desc="The label for the link on settings leading to the 'device passwords' page, when there is more than 1 device password.">
You have <ph name="NUMBER_OF_DEVICE_PASSWORDS">$1<ex>2</ex></ph> passwords saved on this device
</message>
<message name="IDS_SETTINGS_DEVICE_PASSWORDS_LINK_SUB_LABEL" desc="The sub-label for the link on settings leading to the 'device passwords' page.">
Save all your passwords in your Brave sync chain, so you can use them on all your devices
</message>
<message name="IDS_SETTINGS_PASSWORDS_MANAGE_PASSWORDS" desc="Shown in the passwords section of settings. Descriptive text to inform that passwords can be accessed online. Has a link.">
View and manage saved passwords in your <ph name="BEGIN_LINK">&lt;a is="action-link" href="$1" target="_blank"&gt;</ph>Brave sync chain<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and use definitive label once final mocks are available. -->
<message translateable="false" name="IDS_SETTINGS_PASSWORDS_OPT_IN_ACCOUNT_STORAGE_LABEL" desc="Label for a button in the passwords section of settings triggering opt in to passwords account storage.">
Opt-in to account storage
<message name="IDS_SETTINGS_PASSWORDS_MANAGE_PASSWORDS_PLAINTEXT" desc="Shown in the passwords section of settings. Descriptive text to inform that passwords can be accessed online.">
View and manage saved passwords in your Brave sync chain
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and use definitive label once final mocks are available. -->
<message translateable="false" name="IDS_SETTINGS_PASSWORDS_OPT_OUT_ACCOUNT_STORAGE_LABEL" desc="Label for a button in the passwords section of settings triggering opt out of passwords account storage.">
Opt-out of account storage
<message name="IDS_SETTINGS_PASSWORDS_OPT_IN_ACCOUNT_STORAGE_BODY" desc="Description before a button in the passwords section of settings which triggers opt in to the account-scoped password storage.">
You can also show passwords from your <ph name="BEGIN_LINK">&lt;a is="action-link" href="$1" target="_blank"&gt;</ph>Brave sync chain<ph name="END_LINK">&lt;/a&gt;</ph> here
</message>
<message name="IDS_SETTINGS_PASSWORDS_OPT_IN_ACCOUNT_STORAGE_LABEL" desc="Label for a button in the passwords section of settings which triggers opt in to the account-scoped password storage.">
Show
</message>
<message name="IDS_SETTINGS_PASSWORDS_OPT_OUT_ACCOUNT_STORAGE_BODY" desc="Description before a button in the passwords section of settings which triggers opt out of the account-scoped password storage.">
Showing passwords from your <ph name="BEGIN_LINK">&lt;a is="action-link" href="$1" target="_blank"&gt;</ph>Brave sync chain<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_PASSWORDS_OPT_OUT_ACCOUNT_STORAGE_LABEL" desc="Label for a button in the passwords section of settings which triggers opt out of the account-scoped password storage.">
Remove from device
</message>
<message name="IDS_SETTINGS_PASSWORDS_EXPORT_MENU_ITEM" desc="A menu item in the More Actions menu above the password list in Brave's settings. Selecting this action will open a dialog, through which the user can export their passwords outside of Brave.">
Export passwords...
@@ -1102,6 +1182,9 @@
<message name="IDS_SETTINGS_SAFETY_CHECK_PASSWORDS_PRIMARY_LABEL" desc="'Passwords' is an element in safety check that allows users to check for their passwords being compromised.">
Passwords
</message>
<message name="IDS_SETTINGS_SAFETY_CHECK_PASSWORDS_FEATURE_UNAVAILABLE" desc="Explains that the password check feature is not available in this version of the browser.">
Password check is not available in Brave
</message>
<message name="IDS_SETTINGS_SAFETY_CHECK_PASSWORDS_BUTTON_ARIA_LABEL" desc="Accessibility text for the button that allows users to review their passwords.">
Review passwords
</message>
@@ -1150,6 +1233,13 @@
<message name="IDS_SETTINGS_SAFETY_CHECK_EXTENSIONS_BUTTON_ARIA_LABEL" desc="Accessibility text for the button that allows users to review their extensions settings.">
Review extensions
</message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_PRIMARY_LABEL" desc="'Unwanted software protection' is an element in safety check that finds harmful software installed on the computer and allows users to remove it.">
Unwanted software protection
</message>
<message name="IDS_SETTINGS_SAFETY_CHECK_CHROME_CLEANER_BUTTON_ARIA_LABEL" desc="Accessiblity text for the button that allows users to review and remove harmful software found on their computer.">
Review unwanted software
</message>
<message name="IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_LABEL" desc="In the advanced options tab, the text next to the checkbox that enables prediction of network actions. Actions include browser-initiated DNS prefetching, TCP and SSL preconnection, and prerendering of webpages.">
Preload pages for faster browsing and searching
</message>
@@ -1489,13 +1579,13 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_AR" desc="Label for the AR site settings.">
Augmented reality
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_ASK" desc="The Ask label for the AR feature in site settings.">
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_ASK" desc="The ask label for the AR feature in site settings.">
Ask when a site wants to create a 3D map of your surroundings or track camera position
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_ASK_RECOMMENDED" desc="The Ask label for the AR feature in site settings (with the 'recommended' suffix).">
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_ASK_RECOMMENDED" desc="The ask label for the AR feature in site settings (with the 'recommended' suffix).">
Ask when a site wants to create a 3D map of your surroundings or track camera position (recommended)
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_BLOCK" desc="The Ask label for the AR feature in site settings (with the 'recommended' suffix).">
<message name="IDS_SETTINGS_SITE_SETTINGS_AR_BLOCK" desc="The block label for the AR feature in site settings.">
Do not allow sites to create a 3D map of your surroundings or track camera position
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_AUTOMATIC_DOWNLOADS" desc="Label for the automatic downloads site settings.">
@@ -1660,13 +1750,13 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_VR" desc="Label for the VR site settings.">
Virtual reality
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_ASK" desc="The Ask label for the VR feature in site settings.">
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_ASK" desc="The ask label for the VR feature in site settings.">
Ask when a site wants to use your virtual reality devices and data
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_ASK_RECOMMENDED" desc="The Ask label for the VR feature in site settings (with the 'recommended' suffix).">
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_ASK_RECOMMENDED" desc="The ask label for the VR feature in site settings (with the 'recommended' suffix).">
Ask when a site wants to use your virtual reality devices and data (recommended)
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCK" desc="The Ask label for the VR feature in site settings (with the 'recommended' suffix).">
<message name="IDS_SETTINGS_SITE_SETTINGS_VR_BLOCK" desc="The block label for the VR feature in site settings.">
Do not allow sites to use your virtual reality devices and data
</message>
<if expr="chromeos or is_win">
@@ -1839,6 +1929,9 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_PERMISSIONS_ARE_EPHEMERAL" desc="The notice that Flash permissions are ephemeral, at the top of the Flash settings page.">
Your Flash settings will be kept until you quit Brave.
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_FLASH_WILDCARD_UNSUPPORTED" desc="The warning message for users that tells wildcard patterns are no longer allowed in Flash">
Settings with "*" wildcards are no longer supported. Contact the extension developer or your administrator to <ph name="BEGIN_LINK">&lt;a is="action-link" href="$1" target="_blank"&gt;</ph> change these settings<ph name="END_LINK">&lt;/a&gt;</ph>.
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ALLOW_RECENTLY_CLOSED_SITES" desc="The allow label for background sync in site settings.">
Allow recently closed sites to finish sending and receiving data
</message>
@@ -1908,6 +2001,9 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_WINDOW_PLACEMENT_ASK" desc="The ask label for the window placement site settings.">
Ask when a site wants to open and place windows on your screens
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_WINDOW_PLACEMENT_ASK_RECOMMENDED" desc="The ask label for the window placement site settings (with the 'recommended' suffix).">
Ask when a site wants to open and place windows on your screens (recommended)
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_WINDOW_PLACEMENT_BLOCK" desc="The block label for the window placement site settings.">
Block sites from opening and placing windows on your screens
</message>
@@ -1993,6 +2089,9 @@
<message name="IDS_SETTINGS_SITE_SETTINGS_SOURCE_DRM_DISABLED" desc="A label shown when the protected content / protected media identifier permission on the Site Details page is disabled because the user has turned off using unique identifiers to access protected content.">
To change this setting, first <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>turn on identifiers<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ALLOWLISTED" desc="A subtitle for the Allowlisted setting, shown if a WebUI's permission is internally allowlisted by Brave.">
Allowlisted internally
</message>
<message name="IDS_SETTINGS_SITE_SETTINGS_ADS_BLOCK_BLACKLISTED_SINGULAR" desc="A subtitle for the Ads setting, shown if a website is known to show ads that have a poor user experience (intrusive, misleading) and is blocked from showing ads by Brave.">
Site shows intrusive or misleading ads
</message>
@@ -2204,9 +2303,6 @@
<message name="IDS_SETTINGS_NO_HID_DEVICES_FOUND" desc="Explanation for not showing HID devices in site settings.">
No HID devices found
</message>
<message name="IDS_SETTINGS_ADD_SITE_EXCEPTION_PLACEHOLDER" desc="Placeholder text shown before the user starts typing a new content settings exception for a site.">
[*.]example.com
</message>
<message name="IDS_SETTINGS_ADD_SITE_TITLE" desc="Title for the Add Site dialog">
Add a site
</message>
+3
View File
@@ -11,6 +11,9 @@
<message name="IDS_SETTINGS_ACCESSIBILITY_WEB_STORE" desc="Text for an external link explaining that additional accessibility features are found on the Web Store.">
Open Web Store
</message>
<if expr="not chromeos">
</if>
<if expr="chromeos">
</if>
<if expr="not chromeos">
+13
View File
@@ -2,6 +2,14 @@
<!-- Settings-specific strings shared by Browser and Chrome OS settings -->
<!--This file is created by l10nUtil.js. Do not edit manually.-->
<grit-part>
<!-- All subpages -->
<message name="IDS_SETTINGS_SUBPAGE_BACK_BUTTON_ARIA_LABEL" desc="Text read by screen readers when focusing on the back button. If the back button is activated, it will navigate to the previous page. This text will only be announced by BraveVox and will not be visible in the UI.">
<ph name="SUBPAGE_TITLE">$1<ex>Bluetooth</ex></ph> subpage back button
</message>
<message name="IDS_SETTINGS_SUBPAGE_BACK_BUTTON_ARIA_ROLE_DESCRIPTION" desc="Description read by screen readers when focusing on the back button. Indicates to the user that activating the back button will cause the settings page to navigate away from the currently displaying subpage to the previous visited page. This text will only be announced by BraveVox and will not be visible in the UI.">
Click to navigate away from <ph name="SUBPAGE_TITLE">$1<ex>Bluetooth</ex> subpage</ph>.
</message>
<!-- Caption Subpage (strings used by the <settings-captions> element) -->
<message name="IDS_SETTINGS_CAPTIONS" desc="Name of the settings page which displays caption preferences.">
Captions
@@ -85,6 +93,11 @@
Default
</message>
<!-- Nearby Share -->
<message name="IDS_SETTINGS_NEARBY_SHARE_TITLE" desc="Name of the settings page for the Nearby Share feature">
Nearby Share
</message>
<!-- Personalization Options SubPage (strings used by the <settings-personalization-options> element) -->
<message name="IDS_SETTINGS_ENABLE_URL_KEYED_ANONYMIZED_DATA_COLLECTION" desc="The label of the checkbox to enable/disable url keyed anonymized data collection.">
Make searches and browsing better
-27
View File
@@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright 2019 The Brave Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!-- XR specific strings (included from generated_resources.grd and android_chrome_strings.grd). -->
<!-- These strings are used in the consent flow dialog. -->
<!--This file is created by l10nUtil.js. Do not edit manually.-->
<grit-part>
<!-- XR consent dialog. -->
<message name="IDS_XR_CONSENT_DIALOG_TITLE" desc="Title of the user consent dialog displayed before allowing a website to start a VR presentation">
Enter VR from <ph name="DOMAIN">$1<ex>example.com</ex></ph>?
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_DEFAULT" desc="This is the header for a bulleted list of potential concerns that we want to ensure the user is aware of before entering VR. This header and the appended items of the bulleted list make up the body of the user consent dialog displayed before a website may start a VR presentation.">
While you're in VR, this site may be able to learn about:
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_PHYSICAL_FEATURES" desc="Item for the bulleted list of potential concerns in the consent dialog indicating that physical features may be exposed.">
your physical features, such as height
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_FLOOR_PLAN" desc="Item for the bulleted list of potential concerns in the consent dialog indicating that phyiscal features may be exposed.">
the layout of your room
</message>
<message name="IDS_XR_CONSENT_DIALOG_BUTTON_ALLOW_AND_ENTER_VR" desc="Text on the button of a user consent dialog which allows a website to start a VR presentation">
Enter VR
</message>
</grit-part>
@@ -14,7 +14,6 @@
#include "brave/components/brave_rewards/common/pref_names.h"
#include "brave/components/brave_shields/browser/brave_shields_util.h"
#include "brave/components/brave_sync/brave_sync_prefs.h"
#include "chrome/browser/android/preferences/pref_service_bridge.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
@@ -45,9 +44,6 @@ Profile* GetOriginalProfile() {
}
const char* GetPrefNameExposedToJava(int pref_index) {
if (pref_index < kBravePrefOffset)
return PrefServiceBridge::GetPrefNameExposedToJava(pref_index);
DCHECK_GE(pref_index, kBravePrefOffset);
DCHECK_LT(pref_index, BravePref::BRAVE_PREF_NUM_PREFS);
return kBravePrefsExposedToJava[pref_index - kBravePrefOffset];
@@ -47,7 +47,7 @@ public class BraveAdsSignupDialog {
boolean shouldShow =
shouldShowOnboardingDialog()
&& PackageUtils.isFirstInstall(context)
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())
&& !BravePrefServiceBridge.getInstance().getBoolean(BravePref.BRAVE_REWARDS_ENABLED)
&& hasElapsed24Hours(context)
&& ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS);
@@ -62,7 +62,7 @@ public class BraveAdsSignupDialog {
boolean shouldShow =
shouldShowOnboardingDialog()
&& !PackageUtils.isFirstInstall(context)
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())
&& !BravePrefServiceBridge.getInstance().getBoolean(BravePref.BRAVE_REWARDS_ENABLED)
&& ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS);
@@ -76,9 +76,9 @@ public class BraveAdsSignupDialog {
boolean shouldShow =
shouldShowOnboardingDialog()
&& !PackageUtils.isFirstInstall(context)
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedProfile())
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())
&& BravePrefServiceBridge.getInstance().getBoolean(BravePref.BRAVE_REWARDS_ENABLED)
&& BraveAdsNativeHelper.nativeIsLocaleValid(Profile.getLastUsedProfile())
&& BraveAdsNativeHelper.nativeIsLocaleValid(Profile.getLastUsedRegularProfile())
&& ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS);
boolean shouldShowForViewCount = shouldShowForViewCount();
@@ -125,7 +125,7 @@ public class BraveAdsSignupDialog {
braveRewardsNativeWorker.CreateWallet();
// Enable ads
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
}
}).create();
alertDialog.show();
@@ -148,7 +148,7 @@ public class BraveAdsSignupDialog {
// Enable ads
neverShowOnboardingDialogAgain();
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedProfile());
BraveAdsNativeHelper.nativeSetAdsEnabled(Profile.getLastUsedRegularProfile());
}
}).create();
alertDialog.show();
@@ -95,11 +95,6 @@ void RewardsTabHelper::ResourceLoadComplete(
}
}
void RewardsTabHelper::DidAttachInterstitialPage() {
if (rewards_service_)
rewards_service_->OnUnload(tab_id_);
}
void RewardsTabHelper::OnVisibilityChanged(content::Visibility visibility) {
if (!rewards_service_)
return;
@@ -42,7 +42,6 @@ class RewardsTabHelper : public RewardsServiceObserver,
content::RenderFrameHost* render_frame_host,
const content::GlobalRequestID& request_id,
const blink::mojom::ResourceLoadInfo& resource_load_info) override;
void DidAttachInterstitialPage() override;
void OnVisibilityChanged(content::Visibility visibility) override;
void WebContentsDestroyed() override;
@@ -12,6 +12,10 @@
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_registry_factory.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_system_provider.h"
#include "extensions/browser/extensions_browser_client.h"
// static
BraveWalletServiceFactory* BraveWalletServiceFactory::GetInstance() {
@@ -28,6 +32,9 @@ BraveWalletServiceFactory::BraveWalletServiceFactory()
: BrowserContextKeyedServiceFactory(
"BraveWalletService",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
DependsOn(
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
}
BraveWalletServiceFactory::~BraveWalletServiceFactory() {
@@ -21,9 +21,9 @@ BraveBrowsingDataRemoverDelegate::BraveBrowsingDataRemoverDelegate(
void BraveBrowsingDataRemoverDelegate::RemoveEmbedderData(
const base::Time& delete_begin,
const base::Time& delete_end,
int remove_mask,
uint64_t remove_mask,
content::BrowsingDataFilterBuilder* filter_builder,
int origin_type_mask,
uint64_t origin_type_mask,
base::OnceClosure callback) {
ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(delete_begin,
delete_end,
@@ -34,9 +34,9 @@ class BraveBrowsingDataRemoverDelegate
// ChromeBrowsingDataRemoverDelegate overrides:
void RemoveEmbedderData(const base::Time& delete_begin,
const base::Time& delete_end,
int remove_mask,
uint64_t remove_mask,
content::BrowsingDataFilterBuilder* filter_builder,
int origin_type_mask,
uint64_t origin_type_mask,
base::OnceClosure callback) override;
void ClearShieldsSettings(base::Time begin_time, base::Time end_time);
+13 -17
View File
@@ -20,45 +20,41 @@
using download::DownloadItem;
BraveDownloadItemModel::BraveDownloadItemModel(DownloadUIModel& model)
BraveDownloadItemModel::BraveDownloadItemModel(DownloadUIModel* model)
: model_(model) {}
BraveDownloadItemModel::~BraveDownloadItemModel() {}
// Adds origin url to the tooltip text and "Not secure", if needed.
base::string16 BraveDownloadItemModel::GetTooltipText(
const gfx::FontList& font_list,
int max_width) {
base::string16 tooltip = model_.GetTooltipText(font_list, max_width);
base::string16 BraveDownloadItemModel::GetTooltipText() {
base::string16 tooltip = model_->GetTooltipText();
bool is_secure;
base::string16 origin_url = GetOriginURLText(is_secure);
base::string16 origin_url = GetOriginURLText(&is_secure);
if (!origin_url.empty()) {
tooltip += base::ASCIIToUTF16("\n");
base::string16 tooltip_extra;
if (!is_secure)
tooltip_extra = l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE) +
base::char16(' ');
tooltip_extra += origin_url;
tooltip +=
gfx::ElideText(tooltip_extra, font_list, max_width, gfx::ELIDE_TAIL);
if (!is_secure) {
tooltip += l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE) +
base::char16(' ');
}
tooltip += origin_url;
}
return tooltip;
}
// Returns origin url text and sets |is_secure|.
base::string16 BraveDownloadItemModel::GetOriginURLText(bool& is_secure) {
is_secure = false;
const GURL gurl = model_.download()->GetURL();
base::string16 BraveDownloadItemModel::GetOriginURLText(bool* is_secure) {
*is_secure = false;
const GURL gurl = model_->download()->GetURL();
if (gurl.is_empty()) {
return base::string16();
}
std::string origin;
if (gurl.is_valid()) {
is_secure = content::IsOriginSecure(gurl);
*is_secure = content::IsOriginSecure(gurl);
if (gurl.SchemeIs(url::kAboutScheme)) {
origin = gurl.spec();
} else {
+8 -11
View File
@@ -1,4 +1,5 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -17,27 +18,23 @@
class BraveDownloadItemModel {
public:
// Constructs a BraveDownloadItemModel that encapsulates DownloadItemModel.
explicit BraveDownloadItemModel(DownloadUIModel& model);
explicit BraveDownloadItemModel(DownloadUIModel* model);
~BraveDownloadItemModel();
// Method that returns a string suitable for use as a tooltip. For
// a regular download, the tooltip is the filename and the origin URL with an
// indicator if the URL is secure. For an interrupted download, falls back on
// the base class behavior.
// |font_list| and |max_width| are used to elide the filename and/or interrupt
// reason as necessary to keep the width of the tooltip text under
// |max_width|. The tooltip will be at most 3 lines.
base::string16 GetTooltipText(const gfx::FontList& font_list,
int max_width);
base::string16 GetTooltipText();
// Returns a string suitable for use as the origin URL. |is_secure| is set to
// true if the url is considered secure.
base::string16 GetOriginURLText(bool& is_secure);
base::string16 GetOriginURLText(bool* is_secure);
// Reference to the encapsulated model.
DownloadUIModel& model_;
// Encapsulated model.
DownloadUIModel* model_;
DISALLOW_COPY_AND_ASSIGN(BraveDownloadItemModel);
};
#endif
#endif // BRAVE_BROWSER_DOWNLOAD_BRAVE_DOWNLOAD_ITEM_MODEL_H_
@@ -46,7 +46,7 @@ const base::FilePath::CharType kDefaultDisplayFileName[] =
class BraveDownloadItemModelTest : public testing::Test {
public:
BraveDownloadItemModelTest() : model_(&item_), brave_model_(model_) {}
BraveDownloadItemModelTest() : model_(&item_), brave_model_(&model_) {}
~BraveDownloadItemModelTest() override {}
protected:
@@ -112,7 +112,7 @@ TEST_F(BraveDownloadItemModelTest, GetOriginUrlText) {
bool is_secure = false;
EXPECT_STREQ(
test_case.expected_text,
base::UTF16ToUTF8(model().GetOriginURLText(is_secure)).c_str());
base::UTF16ToUTF8(model().GetOriginURLText(&is_secure)).c_str());
EXPECT_EQ(is_secure, test_case.expected_is_secure);
Mock::VerifyAndClearExpectations(&item());
}
@@ -130,19 +130,13 @@ TEST_F(BraveDownloadItemModelTest, GetTooltipText) {
{"https://example.com:5678/foo.bar", "foo.bar\nhttps://example.com:5678"},
};
const int kTooltipWidth = 1000;
const gfx::FontList& font_list =
ui::ResourceBundle::GetSharedInstance().GetFontList(
ui::ResourceBundle::BaseFont);
SetupDownloadItemDefaults();
for (unsigned i = 0; i < base::size(kTestCases); ++i) {
const TestCase& test_case = kTestCases[i];
EXPECT_CALL(item(), GetURL())
.WillRepeatedly(ReturnRefOfCopy(GURL(test_case.url)));
EXPECT_TRUE(base::LowerCaseEqualsASCII(base::UTF16ToUTF8(
model().GetTooltipText(font_list, kTooltipWidth)),
test_case.expected_tooltip));
EXPECT_EQ(base::ToLowerASCII(base::UTF16ToUTF8(model().GetTooltipText())),
test_case.expected_tooltip);
Mock::VerifyAndClearExpectations(&item());
}
}
+20 -8
View File
@@ -32,8 +32,6 @@ source_set("extensions") {
"api/rewards_notifications_api.h",
"api/settings_private/brave_prefs_util.cc",
"api/settings_private/brave_prefs_util.h",
"brave_component_extension_resource_manager.cc",
"brave_component_extension_resource_manager.h",
"brave_component_loader.cc",
"brave_component_loader.h",
"brave_extension_management.cc",
@@ -77,6 +75,7 @@ source_set("extensions") {
}
deps = [
":resources",
"//base",
"//brave/app:brave_generated_resources_grit",
"//brave/browser/tor:buildflags",
@@ -85,8 +84,6 @@ source_set("extensions") {
"//brave/common:pref_names",
"//brave/common/extensions/api",
"//brave/components/brave_component_updater/browser",
"//brave/components/brave_extension:generated_resources",
"//brave/components/brave_extension:static_resources",
"//brave/components/brave_rewards/browser/buildflags",
"//brave/components/brave_shields/browser",
"//brave/components/brave_shields/common",
@@ -117,15 +114,11 @@ source_set("extensions") {
if (brave_rewards_enabled) {
deps += [
"//brave/components/brave_rewards/browser",
"//brave/components/brave_rewards/resources/extension:extension_generated_resources",
"//brave/components/brave_rewards/resources/extension:static_resources",
]
}
if (enable_brave_webtorrent) {
deps += [
"//brave/components/brave_webtorrent/browser",
"//brave/components/brave_webtorrent:generated_resources",
"//brave/components/brave_webtorrent:static_resources",
]
sources += [
"brave_webtorrent_navigation_throttle.cc",
@@ -150,6 +143,25 @@ source_set("extensions") {
}
}
group("resources") {
deps = [
"//brave/components/brave_extension:generated_resources",
"//brave/components/brave_extension:static_resources",
]
if (brave_rewards_enabled) {
deps += [
"//brave/components/brave_rewards/resources/extension:extension_generated_resources",
"//brave/components/brave_rewards/resources/extension:static_resources",
]
}
if (enable_brave_webtorrent) {
deps += [
"//brave/components/brave_webtorrent:generated_resources",
"//brave/components/brave_webtorrent:static_resources",
]
}
}
config("infura_config") {
defines = [
"BRAVE_SERVICES_KEY=\"$brave_services_key\"",
@@ -1,52 +0,0 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "brave/browser/extensions/brave_component_extension_resource_manager.h"
#include "brave/components/brave_extension/grit/brave_extension_generated_map.h"
#include "brave/components/brave_extension/grit/brave_extension_resources_map.h"
#include "brave/components/brave_rewards/browser/buildflags/buildflags.h"
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_generated_map.h"
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources_map.h"
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources_map.h"
#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_panel_generated_map.h"
#endif
namespace extensions {
BraveComponentExtensionResourceManager::
BraveComponentExtensionResourceManager() {
AddComponentResourceEntries(
kBraveExtension,
kBraveExtensionSize);
AddComponentResourceEntries(
kBraveExtensionGenerated,
kBraveExtensionGeneratedSize);
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
AddComponentResourceEntries(
kBraveRewardsExtensionResources,
kBraveRewardsExtensionResourcesSize);
AddComponentResourceEntries(
kBraveRewardsPanelGenerated,
kBraveRewardsPanelGeneratedSize);
#endif
AddComponentResourceEntries(
kBraveWebtorrentResources,
kBraveWebtorrentResourcesSize);
AddComponentResourceEntries(
kBraveWebtorrentGenerated,
kBraveWebtorrentGeneratedSize);
}
BraveComponentExtensionResourceManager::
~BraveComponentExtensionResourceManager() {}
} // namespace extensions
@@ -1,23 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_BROWSER_EXTENSIONS_BRAVE_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
#define BRAVE_BROWSER_EXTENSIONS_BRAVE_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
#include "chrome/browser/extensions/chrome_component_extension_resource_manager.h"
namespace extensions {
class BraveComponentExtensionResourceManager
: public ChromeComponentExtensionResourceManager {
public:
BraveComponentExtensionResourceManager();
~BraveComponentExtensionResourceManager() override;
DISALLOW_COPY_AND_ASSIGN(BraveComponentExtensionResourceManager);
};
} // namespace extensions
#endif // BRAVE_BROWSER_EXTENSIONS_BRAVE_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
+3 -4
View File
@@ -34,10 +34,9 @@
namespace extensions {
BraveComponentLoader::BraveComponentLoader(
ExtensionServiceInterface* extension_service,
Profile* profile)
: ComponentLoader(extension_service, profile),
BraveComponentLoader::BraveComponentLoader(ExtensionSystem* extension_system,
Profile* profile)
: ComponentLoader(extension_system, profile),
profile_(profile),
profile_prefs_(profile->GetPrefs()) {
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace extensions {
// For registering, loading, and unloading component extensions.
class BraveComponentLoader : public ComponentLoader {
public:
BraveComponentLoader(ExtensionServiceInterface* extension_service,
BraveComponentLoader(ExtensionSystem* extension_system,
Profile* browser_context);
~BraveComponentLoader() override;
@@ -7,15 +7,22 @@
#include <memory>
#include "base/macros.h"
#include "brave/browser/extensions/brave_extensions_browser_api_provider.h"
#include "brave/browser/profiles/profile_util.h"
#include "chrome/browser/extensions/chrome_component_extension_resource_manager.h"
#include "components/prefs/pref_service.h"
namespace extensions {
BraveExtensionsBrowserClientImpl::BraveExtensionsBrowserClientImpl() {
BraveExtensionsBrowserClient::Set(this);
AddAPIProvider(std::make_unique<BraveExtensionsBrowserAPIProvider>());
// ChromeComponentExtensionResourceManager's Data needs to be LazyInit'ed on
// the UI thread (due to pdf_extension_util::AddStrings calling
// g_browser_process->GetApplicationLocale() that has a DCHECK to that
// regard).
ignore_result(GetComponentExtensionResourceManager()
->GetTemplateReplacementsForExtension(""));
}
bool BraveExtensionsBrowserClientImpl::AreExtensionsDisabled(
@@ -6,13 +6,11 @@
#ifndef BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSIONS_BROWSER_CLIENT_IMPL_H_
#define BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSIONS_BROWSER_CLIENT_IMPL_H_
#include "brave/extensions/browser/brave_extensions_browser_client.h"
#include "chrome/browser/extensions/chrome_extensions_browser_client.h"
namespace extensions {
class BraveExtensionsBrowserClientImpl : public ChromeExtensionsBrowserClient,
public BraveExtensionsBrowserClient {
class BraveExtensionsBrowserClientImpl : public ChromeExtensionsBrowserClient {
public:
BraveExtensionsBrowserClientImpl();
~BraveExtensionsBrowserClientImpl() override = default;
@@ -12,6 +12,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/task/post_task.h"
#include "base/task_runner.h"
#include "base/task_runner_util.h"
+10
View File
@@ -0,0 +1,10 @@
# Copyright (c) 2020 The Brave Authors. All rights reserved.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# you can obtain one at http://mozilla.org/MPL/2.0/.
brave_extensions_resources = [
"//brave/browser/extensions:resources",
"//brave/components/brave_rewards/browser/buildflags",
"//brave/components/brave_webtorrent/browser/buildflags",
]
@@ -5,8 +5,11 @@
#include "brave/browser/importer/brave_external_process_importer_client.h"
#include <utility>
#include "base/bind.h"
#include "brave/browser/importer/brave_in_process_importer_bridge.h"
#include "chrome/browser/service_sandbox_type.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/service_process_host.h"
@@ -38,12 +41,14 @@ void BraveExternalProcessImporterClient::Start() {
AddRef(); // balanced in Cleanup.
auto options = content::ServiceProcessHost::Options()
.WithDisplayName(IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME)
.Pass();
options.sandbox_type =
content::GetServiceSandboxType<brave::mojom::ProfileImport>();
content::ServiceProcessHost::Launch(
brave_profile_import_.BindNewPipeAndPassReceiver(),
content::ServiceProcessHost::Options()
.WithDisplayName(IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME)
.WithSandboxType(service_manager::SandboxType::kNoSandbox)
.Pass());
brave_profile_import_.BindNewPipeAndPassReceiver(), std::move(options));
brave_profile_import_.set_disconnect_handler(
base::BindOnce(&ExternalProcessImporterClient::OnProcessCrashed, this));
@@ -6,6 +6,7 @@
#include "brave/browser/metrics/metrics_reporting_util.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "chrome/common/channel_info.h"
#include "components/version_info/channel.h"
@@ -53,63 +53,61 @@ class BraveNetworkDelegateBrowserTest : public InProcessBrowserTest {
InProcessBrowserTest::SetUpOnMainThread();
host_resolver()->AddRule("*", "127.0.0.1");
content::SetupCrossSiteRedirector(embedded_test_server());
brave::RegisterPathProvider();
base::FilePath test_data_dir;
base::PathService::Get(brave::DIR_TEST_DATA, &test_data_dir);
embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
ASSERT_TRUE(embedded_test_server()->Start());
https_server_.ServeFilesFromDirectory(test_data_dir);
net::test_server::RegisterDefaultHandlers(&https_server_);
https_server_.AddDefaultHandlers(GetChromeTestDataDir());
content::SetupCrossSiteRedirector(&https_server_);
ASSERT_TRUE(https_server_.Start());
url_ = embedded_test_server()->GetURL("a.com", "/nested_iframe.html");
url_ = https_server_.GetURL("a.com", "/nested_iframe.html");
nested_iframe_script_url_ =
embedded_test_server()->GetURL("a.com", "/nested_iframe_script.html");
https_server_.GetURL("a.com", "/nested_iframe_script.html");
top_level_page_url_ = embedded_test_server()->GetURL("a.com", "/");
top_level_page_url_ = https_server_.GetURL("a.com", "/");
https_top_level_page_url_ = https_server_.GetURL("a.com", "/");
cookie_iframe_url_ =
embedded_test_server()->GetURL("a.com", "/cookie_iframe.html");
https_server_.GetURL("a.com", "/cookie_iframe.html");
https_cookie_iframe_url_ =
https_server_.GetURL("a.com", "/cookie_iframe.html");
third_party_cookie_url_ =
embedded_test_server()->GetURL("b.com", "/set-cookie?name=bcom");
first_party_cookie_url_ =
embedded_test_server()->GetURL("a.com",
"/set-cookie?name=acom");
subdomain_first_party_cookie_url_ =
embedded_test_server()->GetURL("subdomain.a.com",
"/set-cookie?name=subdomainacom");
third_party_cookie_url_ = https_server_.GetURL(
"b.com", "/set-cookie?name=bcom;SameSite=None;Secure");
first_party_cookie_url_ = https_server_.GetURL(
"a.com", "/set-cookie?name=acom;SameSite=None;Secure");
subdomain_first_party_cookie_url_ = https_server_.GetURL(
"subdomain.a.com",
"/set-cookie?name=subdomainacom;SameSite=None;Secure");
domain_registry_url_ = embedded_test_server()->GetURL("mobile.twitter.com",
domain_registry_url_ = https_server_.GetURL("mobile.twitter.com",
"/cookie_iframe.html");
iframe_domain_registry_url_ =
embedded_test_server()->GetURL("blah.twitter.com",
"/set-cookie?name=blahtwittercom;domain=twitter.com");
https_server_.GetURL("blah.twitter.com",
"/set-cookie?name=blahtwittercom;domain=twitter."
"com;SameSite=None;Secure");
google_oauth_cookie_url_ =
https_server_.GetURL("accounts.google.com", "/set-cookie?oauth=true");
google_oauth_cookie_url_ = https_server_.GetURL(
"accounts.google.com", "/set-cookie?oauth=true;SameSite=None;Secure");
top_level_page_pattern_ =
ContentSettingsPattern::FromString("http://a.com/*");
ContentSettingsPattern::FromString("https://a.com/*");
first_party_pattern_ =
ContentSettingsPattern::FromString("https://firstParty/*");
wordpress_top_url_ = https_server_
.GetURL("example.wordpress.com", "/cookie_iframe.html");
wordpress_frame_url_ = https_server_
.GetURL("example.wordpress.com", "/set-cookie?frame=true");
wordpress_frame_url_ = https_server_.GetURL(
"example.wordpress.com", "/set-cookie?frame=true;SameSite=None;Secure");
wp_top_url_ = https_server_
.GetURL("example.wp.com", "/cookie_iframe.html");
wp_frame_url_ = https_server_
.GetURL("example.wp.com", "/set-cookie?frame=true");
a_frame_url_ = https_server_.GetURL("a.com", "/set-cookie?frame=true");
wp_frame_url_ = https_server_.GetURL(
"example.wp.com", "/set-cookie?frame=true;SameSite=None;Secure");
a_frame_url_ = https_server_.GetURL(
"a.com", "/set-cookie?frame=true;SameSite=None;Secure");
}
HostContentSettingsMap* content_settings() {
@@ -117,6 +115,8 @@ class BraveNetworkDelegateBrowserTest : public InProcessBrowserTest {
}
void SetUpCommandLine(base::CommandLine* command_line) override {
InProcessBrowserTest::SetUpCommandLine(command_line);
// This is needed to load pages from "domain.com" without an interstitial.
command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
}
@@ -204,28 +204,28 @@ class BraveNetworkDelegateBrowserTest : public InProcessBrowserTest {
GURL wp_top_url_;
GURL wp_frame_url_;
GURL a_frame_url_;
net::test_server::EmbeddedTestServer https_server_;
private:
ContentSettingsPattern top_level_page_pattern_;
ContentSettingsPattern first_party_pattern_;
ContentSettingsPattern iframe_pattern_;
net::test_server::EmbeddedTestServer https_server_;
};
// It is important that cookies in following tests are set by response headers,
// not by javascript. Fetching such cookies is controlled by NetworkDelegate.
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest, Iframe3PCookieBlocked) {
ui_test_utils::NavigateToURL(browser(), url_);
const std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
const std::string cookie = content::GetCookies(
browser()->profile(), https_server_.GetURL("c.com", "/"));
EXPECT_TRUE(cookie.empty()) << "Actual cookie: " << cookie;
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest, Iframe3PCookieAllowed) {
AllowCookies(top_level_page_url_);
ui_test_utils::NavigateToURL(browser(), url_);
const std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
const std::string cookie = content::GetCookies(
browser()->profile(), https_server_.GetURL("c.com", "/"));
EXPECT_FALSE(cookie.empty());
}
@@ -233,7 +233,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest, Iframe3PShieldsDown) {
ShieldsDown(top_level_page_url_);
ui_test_utils::NavigateToURL(browser(), url_);
const std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_FALSE(cookie.empty());
}
@@ -243,12 +243,12 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
BlockCookies(top_level_page_url_);
ui_test_utils::NavigateToURL(browser(), url_);
std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_TRUE(cookie.empty()) << "Actual cookie: " << cookie;
ShieldsDown(top_level_page_url_);
ui_test_utils::NavigateToURL(browser(), url_);
cookie = content::GetCookies(browser()->profile(), GURL("http://c.com/"));
cookie = content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_FALSE(cookie.empty());
}
@@ -257,7 +257,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
IframeJs3PCookieBlocked) {
ui_test_utils::NavigateToURL(browser(), nested_iframe_script_url_);
const std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_TRUE(cookie.empty()) << "Actual cookie: " << cookie;
}
@@ -266,7 +266,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
AllowCookies(top_level_page_url_);
ui_test_utils::NavigateToURL(browser(), nested_iframe_script_url_);
const std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_FALSE(cookie.empty());
}
@@ -274,9 +274,9 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest, DefaultCookiesBlocked) {
DefaultBlockAllCookies();
ui_test_utils::NavigateToURL(browser(), nested_iframe_script_url_);
std::string cookie =
content::GetCookies(browser()->profile(), GURL("http://c.com/"));
content::GetCookies(browser()->profile(), GURL("https://c.com/"));
EXPECT_TRUE(cookie.empty()) << "Actual cookie: " << cookie;
cookie = content::GetCookies(browser()->profile(), GURL("http://a.com/"));
cookie = content::GetCookies(browser()->profile(), GURL("https://a.com/"));
EXPECT_TRUE(cookie.empty()) << "Actual cookie: " << cookie;
}
@@ -290,7 +290,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
auto* web_contents = browser()->tab_strip_model()->GetActiveWebContents();
NavigateFrameTo(
embedded_test_server()->GetURL("b.com", "/iframe_cookie.html"),
https_server_.GetURL("b.com", "/iframe_cookie.html"),
"nested_iframe");
content::RenderFrameHost* child_frame =
@@ -338,7 +338,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
NavigateFrameTo(third_party_cookie_url_);
ExpectCookiesOnHost(top_level_page_url_, "name=Good");
ExpectCookiesOnHost(GURL("http://b.com"), "name=bcom");
ExpectCookiesOnHost(GURL("https://b.com"), "name=bcom");
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
@@ -356,7 +356,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
NavigateFrameTo(third_party_cookie_url_);
ExpectCookiesOnHost(top_level_page_url_, "name=Good");
ExpectCookiesOnHost(GURL("http://b.com"), "name=bcom");
ExpectCookiesOnHost(GURL("https://b.com"), "name=bcom");
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
@@ -374,7 +374,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
NavigateFrameTo(third_party_cookie_url_);
ExpectCookiesOnHost(top_level_page_url_, "");
ExpectCookiesOnHost(GURL("http://b.com"), "");
ExpectCookiesOnHost(GURL("https://b.com"), "");
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
@@ -392,7 +392,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
NavigateFrameTo(third_party_cookie_url_);
ExpectCookiesOnHost(top_level_page_url_, "name=Good");
ExpectCookiesOnHost(GURL("http://b.com"), "");
ExpectCookiesOnHost(GURL("https://b.com"), "");
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
@@ -410,7 +410,7 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
NavigateFrameTo(third_party_cookie_url_);
ExpectCookiesOnHost(top_level_page_url_, "");
ExpectCookiesOnHost(GURL("http://b.com"), "");
ExpectCookiesOnHost(GURL("https://b.com"), "");
}
IN_PROC_BROWSER_TEST_F(BraveNetworkDelegateBrowserTest,
@@ -19,8 +19,8 @@ using brave::ResponseCallback;
namespace {
const char kTestReferralHeaders[] = R"(
[
{
[
{
"domains": [
"marketwatch.com",
"barrons.com"
@@ -53,13 +53,13 @@ const char kTestReferralHeaders[] = R"(
TEST(BraveReferralsNetworkDelegateHelperTest, ReplaceHeadersForMatchingDomain) {
const GURL url("https://www.marketwatch.com");
base::Optional<base::Value> referral_headers =
base::JSONReader().ReadToValue(kTestReferralHeaders);
ASSERT_TRUE(referral_headers);
ASSERT_TRUE(referral_headers->is_list());
base::JSONReader::ValueWithError referral_headers =
base::JSONReader::ReadAndReturnValueWithError(kTestReferralHeaders);
ASSERT_TRUE(referral_headers.value);
ASSERT_TRUE(referral_headers.value->is_list());
const base::ListValue* referral_headers_list = nullptr;
referral_headers->GetAsList(&referral_headers_list);
referral_headers.value->GetAsList(&referral_headers_list);
net::HttpRequestHeaders headers;
auto request_info = std::make_shared<brave::BraveRequestInfo>(url);
@@ -82,13 +82,13 @@ TEST(BraveReferralsNetworkDelegateHelperTest, ReplaceHeadersForMatchingDomain) {
TEST(BraveReferralsNetworkDelegateHelperTest,
NoReplaceHeadersForNonMatchingDomain) {
const GURL url("https://www.google.com");
base::Optional<base::Value> referral_headers =
base::JSONReader().ReadToValue(kTestReferralHeaders);
ASSERT_TRUE(referral_headers);
ASSERT_TRUE(referral_headers->is_list());
base::JSONReader::ValueWithError referral_headers =
base::JSONReader::ReadAndReturnValueWithError(kTestReferralHeaders);
ASSERT_TRUE(referral_headers.value);
ASSERT_TRUE(referral_headers.value->is_list());
const base::ListValue* referral_headers_list = nullptr;
referral_headers->GetAsList(&referral_headers_list);
referral_headers.value->GetAsList(&referral_headers_list);
net::HttpRequestHeaders headers;
auto request_info = std::make_shared<brave::BraveRequestInfo>(GURL());
+3 -1
View File
@@ -11,6 +11,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
#if !defined(OS_ANDROID)
@@ -55,7 +57,7 @@ BraveProfileImpl::BraveProfileImpl(
notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(parent_profile));
base::PostTaskAndReply(
content::GetUIThreadTaskRunner({})->PostTaskAndReply(
FROM_HERE, base::DoNothing(),
base::BindOnce(&ProfileImpl::OnPrefsLoaded,
weak_ptr_factory_.GetWeakPtr(), create_mode, true));
@@ -5,6 +5,7 @@
#include "brave/browser/themes/brave_dark_mode_utils.h"
#include "base/notreached.h"
#include "brave/browser/themes/brave_dark_mode_utils_internal.h"
namespace dark_mode {
+8 -4
View File
@@ -12,10 +12,14 @@ SkColor BraveThemeHelperWin::GetDefaultColor(
bool incognito,
const CustomThemeSupplier* theme_supplier) const {
// Prevent dcheck in chrome/browser/themes/theme_properties.cc(384)
// It assumes this id handled in theme service.
if (DwmColorsAllowed(theme_supplier) &&
id == ThemeProperties::COLOR_ACCENT_BORDER)
return dwm_accent_border_color_;
// It assumes these ids are handled in theme service.
if (DwmColorsAllowed(theme_supplier)) {
if (id == ThemeProperties::COLOR_ACCENT_BORDER_ACTIVE)
return dwm_accent_border_color_;
// In Windows 10, native inactive borders are #555555 with 50% alpha.
if (id == ThemeProperties::COLOR_ACCENT_BORDER_INACTIVE)
return SkColorSetARGB(0x80, 0x55, 0x55, 0x55);
}
// Skip ThemeHelperWin::GetDefaultColor() to prevent using dwm frame color.
return BraveThemeHelper::GetDefaultColor(id, incognito, theme_supplier);
}
+1
View File
@@ -5,6 +5,7 @@
#include "brave/browser/themes/theme_properties.h"
#include "base/notreached.h"
#include "chrome/browser/themes/theme_properties.h"
#include "ui/gfx/color_palette.h"
@@ -250,9 +250,6 @@ CHAR-LIMIT guidelines:
<message name="IDS_NOTIFICATION_CATEGORY_ANNOUNCEMENT" desc="Label for announcements notifications, within a list of notification categories. [CHAR-LIMIT=32]">
Announcements
</message>
<message name="IDS_NOTIFICATION_CATEGORY_MEDIA_PLAYBACK" desc="Label for media playback notifications, within a list of notification categories. [CHAR-LIMIT=32]">
Playing media
</message>
<message name="IDS_NOTIFICATION_CATEGORY_PERMISSION_REQUESTS" desc="Label for permission requests, within a list of notification categories. [CHAR-LIMIT=32]">
Permission requests
@@ -426,6 +423,12 @@ CHAR-LIMIT guidelines:
<message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_NAME" desc="Label for text input field containing the name on a credit card. [CHAR-LIMIT=32]">
Name on card
</message>
<message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_NICKNAME" desc="Label for text input field containing the nickname on a credit card. [CHAR-LIMIT=25]">
Card nickname
</message>
<message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_INVALID_NICKNAME" desc="Label for text input field containing the nickname on a credit card. [CHAR-LIMIT=25]">
Nickname cant include numbers
</message>
<message name="IDS_AUTOFILL_CARD_HOLDER_NAME" desc="Label for text input field containing the name on a credit card. [CHAR-LIMIT=32]">
Cardholder name
</message>
@@ -483,6 +486,12 @@ CHAR-LIMIT guidelines:
<message name="IDS_PASSWORDS_LEAK_DETECTION_SWITCH_SIGNED_OUT_ENABLE_DESCRIPTION" desc="Description for the switch toggling whether Brave should check that entered credentials have been part of a leak. Displayed for users who are not signed in and syncing.">
When you sign in to your Brave sync chain, this feature is turned on
</message>
<message name="IDS_PASSWORDS_CHECK_TITLE" desc="Title for the check passwords button which allows to check whether the user's passwords have been compromised.">
Check passwords
</message>
<message name="IDS_PASSWORDS_CHECK_DESCRIPTION" desc="Text explaining the benefits of checking the passwords, to be displayed under the Check Passwords button title.">
Keep your passwords safe from data breaches and other security issues
</message>
<message name="IDS_SECTION_SAVED_PASSWORDS_EXCEPTIONS" desc="Header for the list of websites for which user selected to never save passwords. [CHAR-LIMIT=32]">
Never saved
</message>
@@ -715,6 +724,45 @@ For example, some websites may respond to this request by showing you ads that a
<message name="IDS_CAN_MAKE_PAYMENT_TITLE" desc="Title for preference to allow websites to know whether you have payment methods available through PaymentRequest.CanMakePayment interface">
Access payment methods
</message>
<message name="IDS_SETTINGS_CUSTOM" desc="Label for a custom option in a dropdown menu.">
Custom
</message>
<message name="IDS_SETTINGS_SECURE_DNS_TITLE" desc="Title of the Secure DNS settings option">
Use secure DNS
</message>
<message name="IDS_SETTINGS_SECURE_DNS_DESCRIPTION" desc="Secondary, continued explanation of secure DNS in Privacy options">
Determines how to connect to websites over a secure connection
</message>
<message name="IDS_SETTINGS_AUTOMATIC_MODE_LABEL" desc="Text of the radio button that puts secure DNS in auto-upgrade mode">
Use your current service provider
</message>
<message name="IDS_SETTINGS_AUTOMATIC_MODE_DESCRIPTION" desc="Descriptive text that appears below IDS_SETTINGS_AUTOMATIC_MODE_LABEL.">
Secure DNS may not be available all the time
</message>
<message name="IDS_SETTINGS_AUTOMATIC_MODE_SUMMARY" desc="Short description of automatic mode">
Automatic
</message>
<message name="IDS_SETTINGS_SECURE_DROPDOWN_MODE_DESCRIPTION" desc="Text of the radio button that allows a secure resolver to be selected from a dropdown menu">
Choose another provider:
</message>
<message name="IDS_SETTINGS_SECURE_DROPDOWN_MODE_PRIVACY_POLICY" desc="Text that displays a link to the privacy policy of the resolver selected from a dropdown menu">
See this provider's <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1<ex>https://google.com/</ex>"&gt;</ph>privacy policy<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_SECURE_DNS_DISABLED_FOR_MANAGED_ENVIRONMENT" desc="Substring of the secure DNS setting when secure DNS is disabled due to detection of a managed environment">
This setting is disabled on managed browsers
</message>
<message name="IDS_SETTINGS_SECURE_DNS_DISABLED_FOR_PARENTAL_CONTROL" desc="Substring of the secure DNS setting when secure DNS is disabled due to detection of OS-level parental controls">
This setting is disabled because parental controls are on
</message>
<message name="IDS_SETTINGS_SECURE_DNS_CUSTOM_PLACEHOLDER" desc="Placeholder text for a textbox where users can enter a custom secure DNS provider">
Provider URL
</message>
<message name="IDS_SETTINGS_SECURE_DNS_CUSTOM_FORMAT_ERROR" desc="Error text for an incorrectly formatted entry for the custom secure DNS provider">
Enter a correctly formatted URL
</message>
<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_CLEAR_BROWSING_DATA_TITLE" desc="Title of the Clear Browsing Data screen. [CHAR-LIMIT=32]">
Clear browsing data
</message>
@@ -820,6 +868,50 @@ Your Brave account may have other forms of browsing history like searches and ac
<ph name="NUMBER_OF_ITEMS">%1$s<ex>3</ex></ph> items deleted
</message>
<!-- Safety check -->
<message name="IDS_PREFS_SAFETY_CHECK" desc="Title of the Safety check element in settings, allowing the user to check multiple areas of browser safety. [CHAR-LIMIT=32]">
Safety check
</message>
<message name="IDS_SAFETY_CHECK_DESCRIPTION" desc="Introduces the safety check categories to the user. Followed by several items, such as 'Safe Browsing', 'Updates', 'Passwords'.">
Brave can check if your settings are protecting you from:
</message>
<message name="IDS_SAFETY_CHECK_SAFE_BROWSING_TITLE" desc="Title for the Safe Browsing section.">
Safe Browsing
</message>
<message name="IDS_SAFETY_CHECK_UPDATES_TITLE" desc="Title for the updates section.">
Updates
</message>
<message name="IDS_SAFETY_CHECK_PASSWORDS_TITLE" desc="Title for the passwords section.">
Passwords
</message>
<message name="IDS_SAFETY_CHECK_BUTTON" desc="Text for the button to start Safety check.">
Check now
</message>
<message name="IDS_SAFETY_CHECK_UNCHECKED" desc="A given element has not been checked.">
Unchecked
</message>
<message name="IDS_SAFETY_CHECK_CHECKING" desc="A given element is being checked.">
Checking
</message>
<message name="IDS_SAFETY_CHECK_ERROR" desc="A generic error state.">
An error occurred.
</message>
<message name="IDS_SAFETY_CHECK_SAFE_BROWSING_DISABLED" desc="Text to display when Safe Browsing is disabled.">
Safe Browsing is off. Brave recommends turning it on.
</message>
<message name="IDS_SAFETY_CHECK_SAFE_BROWSING_ENABLED_STANDARD" desc="Text to display when Safe Browsing is set to standard protection.">
Standard Protection is on
</message>
<message name="IDS_SAFETY_CHECK_SAFE_BROWSING_ENABLED_ENHANCED" desc="Text to display when Safe Browsing is set to enhanced protection.">
Enhanced Protection is on
</message>
<message name="IDS_SAFETY_CHECK_SAFE_BROWSING_DISABLED_BY_ADMIN" desc="Text to display when Safe Browsing is disabled by admin.">
<ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Your administrator<ph name="END_LINK">&lt;/a&gt;</ph> has turned off Safe Browsing
</message>
<message name="IDS_SAFETY_CHECK_PASSWORDS_NO_PASSWORDS" desc="Text to display when no passwords are saved.">
No saved passwords. Brave can check your passwords when you save them.
</message>
<!-- Accessibility preferences -->
<message name="IDS_PREFS_ACCESSIBILITY" desc="Title of Accessibility settings, which allows the user to change webpage font sizes. [CHAR-LIMIT=32]">
Accessibility
@@ -993,6 +1085,32 @@ Your Brave account may have other forms of browsing history like searches and ac
Brave has saved you <ph name="gigabytes">%1$d<ex>10</ex></ph> GB
</message>
<!-- Download later -->
<message name="IDS_DOWNLOAD_LATER_DIALOG_TITLE" desc="Title of the download later dialog that let the user to choose the time to download.">
Choose when to download
</message>
<message name="IDS_DOWNLOAD_LATER_DIALOG_SUBTITLE" desc="Subtitle of the download later dialog that let the user to choose the time to download.">
You'll see a notification when this file is ready
</message>
<message name="IDS_DOWNLOAD_LATER_DOWNLOAD_NOW_TEXT" desc="The text for the radio button to trigger the download now in download later dialog.">
Now
</message>
<message name="IDS_DOWNLOAD_LATER_EDIT_LOCATION" desc="The text in the download later dialog that can be clicked to edit download location.">
Your file will be saved to <ph name="BEGIN_BOLD">&lt;b&gt;</ph><ph name="DIRECTORY">%1$s<ex>Downloads</ex></ph><ph name="END_BOLD">&lt;/b&gt;</ph>. <ph name="BEGIN_LINK2">&lt;LINK2&gt;</ph>Edit<ph name="END_LINK2">&lt;/LINK2&gt;</ph>.
</message>
<message name="IDS_DOWNLOAD_DATE_TIME_PICKER_NEXT_TEXT" desc="The text for the positive button of the download date time picker dialog.">
Next
</message>
<message name="IDS_DOWNLOAD_LATER_ON_WIFI_TEXT" desc="The text for the radio button to trigger the download on WIFI in download later dialog.">
On Wi-Fi
</message>
<message name="IDS_DOWNLOAD_LATER_PICK_TIME_TEXT" desc="The text for the radio button to select the download time in download later dialog.">
Pick date &amp; time
</message>
<message name="IDS_DOWNLOAD_LATER_PROMPT_ENABLED_TITLE" desc="A setting text to ask whether to show a dialog about when to download.">
Ask when to save files
</message>
<!-- Downloads location -->
<message name="IDS_DOWNLOADS_LOCATION_SELECTOR_TITLE" desc="Title of the preference that allows the user to select which of the folders they would like to make the default location to save their downloads.">
Download location
@@ -1007,7 +1125,7 @@ Your Brave account may have other forms of browsing history like searches and ac
Ask where to save files
</message>
<message name="IDS_DOWNLOAD_LOCATION_DIALOG_TITLE" desc="Title for the dialog that asks where the user wants to save the download file before the download begins.">
Download file
Choose where to download
</message>
<message name="IDS_DOWNLOAD_LOCATION_DIALOG_CHECKBOX" desc="Label for the checkbox that allows the user to indicate if they do not want the download location selection dialog to appear every time they initiate a download.">
Dont show again
@@ -1486,9 +1604,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
</message>
<!-- InfoBar -->
<message name="IDS_INFOBAR_CLOSE" desc="Accessibility label for the dismiss infobar Button">
Close
</message>
<message name="IDS_BOTTOM_BAR_SCREEN_POSITION" desc="Accessibility label to inform users about the InfoBar location">
Options available near bottom of the screen
</message>
@@ -1540,12 +1655,23 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
=1 {1 download pending.}
other {# downloads pending.}}
</message>
<message name="IDS_MULTIPLE_DOWNLOAD_SCHEDULED" desc="Label describing that one or more downloads are scheduled">
{FILE_COUNT, plural,
=1 {1 download scheduled.}
other {# downloads scheduled.}}
</message>
<message name="IDS_DOWNLOAD_INFOBAR_FILENAME" desc="Label showing the file name that just finished downloading">
<ph name="FILE_NAME">%1$s<ex>abc.png</ex></ph>.
</message>
<message name="IDS_DOWNLOAD_INFOBAR_ACCESSIBILITY_MESSAGE_WITH_LINK" desc="InfoBar accessibility text describing the link on the download progress infobar">
<ph name="MESSAGE">%1$s<ex>Downloading file (200 MB)</ex></ph> <ph name="LINK_NAME">%2$s<ex>Details</ex></ph> button
</message>
<message name="IDS_DOWNLOAD_SCHEDULED_ON_WIFI" desc="Label describing that the download was scheduled to start on Wi-Fi.">
Download will start on Wi-Fi.
</message>
<message name="IDS_DOWNLOAD_SCHEDULED_ON_DATE" desc="Label describing that the download was scheduled to start at a later date or time.">
Download will start on <ph name="date">%1$s<ex>Feb 28</ex></ph>.
</message>
<!-- Inline Update Infobar -->
<message name="IDS_INLINE_UPDATE_INFOBAR_READY_MESSAGE" desc="Text showing that the update process is almost ready.">
@@ -1628,9 +1754,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_MENU_SHARE_PAGE" desc="Menu item for sharing the current page. [CHAR-LIMIT=27]">
Share…
</message>
<message name="IDS_SHARE_LINK_CHOOSER_TITLE" desc="title for the share dialog when sharing the current address [CHAR-LIMIT=27]">
Share via
</message>
<message name="IDS_ACCESSIBILITY_MENU_SHARE_VIA" desc="Content description share current page via the most recently used application menu item">
Share via <ph name="APPLICATION">%s<ex>Gmail</ex></ph>
</message>
@@ -1721,6 +1844,15 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_CONTEXTMENU_SEARCH_WITH_GOOGLE_LENS" desc="Context sensitive menu item for deep linking into google lens. [CHAR-LIMIT=30]">
Search with Brave Lens <ph name="BEGIN_NEW">&lt;new&gt;</ph>New<ph name="END_NEW">&lt;/new&gt;</ph>
</message>
<message name="IDS_CONTEXTMENU_SHOP_SIMILAR_PRODUCTS" desc="Context sensitive menu item for deep linking into google lens for shopping results. [CHAR-LIMIT=30]">
Shop similar products <ph name="BEGIN_NEW">&lt;new&gt;</ph>New<ph name="END_NEW">&lt;/new&gt;</ph>
</message>
<message name="IDS_CONTEXTMENU_SHOP_IMAGE_WITH_GOOGLE_LENS" desc="Context sensitive menu item for deep linking into google lens for shopping results. [CHAR-LIMIT=30]">
Shop image with Brave Lens <ph name="BEGIN_NEW">&lt;new&gt;</ph>New<ph name="END_NEW">&lt;/new&gt;</ph>
</message>
<message name="IDS_CONTEXTMENU_SEARCH_SIMILAR_PRODUCTS" desc="Context sensitive menu item for deep linking into google lens for shopping results. [CHAR-LIMIT=30]">
Search similar products <ph name="BEGIN_NEW">&lt;new&gt;</ph>New<ph name="END_NEW">&lt;/new&gt;</ph>
</message>
<message name="IDS_CONTEXTMENU_SEARCH_WEB_FOR_IMAGE" desc="Context sensitive menu item for search-for-Image command in a new tab. [CHAR-LIMIT=30]">
Search <ph name="SEARCH_ENGINE">%1$s<ex>Brave</ex></ph> for this image
</message>
@@ -2057,7 +2189,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<ph name="FILE_SIZE_OF_TOTAL">%1$s<ex>1.56 MB / 10MB</ex></ph> <ph name="SEPARATOR">•</ph> <ph name="DESCRIPTION">%2$s<ex>failed</ex></ph>
</message>
<message name="IDS_DOWNLOAD_MANAGER_JUST_NOW" desc="Text on a label describing that the associated download event happened just now.">
Just Now
Just now
</message>
<message name="IDS_DOWNLOAD_MANAGER_SCHEDULED_LATER" desc="Text on a label describing that the associated download is scheduled to start later.">
Scheduled for later
</message>
<message name="IDS_DOWNLOAD_MANAGER_OFFLINE_HOME" desc="The title text on download home indicating that we are in offline mode.">
Offline Home
@@ -2188,25 +2323,27 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_SIGNIN_PROMO_CHOOSE_ANOTHER_ACCOUNT" desc="Button that the user can press if they want to select a different account before signing in. This button is shown below 'Continue as Joe Doe' button that signs user in with default account.">
Choose another account
</message>
<message name="IDS_SIGNIN_PROMO_STATUS_MESSAGE" desc="Title string for 'Turn on sync' sync promos.">
Sync is off
</message>
<message name="IDS_SYNC_PROMO_TURN_ON_SYNC" desc="Button that the user can press if they want to turn on sync with this account.">
Turn on sync
</message>
<!-- Messages for remote media playback (casting) -->
<message name="IDS_ACCESSIBILITY_PLAY" desc="The play button that starts playing the media.">
Play
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING" desc="Alert dialog text warning the user (who is currently in private mode) that the site they are currently using is going to share data with an external application." formatter_data="android_java">
This site is about to share information with an app outside of private mode.
</message>
<message name="IDS_ACCESSIBILITY_PAUSE" desc="The pause button that pauses playing the media.">
Pause
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING_TITLE" desc="Title for dialog asking if the user wants to leave private mode. [CHAR-LIMIT=32]" formatter_data="android_java">
Leave private mode?
</message>
<message name="IDS_ACCESSIBILITY_PREVIOUS_TRACK" desc="The previous track button that switches media to the previous track.">
Previous track
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_STAY" desc="Label for the dialog button to stay in private mode. [CHAR-LIMIT=20]" formatter_data="android_java">
Stay
</message>
<message name="IDS_ACCESSIBILITY_NEXT_TRACK" desc="The next track button that switches media to the next track.">
Next track
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_LEAVE" desc="Label for the dialog button to leave private mode. [CHAR-LIMIT=20]" formatter_data="android_java">
Leave
</message>
<message name="IDS_ACCESSIBILITY_SEEK_FORWARD" desc="The seek forward button that seeks media to a later position.">
Seek forward
</message>
<message name="IDS_ACCESSIBILITY_SEEK_BACKWARD" desc="The seek backward button that seeks media to an earlier position.">
Seek backward
<message name="IDS_EXTERNAL_APP_RESTRICTED_ACCESS_ERROR" desc="A message shown to the user if Brave receives a file view request to something Brave does not have access to view." formatter_data="android_java">
Brave does not have access to the requested resource.
</message>
<!-- New Tab Page strings -->
@@ -2730,6 +2867,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_ACCESSIBILITY_OMNIBOX_BTN_REFINE" desc="Content description for the omnibox refine button.">
Refine
</message>
<message name="IDS_ACCESSIBILITY_OMNIBOX_SWITCH_TO_TAB" desc="Content description for the omnibox switch to tab button.">
Switch To Tab
</message>
<message name="IDS_ACCESSIBILITY_SHARE_SELECTED_ITEMS" desc="Content description for the button to share selected items. [ICU Syntax]">
@@ -2753,10 +2893,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
Tabs
</message>
<message name="IDS_MEDIA_NOTIFICATION_INCOGNITO" desc="Text used as a placeholder for a media notification about playing media, when notification is shown from private tab.">
A site is playing media
</message>
<!-- Contextual Search -->
<message name="IDS_CONTEXTUAL_SEARCH_NETWORK_UNAVAILABLE" desc="Tells the user the network is not accessible.">
Unable to access the network
@@ -2797,6 +2933,12 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_CONTEXTUAL_SEARCH_IPH_TAP" desc="An in-product-help message for encouraging users to tap instead of long pressing to trigger the Tap to Search feature.">
You can also search with a quick tap on a word
</message>
<message name="IDS_CONTEXTUAL_SEARCH_IPH_TOUCH_AND_HOLD" desc="An in-product-help message for encouraging users to use a touch and hold gesture to trigger the Touch to Search feature.">
To search, touch &amp; hold a word
</message>
<message name="IDS_CONTEXTUAL_SEARCH_IPH_TOUCH_AND_HOLD_ENGAGED" desc="An in-product-help message for encouraging engaged users to use a touch and hold gesture to trigger the Touch to Search feature.">
To search, touch &amp; hold a word instead of tapping it
</message>
<!-- Web apps -->
<message name="IDS_WEBAPP_ACTIVITY_TITLE" desc="Title in recent tasks list for web apps, i.e. web pages that are shown in a separate window">
@@ -2876,6 +3018,20 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
Preview tab is closed
</message>
<!-- Feed Card Menu -->
<message name="IDS_FEED_CARD_MENU_DESCRIPTION" desc="The content description of the feed card menu bottom sheet.">
Feed card menu
</message>
<message name="IDS_FEED_CARD_MENU_OPENED_HALF" desc="Accessibility string read when the feed card menu bottom sheet is opened at half height. This should never happen, no need to translate.">
Feed card menu half height
</message>
<message name="IDS_FEED_CARD_MENU_OPENED_FULL" desc="Accessibility string read when the feed card menu bottom sheet is opened at full height. The sheet will occupy up to the full screen.">
Feed card menu is opened
</message>
<message name="IDS_FEED_CARD_MENU_CLOSED" desc="Accessibility string read when the feed card menu bottom sheet is closed.">
Feed card menu is closed
</message>
<!-- Storage Preference UI strings for clearing storage. -->
<message name="IDS_STORAGE_MANAGEMENT_ACTIVITY_LABEL" desc="Title for Brave's Manage Space Activity.">
Brave <ph name="APP_NAME">%1$s<ex>Brave</ex></ph> storage
@@ -2920,14 +3076,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
All Braves app data will be deleted permanently. This includes all files, settings, accounts, databases, etc.
</message>
<!-- Client certificate selection failure strings. -->
<message name="IDS_CLIENT_CERT_UNSUPPORTED_TITLE" desc="Title of a dialog box for when the operating system does not support client SSL certificate selection">
Unable to select certificate.
</message>
<message name="IDS_CLIENT_CERT_UNSUPPORTED_MESSAGE" desc="The message in a dialog box for when the operating system does not support client SSL certificate selection">
Client side certificate selection is not supported by the operating system.
</message>
<!-- WebUsb Picker UI strings -->
<message name="IDS_USB_CHOOSER_DIALOG_PROMPT" desc="The text that is used to introduce the USB chooser dialog to the user.">
<ph name="SITE">%1$s<ex>https://www.google.com</ex></ph> wants to connect
@@ -3001,6 +3149,12 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_ACCESSIBILITY_UNMUTE_VIDEO" desc="The accessibility string for the unmute video button.">
Unmute video
</message>
<message name="IDS_ACCESSIBILITY_FULL_SCREEN" desc="The accessibility string for the full screen video button.">
Full screen
</message>
<message name="IDS_ACCESSIBILITY_EXIT_FULL_SCREEN" desc="The accessibility string for the exiting of full screen video button.">
Exit full screen
</message>
<message name="IDS_ACCESSIBILITY_VIDEO_PLAYER" desc="The accessibility string for the video player.">
Video player
</message>
@@ -3160,10 +3314,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
Reopen Brave.
</message>
<if expr="enable_vr">
<part file="xr_consent_ui_strings_java.grdp" />
</if>
<if expr="enable_arcore">
<!-- ARCore check infobar -->
<message name="IDS_AR_CORE_CHECK_INFOBAR_INSTALL_TEXT" desc="Text to be displayed in the ARCore check infobar. When a WebXR page is loaded, if ARCore is needed to display AR content and it is not installed, an infobar will be shown to the user prompting them to install ARCore.">
@@ -3177,19 +3327,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_AR_MODULE_TITLE" desc="Text shown when the AR module is referenced in install start, success, failure UI (e.g. in IDS_MODULE_INSTALL_START_TEXT, which will expand to 'Installing Augmented Reality for Brave…').">
Augmented Reality
</message>
<message name="IDS_AR_IMMERSIVE_MODE_CONSENT_TITLE" desc="Title for dialog shown when a site requests consent for starting an augmented reality session.">
Enter AR from <ph name="DOMAIN">%s<ex>example.com</ex></ph>?
</message>
<message name="IDS_AR_IMMERSIVE_MODE_CONSENT_MESSAGE" desc="Message for dialog shown when a site requests consent for starting an augmented reality session.">
While you're in AR, this site may be able to:
• create a 3D map of your environment
• track camera motion
Only you can see what your camera is looking at. The site can't see your camera's images.
</message>
<message name="IDS_AR_IMMERSIVE_MODE_CONSENT_BUTTON" desc="Confirm button for dialog shown when a site requests consent for starting an augmented reality session.">
Enter AR
</message>
<!-- App upgrade from Play Store -->
<message name="IDS_UPDATE_FROM_MARKET" desc="Title of button that will direct the user to update an app from the market (Play Store)">
@@ -3232,6 +3369,9 @@ Only you can see what your camera is looking at. The site can't see your camera'
<message name="IDS_IPH_DOWNLOAD_HOME_ACCESSIBILITY_TEXT" desc="The in-product-help accessibility text to open download home after a restart.">
Find your files and pages in Downloads from the More Options button
</message>
<message name="IDS_IPH_DOWNLOAD_INDICATOR_TEXT" desc="The in-product-help message to open download home, which is shown alongside the offline indicator when the device goes offline.">
See your offline files
</message>
<message name="IDS_IPH_DATA_SAVER_DETAIL_TEXT" desc="The in-product-help message to open lite mode.">
See how much data you've saved
</message>
@@ -3282,11 +3422,6 @@ Only you can see what your camera is looking at. The site can't see your camera'
Remove and recreate this shortcut
</message>
<!-- BottomSheet -->
<message name="IDS_BOTTOM_SHEET_ACCESSIBILITY_DESCRIPTION" desc="Accessibility string read when the bottom sheet is focused informing the user that the sheet can be closed by swiping down.">
Swipe down to close.
</message>
<!-- SendTabToSelf -->
<message name="IDS_SEND_TAB_TO_SELF_TOAST" desc="Text for a toast indicating that the tab is being shared on the user's other synced devices.">
Sending to <ph name="device_name">%1$s<ex>Tanya's Pixel 2</ex></ph>...
@@ -3549,6 +3684,14 @@ Only you can see what your camera is looking at. The site can't see your camera'
Download
</message>
<message name="IDS_QR_CODE_ERROR_TOO_LONG" desc="Error message displayed when a URL exceeds the limit for which we can generate a QR code.">
Can't create QR code. URL is more than <ph name="CHARACTER_LIMIT">%1$d<ex>300</ex></ph> characters.
</message>
<message name="IDS_QR_CODE_ERROR_UNKNOWN" desc="Error message displayed when an unknown error occurs.">
Can't create QR code
</message>
<!-- Sharing Hub -->
<message name="IDS_SHARING_MORE_ICON_LABEL" desc="Icon label for the More button in the sharing hub.">
More
@@ -3558,6 +3701,10 @@ Only you can see what your camera is looking at. The site can't see your camera'
Copy link
</message>
<message name="IDS_SHARING_COPY_TEXT" desc="Label for the Copy Text button in the sharing hub.">
Copy text
</message>
<message name="IDS_SHARING_SCREENSHOT" desc="Label for Screenshot button in the sharing hub.">
Screenshot
</message>
@@ -3566,6 +3713,10 @@ Only you can see what your camera is looking at. The site can't see your camera'
Link Copied
</message>
<message name="IDS_TEXT_COPIED" desc="Text shown in the toast notification when Copy Text is selected in the sharing hub.">
Text Copied
</message>
<message name="IDS_QR_CODE_CAMERA_FRAMING_RECT_DESCRIPTION" desc="Text under the framing rectangle in QR code camera preview.">
Position QR/barcode in this frame.
</message>
@@ -3610,21 +3761,27 @@ Only you can see what your camera is looking at. The site can't see your camera'
chrome_qrcode_<ph name="CURRENT_TIMESTAMP_MS">%1$s<ex>1582667748515</ex></ph>
</message>
<message name="IDS_QR_CODE_SUCCESSFUL_DOWNLOAD_TITLE" desc="Notification title for successful QR code download.">
QR code downloaded
<!-- Share Screenshot strings -->
<message name="IDS_SCREENSHOT_EDIT_TITLE" desc="The text shown on the share option for screenshots.">
Edit
</message>
<message name="IDS_QR_CODE_SUCCESSFUL_DOWNLOAD_TEXT" desc="Notification text for successful QR code download.">
Tap to open QR code
<message name="IDS_SCREENSHOT_DELETE_TITLE" desc="The text shown on the delete option for screenshots.">
Delete
</message>
<message name="IDS_QR_CODE_FAILED_DOWNLOAD_TITLE" desc="Notification title for failed QR code download.">
Can't download QR code
<message name="IDS_SCREENSHOT_SAVE_TITLE" desc="The text shown on the save option for screenshots.">
Save
</message>
<message name="IDS_QR_CODE_FAILED_DOWNLOAD_TEXT" desc="Notification text for failed QR code download.">
Something went wrong
<message name="IDS_SCREENSHOT_SHARE_TITLE" desc="The text shown on the share option for screenshots.">
Share
</message>
<message name="IDS_SCREENSHOT_FILENAME_PREFIX" desc="File name prefix for downloaded screenshot that is followed by timestamp.">
chrome_screenshot_<ph name="CURRENT_TIMESTAMP_MS">%1$s<ex>1582667748515</ex></ph>
</message>
<!-- Chime DFM module strings -->
<message name="IDS_CHIME_MODULE_TITLE" desc="Text shown when the chime module is referenced in install start, success, failure UI (e.g. in IDS_MODULE_INSTALL_START_TEXT, which will expand to 'Installing Brave Notifications Platform for Brave…').">
Brave Notifications Platform
@@ -3651,6 +3808,37 @@ Only you can see what your camera is looking at. The site can't see your camera'
<message name="IDS_PAINT_PREVIEW_DEMO_PLAYBACK_FAILURE" desc="Toast message displayed when there is a failure in playing back a paint preview for the demo. Used in paint preview demo mode." translateable="false">
Paint Preview playback failed.
</message>
<!-- Default Browser Promo Strings-->
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_TITLE" desc="Title of the default browser promo dialog">
Set <ph name="APP_NAME">%1$s<ex>Brave</ex></ph> as your default?
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_DESC" desc="Description in the default browser promo dialog, which is concatenated with one of the following steps strings">
<ph name="APP_NAME">%1$s<ex>Brave</ex></ph> has the smarts and speed you need to safely do, create, and explore online
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_DISAMBIGUATION_SHEET_STEPS" desc="Description of the steps to set the default browser throught disambiguation sheet. 'Always' should match TC ID 5575222334666843269.">
1. Choose <ph name="APP_NAME">%1$s<ex>Brave</ex></ph>\n2. Tap “Always”
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_SYSTEM_SETTINGS_STEPS" desc="Description of the steps to set the default browser throught system settings. 'Go to Settings' should match TC ID 4431460803004659888. 'Browser App' should match TC ID 6222206565850006894.">
1. Go to Settings\n2. Tap “Browser App”\n3. Choose <ph name="APP_NAME">%1$s<ex>Brave</ex></ph>
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_ROLE_MANAGER_STEPS" desc="Description of the steps to set the default browser throught role manager. 'Set as default' should match TC ID 5706081295230541240.">
1. Choose <ph name="APP_NAME">%1$s<ex>Brave</ex></ph>\n2. Tap “Set as default”
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_CHOOSE_CHROME_BUTTON" desc="A button in the default browser promo dialog to choose chrome as default">
Choose <ph name="APP_NAME">%1$s<ex>Brave</ex></ph>
</message>
<message name="IDS_DEFAULT_BROWSER_PROMO_DIALOG_GO_TO_SETTINGS_BUTTON" desc="A button in the default browser promo to navigate users to systen settings. 'Go to Settings' should match TC ID 4431460803004659888.">
Go to Settings
</message>
<!-- HTTPS image compression InfoBar -->
<message name="IDS_LITE_MODE_HTTPS_IMAGE_COMPRESSION_MESSAGE" desc="The text of the infobar notifying the user that Brave's Lite mode will now also compresses HTTPS images.">
Lite mode now saves you more data by optimizing images on HTTPS pages.
</message>
<message name="IDS_LITE_MODE_HTTPS_IMAGE_COMPRESSION_SETTINGS_LINK" desc="This link opens the Lite Mode settings page to explain the feature and configure the settings.">
Manage
</message>
</messages>
</release>
</grit>
@@ -144,6 +144,12 @@ CHAR-LIMIT guidelines:
Close all private tabs
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING" desc="Alert dialog text warning the user (who is currently in private mode) that the site they are currently using is going to share data with an external application." formatter_data="android_java">
This site is about to share information with an app outside of private mode.
</message>
<message name="IDS_EXTERNAL_APP_LEAVE_INCOGNITO_WARNING_TITLE" desc="Title for dialog asking if the user wants to leave private mode. [CHAR-LIMIT=32]" formatter_data="android_java">
Leave private mode?
</message>
<message name="IDS_BUTTON_NEW_INCOGNITO_TAB" desc="Tooltip for the button to open a new private browser tab.">
New private tab
</message>
@@ -184,9 +190,6 @@ CHAR-LIMIT guidelines:
<message name="IDS_KEYBOARD_SHORTCUT_NEW_INCOGNITO_TAB" desc="A text label that appears next to a keyboard shortcut to open a new tab in private mode in Brave. The shortcut description is shown in a system dialog along with all other supported shortcuts. [CHAR-LIMIT=55]">
Open a new tab in Private mode
</message>
<if expr="enable_vr">
</if>
<if expr="enable_arcore">
</if>
@@ -1,30 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright 2019 The Brave Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!-- XR specific strings (included from generated_resources.grd and android_chrome_strings.grd). -->
<!-- These strings are used in the consent flow dialog. -->
<!--This file is created by l10nUtil.js. Do not edit manually.-->
<grit-part>
<!-- XR consent dialog. -->
<message name="IDS_XR_CONSENT_DIALOG_TITLE" desc="Title of the user consent dialog displayed before allowing a website to start a VR presentation">
Enter VR from <ph name="DOMAIN">%s<ex>example.com</ex></ph>?
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_DEFAULT" desc="This is the header for a bulleted list of potential concerns that we want to ensure the user is aware of before entering VR. This header and the appended items of the bulleted list make up the body of the user consent dialog displayed before a website may start a VR presentation.">
While you're in VR, this site may be able to learn about:
</message>
<message name="IDS_XR_CONSENT_BULLET" desc="Unicode bullet for list items. Similar to IDS_LIST_BULLET from desktop generated_resources">
• <ph name="LIST_ITEM_TEXT">%s<ex>the layout of your room</ex></ph>
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_PHYSICAL_FEATURES" desc="Item for the bulleted list of potential concerns in the consent dialog indicating that physical features may be exposed.">
your physical features, such as height
</message>
<message name="IDS_XR_CONSENT_DIALOG_DESCRIPTION_FLOOR_PLAN" desc="Item for the bulleted list of potential concerns in the consent dialog indicating that phyiscal features may be exposed.">
the layout of your room
</message>
<message name="IDS_XR_CONSENT_DIALOG_BUTTON_ALLOW_AND_ENTER_VR" desc="Text on the button of a user consent dialog which allows a website to start a VR presentation">
Enter VR
</message>
</grit-part>
@@ -24,7 +24,7 @@ BookmarkPrefsService::~BookmarkPrefsService() = default;
void BookmarkPrefsService::OnPreferenceChanged() {
for (Browser* browser : *BrowserList::GetInstance()) {
if (profile_->IsSameProfile(browser->profile())) {
if (profile_->IsSameOrParent(browser->profile())) {
browser->UpdateBookmarkBarState(
Browser::BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE);
}
@@ -11,6 +11,7 @@
#include "base/auto_reset.h"
#include "base/strings/string16.h"
#include "brave/app/vector_icons/vector_icons.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/views/download/download_shelf_view.h"
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
@@ -18,6 +19,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/paint_vector_icon.h"
@@ -29,6 +31,9 @@ using download::DownloadItem;
namespace {
// Size of the space used for the progress indicator.
constexpr int kProgressIndicatorSize = 25;
// The minimum vertical padding above and below contents of the download item.
constexpr int kMinimumVerticalPadding = 6;
@@ -48,7 +53,7 @@ BraveDownloadItemView::BraveDownloadItemView(
DownloadShelfView* parent,
views::View* accessible_alert)
: DownloadItemView(std::move(download), parent, accessible_alert),
brave_model_(*model_),
brave_model_(model_.get()),
is_origin_url_secure_(false) {
// Prepare origin url font.
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
@@ -110,7 +115,7 @@ void BraveDownloadItemView::OnDownloadUpdated() {
bool needs_repaint = false;
bool new_is_secure = false;
base::string16 new_origin_url =
brave_model_.GetOriginURLText(new_is_secure);
brave_model_.GetOriginURLText(&new_is_secure);
if (new_origin_url != origin_url_text_ ||
new_is_secure != is_origin_url_secure_) {
origin_url_text_ = new_origin_url;
@@ -127,8 +132,7 @@ void BraveDownloadItemView::OnDownloadUpdated() {
}
// Update tooltip.
base::string16 new_tip =
brave_model_.GetTooltipText(font_list_, kTooltipMaxWidth);
base::string16 new_tip = brave_model_.GetTooltipText();
if (new_tip != tooltip_text_) {
tooltip_text_ = new_tip;
TooltipTextChanged();
@@ -166,8 +170,7 @@ void BraveDownloadItemView::DrawOriginURL(gfx::Canvas* canvas) {
if (origin_url_text_.empty() || IsShowingWarningDialog())
return;
int x = kStartPadding + DownloadShelf::kProgressIndicatorSize +
kProgressTextPadding;
int x = kStartPadding + kProgressIndicatorSize + kProgressTextPadding;
int text_width = kTextWidth;
if (!is_origin_url_secure_) {
@@ -181,7 +184,8 @@ void BraveDownloadItemView::DrawOriginURL(gfx::Canvas* canvas) {
origin_url_text_, origin_url_font_list_, text_width, gfx::ELIDE_TAIL);
int mirrored_x = GetMirroredXWithWidthInView(x, text_width);
SkColor dimmed_text_color = SkColorSetA(GetTextColor(), 0xC7);
SkColor dimmed_text_color = SkColorSetA(
GetThemeProvider()->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT), 0xC7);
canvas->DrawStringRect(
originURL, origin_url_font_list_, dimmed_text_color,
gfx::Rect(mirrored_x, GetYForOriginURLText(), text_width,
@@ -193,8 +197,7 @@ void BraveDownloadItemView::DrawLockIcon(gfx::Canvas* canvas) {
return;
int mirrored_x = GetMirroredXWithWidthInView(
kStartPadding + DownloadShelf::kProgressIndicatorSize +
kProgressTextPadding,
kStartPadding + kProgressIndicatorSize + kProgressTextPadding,
kTextWidth);
// Get lock icon of the needed height.
@@ -64,7 +64,7 @@ void BraveLocationBarView::Layout() {
LocationBarView::Layout(brave_actions_ ? brave_actions_ : nullptr);
}
void BraveLocationBarView::Update(const content::WebContents* contents) {
void BraveLocationBarView::Update(content::WebContents* contents) {
// base Init calls update before our Init is run, so our children
// may not be initialized yet
if (brave_actions_) {
@@ -20,7 +20,7 @@ class BraveLocationBarView : public LocationBarView {
using LocationBarView::LocationBarView;
void Init() override;
void Layout() override;
void Update(const content::WebContents* contents) override;
void Update(content::WebContents* contents) override;
void OnChanged() override;
BraveActionsContainer* GetBraveActionsContainer() { return brave_actions_; }
@@ -56,7 +56,7 @@ int GetProfileMenuCloseButtonTextId(Profile* profile) {
int GetWindowCount(Profile* profile) {
return brave::IsTorProfile(profile)
? 0
: BrowserList::GetIncognitoSessionsActiveForProfile(profile);
: BrowserList::GetOffTheRecordBrowsersActiveForProfile(profile);
}
} // namespace
@@ -74,12 +74,12 @@ views::View* BraveTranslateBubbleView::BraveCreateViewBeforeTranslate() {
auto accept_button = views::MdTextButton::Create(
this, l10n_util::GetStringUTF16(IDS_BRAVE_TRANSLATE_BUBBLE_INSTALL));
accept_button->SetID(BUTTON_ID_TRANSLATE);
accept_button->SetID(BUTTON_ID_DONE);
accept_button->SetIsDefault(true);
auto cancel_button = views::MdTextButton::Create(
this, l10n_util::GetStringUTF16(IDS_BRAVE_TRANSLATE_BUBBLE_CANCEL));
cancel_button->SetID(BUTTON_ID_CANCEL);
cancel_button->SetID(BUTTON_ID_CLOSE);
layout->StartRowWithPadding(
views::GridLayout::kFixedSize, kButtonColumnSetId,
@@ -131,11 +131,11 @@ void BraveTranslateBubbleView::DisableOfferTranslatePref() {
void BraveTranslateBubbleView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
switch (static_cast<ButtonID>(sender->GetID())) {
case BUTTON_ID_TRANSLATE: {
case BUTTON_ID_DONE: {
InstallGoogleTranslate();
break;
}
case BUTTON_ID_CANCEL: {
case BUTTON_ID_CLOSE: {
CloseBubble();
break;
}
@@ -170,8 +170,12 @@ bool BraveTranslateBubbleView::AcceleratorPressed(
return TranslateBubbleView::AcceleratorPressed(accelerator);
}
bool BraveTranslateBubbleView::ShouldShowWindowTitle() const {
return true;
}
void BraveTranslateBubbleView::Init() {
TranslateBubbleView::Init();
RemoveChildView(before_translate_view_);
before_translate_view_ = AddChildView(BraveCreateViewBeforeTranslate());
RemoveChildView(translate_view_);
translate_view_ = AddChildView(BraveCreateViewBeforeTranslate());
}
@@ -34,6 +34,9 @@ class BraveTranslateBubbleView : public TranslateBubbleView {
// views::View methods.
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
// LocationBarBubbleDelegateView methods.
bool ShouldShowWindowTitle() const override;
protected:
virtual void InstallGoogleTranslate();
@@ -167,10 +167,7 @@ class MockBraveTranslateBubbleView : public BraveTranslateBubbleView {
class BraveTranslateBubbleViewTest : public ChromeViewsTestBase {
public:
BraveTranslateBubbleViewTest() {
scoped_feature_list_.InitAndDisableFeature(
language::kUseButtonTranslateBubbleUi);
}
BraveTranslateBubbleViewTest() {}
protected:
void SetUp() override {
@@ -224,10 +221,10 @@ class BraveTranslateBubbleViewTest : public ChromeViewsTestBase {
TEST_F(BraveTranslateBubbleViewTest, BraveBeforeTranslateView) {
CreateAndShowBubble();
views::Button* accept_button = static_cast<views::Button*>(
bubble_->GetViewByID(TranslateBubbleView::BUTTON_ID_TRANSLATE));
bubble_->GetViewByID(TranslateBubbleView::BUTTON_ID_DONE));
EXPECT_TRUE(accept_button);
views::Button* cancel_button = static_cast<views::Button*>(
bubble_->GetViewByID(TranslateBubbleView::BUTTON_ID_SHOW_ORIGINAL));
bubble_->GetViewByID(TranslateBubbleView::BUTTON_ID_CLOSE));
EXPECT_TRUE(cancel_button);
}
@@ -237,7 +234,7 @@ TEST_F(BraveTranslateBubbleViewTest, TranslateButton) {
EXPECT_FALSE(bubble_->install_google_translate_called());
// Press the "Translate" button.
PressButton(TranslateBubbleView::BUTTON_ID_TRANSLATE);
PressButton(TranslateBubbleView::BUTTON_ID_DONE);
EXPECT_FALSE(mock_model_->translate_called_);
EXPECT_TRUE(bubble_->install_google_translate_called());
}
@@ -247,7 +244,7 @@ TEST_F(BraveTranslateBubbleViewTest, CancelButton) {
EXPECT_FALSE(bubble_->GetWidget()->IsClosed());
// Press the "Cancel" button.
PressButton(TranslateBubbleView::BUTTON_ID_CANCEL);
PressButton(TranslateBubbleView::BUTTON_ID_CLOSE);
EXPECT_TRUE(bubble_->GetWidget()->IsClosed());
}
+35
View File
@@ -0,0 +1,35 @@
# Copyright 2020 The Brave Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
assert(current_toolchain == default_toolchain)
java_binary("java_bytecode_rewriter") {
sources = [
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveClassVisitor.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveHomepageManagerClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveLaunchIntentDispatcherClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveAndroidSyncSettingsClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveEditUrlSuggestionProcessorClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveFeedSurfaceCoordinatorClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveMainPreferenceBaseClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveNewTabPageClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveNewTabPageLayoutClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/BraveSearchEngineAdapterClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/ByteCodeProcessor.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/ClassPathValidator.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/ThreadAssertionClassAdapter.java",
"//brave/build/android/bytecode/java/org/brave/bytecode/TypeUtils.java",
]
main_class = "org.brave.bytecode.ByteCodeProcessor"
deps = [
"//third_party/android_deps:org_ow2_asm_asm_java",
"//third_party/android_deps:org_ow2_asm_asm_util_java",
]
wrapper_script_name = "helper/java_bytecode_rewriter"
enable_bytecode_checks = false
}
@@ -0,0 +1,41 @@
import("//build/config/python.gni")
brave_bytecode_jars = [
"obj/chrome/android/chrome_java.javac.jar",
"obj/components/sync/android/sync_java.javac.jar",
"obj/components/external_intents/android/java.javac.jar",
]
template("brave_bytecode_rewriter") {
_rebased_build_config = invoker._rebased_build_config
_java_bytecode_rewriter_input_jar = invoker._previous_output_jar
action_with_pydeps(target_name) {
script = "//brave/build/android/gyp/bytecode_processor.py"
_bytecode_rewriter_script =
"$root_build_dir/bin/helper/java_bytecode_rewriter"
deps = invoker._deps + [ "//brave/build/android/bytecode:java_bytecode_rewriter($default_toolchain)" ]
if (defined(invoker.deps)) {
deps += invoker.deps
}
inputs = [
_bytecode_rewriter_script,
_java_bytecode_rewriter_input_jar,
]
outputs = [ invoker._bytecode_rewriter_output_jar ]
args = [
"--script",
rebase_path(_bytecode_rewriter_script, root_build_dir),
"--input-jar",
rebase_path(_java_bytecode_rewriter_input_jar, root_build_dir),
"--output-jar",
rebase_path(invoker._bytecode_rewriter_output_jar, root_build_dir),
"--direct-classpath-jars",
"@FileArg($_rebased_build_config:javac:classpath)",
"--sdk-classpath-jars",
"@FileArg($_rebased_build_config:android:sdk_jars)",
"--extra-classpath-jars",
"@FileArg($_rebased_build_config:deps_info:javac_full_classpath)",
]
}
}
@@ -9,9 +9,9 @@ import org.objectweb.asm.ClassVisitor;
public class BraveAndroidSyncSettingsClassAdapter extends BraveClassVisitor {
static String sAndroidSyncSettingsClassName =
"org/chromium/components/sync/AndroidSyncSettings";
"org/chromium/chrome/browser/sync/AndroidSyncSettings";
static String sBraveAndroidSyncSettingsClassName =
"org/chromium/components/sync/BraveAndroidSyncSettings";
"org/chromium/chrome/browser/sync/BraveAndroidSyncSettings";
public BraveAndroidSyncSettingsClassAdapter(ClassVisitor visitor) {
super(visitor);
@@ -12,7 +12,6 @@ public class BraveClassAdapter {
chain = new BraveMainPreferenceBaseClassAdapter(chain);
chain = new BraveAndroidSyncSettingsClassAdapter(chain);
chain = new BraveLaunchIntentDispatcherClassAdapter(chain);
chain = new BraveExternalNavigationHandlerClassAdapter(chain);
chain = new BraveHomepageManagerClassAdapter(chain);
chain = new BraveManageSyncSettingsClassAdapter(chain);
chain = new BraveNewTabPageLayoutClassAdapter(chain);
@@ -1,29 +0,0 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.brave.bytecode;
import org.objectweb.asm.ClassVisitor;
public class BraveExternalNavigationHandlerClassAdapter extends BraveClassVisitor {
static String sBraveExternalNavigationHandlerClassName =
"org/chromium/chrome/browser/externalnav/BraveExternalNavigationHandler";
static String sExternalNavigationHandlerClassName =
"org/chromium/components/external_intents/ExternalNavigationHandler";
static String sMethodClobberCurrentTabWithFallbackUrl =
"clobberCurrentTabWithFallbackUrl";
public BraveExternalNavigationHandlerClassAdapter(ClassVisitor visitor) {
super(visitor);
deleteMethod(sBraveExternalNavigationHandlerClassName,
sMethodClobberCurrentTabWithFallbackUrl);
makePublicMethod(sExternalNavigationHandlerClassName,
sMethodClobberCurrentTabWithFallbackUrl);
}
}
@@ -0,0 +1,274 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.brave.bytecode;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.zip.CRC32;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
/**
* Java application that takes in an input jar, performs a series of bytecode
* transformations, and generates an output jar.
*/
class ByteCodeProcessor {
private static final String CLASS_FILE_SUFFIX = ".class";
private static final String TEMPORARY_FILE_SUFFIX = ".temp";
private static final int BUFFER_SIZE = 16384;
private static boolean sVerbose;
private static boolean sIsPrebuilt;
private static boolean sShouldUseThreadAnnotations;
private static boolean sShouldCheckClassPath;
private static ClassLoader sDirectClassPathClassLoader;
private static ClassLoader sFullClassPathClassLoader;
private static Set<String> sFullClassPathJarPaths;
private static Set<String> sMissingClassesAllowlist;
private static ClassPathValidator sValidator;
private static class EntryDataPair {
private final ZipEntry mEntry;
private final byte[] mData;
private EntryDataPair(ZipEntry mEntry, byte[] mData) {
this.mEntry = mEntry;
this.mData = mData;
}
private static EntryDataPair create(String zipPath, byte[] data) {
ZipEntry entry = new ZipEntry(zipPath);
entry.setMethod(ZipEntry.STORED);
entry.setTime(0);
entry.setSize(data.length);
CRC32 crc = new CRC32();
crc.update(data);
entry.setCrc(crc.getValue());
return new EntryDataPair(entry, data);
}
}
private static EntryDataPair processEntry(ZipEntry entry, byte[] data)
throws ClassPathValidator.ClassNotLoadedException {
// Copy all non-.class files to the output jar.
if (entry.isDirectory() || !entry.getName().endsWith(CLASS_FILE_SUFFIX)) {
return new EntryDataPair(entry, data);
}
ClassReader reader = new ClassReader(data);
if (sShouldCheckClassPath) {
sValidator.validateClassPathsAndOutput(reader, sDirectClassPathClassLoader,
sFullClassPathClassLoader, sFullClassPathJarPaths, sIsPrebuilt, sVerbose,
sMissingClassesAllowlist);
}
ClassWriter writer = new ClassWriter(reader, 0);
ClassVisitor chain = writer;
/* DEBUGGING:
To see objectweb.asm code that will generate bytecode for a given class:
java -cp
"third_party/android_deps/libs/org_ow2_asm_asm/asm-7.0.jar:third_party/android_deps/libs/org_ow2_asm_asm_util/asm-util-7.0.jar:out/Debug/lib.java/jar_containing_yourclass.jar"
org.objectweb.asm.util.ASMifier org.package.YourClassName
See this pdf for more details: https://asm.ow2.io/asm4-guide.pdf
To see the bytecode for a specific class, uncomment this code with your class name:
if (entry.getName().contains("YOUR_CLASS_NAME")) {
chain = new TraceClassVisitor(chain, new PrintWriter(System.out));
}
*/
if (sShouldUseThreadAnnotations) {
chain = new ThreadAssertionClassAdapter(chain);
}
chain = org.brave.bytecode.BraveClassAdapter.createAdapter(chain);
reader.accept(chain, 0);
byte[] patchedByteCode = writer.toByteArray();
return EntryDataPair.create(entry.getName(), patchedByteCode);
}
private static void process(String inputJarPath, String outputJarPath)
throws ClassPathValidator.ClassNotLoadedException, ExecutionException,
InterruptedException {
String tempJarPath = outputJarPath + TEMPORARY_FILE_SUFFIX;
ExecutorService executorService =
Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
try (ZipInputStream inputStream = new ZipInputStream(
new BufferedInputStream(new FileInputStream(inputJarPath)));
ZipOutputStream tempStream = new ZipOutputStream(
new BufferedOutputStream(new FileOutputStream(tempJarPath)))) {
List<Future<EntryDataPair>> list = new ArrayList<>();
while (true) {
ZipEntry entry = inputStream.getNextEntry();
if (entry == null) {
break;
}
byte[] data = readAllBytes(inputStream);
list.add(executorService.submit(() -> processEntry(entry, data)));
}
executorService.shutdown(); // This is essential in order to avoid waiting infinitely.
// Write the zip file entries in order to preserve determinism.
for (Future<EntryDataPair> futurePair : list) {
EntryDataPair pair = futurePair.get();
tempStream.putNextEntry(pair.mEntry);
tempStream.write(pair.mData);
tempStream.closeEntry();
}
} catch (IOException e) {
throw new RuntimeException(e);
}
try {
Path src = Paths.get(tempJarPath);
Path dest = Paths.get(outputJarPath);
Files.move(src, dest, StandardCopyOption.REPLACE_EXISTING);
} catch (IOException ioException) {
throw new RuntimeException(ioException);
}
if (sValidator.hasErrors()) {
System.err.println("Direct classpath is incomplete. To fix, add deps on the "
+ "GN target(s) that provide:");
for (Map.Entry<String, Map<String, Set<String>>> entry :
sValidator.getErrors().entrySet()) {
printValidationError(System.err, entry.getKey(), entry.getValue());
}
System.exit(1);
}
}
private static void printValidationError(
PrintStream out, String jarName, Map<String, Set<String>> missingClasses) {
out.print(" * ");
out.println(jarName);
int i = 0;
final int numErrorsPerJar = 2;
// The list of missing classes is non-exhaustive because each class that fails to validate
// reports only the first missing class.
for (Map.Entry<String, Set<String>> entry : missingClasses.entrySet()) {
String missingClass = entry.getKey();
Set<String> filesThatNeededIt = entry.getValue();
out.print(" * ");
if (i == numErrorsPerJar) {
out.print(String.format("And %d more...", missingClasses.size() - numErrorsPerJar));
break;
}
out.print(missingClass.replace('/', '.'));
out.print(" (needed by ");
out.print(filesThatNeededIt.iterator().next().replace('/', '.'));
if (filesThatNeededIt.size() > 1) {
out.print(String.format(" and %d more", filesThatNeededIt.size() - 1));
}
out.println(")");
i++;
}
}
private static byte[] readAllBytes(InputStream inputStream) throws IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int numRead = 0;
byte[] data = new byte[BUFFER_SIZE];
while ((numRead = inputStream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, numRead);
}
return buffer.toByteArray();
}
/**
* Loads a list of jars and returns a ClassLoader capable of loading all classes found in the
* given jars.
*/
static ClassLoader loadJars(Collection<String> paths) {
URL[] jarUrls = new URL[paths.size()];
int i = 0;
for (String path : paths) {
try {
jarUrls[i++] = new File(path).toURI().toURL();
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
return new URLClassLoader(jarUrls);
}
/**
* Extracts a length-encoded list of strings from the arguments, and adds them to |out|. Returns
* the new "next index" to be processed.
*/
private static int parseListArgument(String[] args, int index, Collection<String> out) {
int argLength = Integer.parseInt(args[index++]);
out.addAll(Arrays.asList(Arrays.copyOfRange(args, index, index + argLength)));
return index + argLength;
}
public static void main(String[] args) throws ClassPathValidator.ClassNotLoadedException,
ExecutionException, InterruptedException {
// Invoke this script using //build/android/gyp/bytecode_processor.py
int currIndex = 0;
String inputJarPath = args[currIndex++];
String outputJarPath = args[currIndex++];
sVerbose = args[currIndex++].equals("--verbose");
sIsPrebuilt = args[currIndex++].equals("--is-prebuilt");
sShouldUseThreadAnnotations = args[currIndex++].equals("--enable-thread-annotations");
sShouldCheckClassPath = args[currIndex++].equals("--enable-check-class-path");
sMissingClassesAllowlist = new HashSet<>();
currIndex = parseListArgument(args, currIndex, sMissingClassesAllowlist);
ArrayList<String> sdkJarPaths = new ArrayList<>();
currIndex = parseListArgument(args, currIndex, sdkJarPaths);
ArrayList<String> directClassPathJarPaths = new ArrayList<>();
directClassPathJarPaths.add(inputJarPath);
directClassPathJarPaths.addAll(sdkJarPaths);
currIndex = parseListArgument(args, currIndex, directClassPathJarPaths);
sDirectClassPathClassLoader = loadJars(directClassPathJarPaths);
// Load all jars that are on the classpath for the input jar for analyzing class
// hierarchy.
sFullClassPathJarPaths = new HashSet<>();
sFullClassPathJarPaths.clear();
sFullClassPathJarPaths.add(inputJarPath);
sFullClassPathJarPaths.addAll(sdkJarPaths);
sFullClassPathJarPaths.addAll(
Arrays.asList(Arrays.copyOfRange(args, currIndex, args.length)));
sFullClassPathClassLoader = loadJars(sFullClassPathJarPaths);
sFullClassPathJarPaths.removeAll(directClassPathJarPaths);
sValidator = new ClassPathValidator();
process(inputJarPath, outputJarPath);
}
}
@@ -0,0 +1,172 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.brave.bytecode;
import org.objectweb.asm.ClassReader;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
/**
* Checks classpaths (given as ClassLoaders) by reading the constant pool of the class file and
* attempting to load every referenced class. If there are some that are unable to be found, it
* stores a helpful error message if it knows where it might find them, and exits the program if it
* can't find the class with any given classpath.
*/
public class ClassPathValidator {
// Map of missing .jar -> Missing class -> Classes that failed.
// TreeMap so that error messages have sorted list of jars.
private final Map<String, Map<String, Set<String>>> mErrors = new TreeMap<>();
static class ClassNotLoadedException extends ClassNotFoundException {
private final String mClassName;
ClassNotLoadedException(String className, Throwable ex) {
super("Couldn't load " + className, ex);
mClassName = className;
}
public String getClassName() {
return mClassName;
}
}
private static void printAndQuit(ClassNotLoadedException e, ClassReader classReader,
boolean verbose) throws ClassNotLoadedException {
System.err.println("Class \"" + e.getClassName()
+ "\" not found on any classpath. Used by class \"" + classReader.getClassName()
+ "\"");
if (verbose) {
throw e;
}
System.exit(1);
}
private static void validateClass(ClassLoader classLoader, String className)
throws ClassNotLoadedException {
if (className.startsWith("[")) {
// Dealing with an array type which isn't encoded nicely in the constant pool.
// For example, [[Lorg/chromium/Class$1;
className = className.substring(className.lastIndexOf('[') + 1);
if (className.charAt(0) == 'L' && className.endsWith(";")) {
className = className.substring(1, className.length() - 1);
} else {
// Bailing out if we have an non-class array type.
// This could be something like [B
return;
}
}
if (className.matches(".*\\bR(\\$\\w+)?$")) {
// Resources in R.java files are not expected to be valid at this stage in the build.
return;
}
if (className.matches("^libcore\\b.*")) {
// libcore exists on devices, but is not included in the Android sdk as it is a private
// API.
return;
}
try {
classLoader.loadClass(className.replace('/', '.'));
} catch (ClassNotFoundException e) {
throw new ClassNotLoadedException(className, e);
} catch (NoClassDefFoundError e) {
// We assume that this is caused by another class that is not going to able to be
// loaded, so we will skip this and let that class fail with ClassNotFoundException.
}
}
/**
* Given a .class file, see if every class referenced in the main class' constant pool can be
* loaded by the given ClassLoader.
*
* @param classReader .class file interface for reading the constant pool.
* @param classLoader classpath you wish to validate.
* @throws ClassNotLoadedException thrown if it can't load a certain class.
*/
private static void validateClassPath(ClassReader classReader, ClassLoader classLoader)
throws ClassNotLoadedException {
char[] charBuffer = new char[classReader.getMaxStringLength()];
// According to the Java spec, the constant pool is indexed from 1 to constant_pool_count -
// 1. See https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4
for (int i = 1; i < classReader.getItemCount(); i++) {
int offset = classReader.getItem(i);
// Class entries correspond to 7 in the constant pool
// https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4
if (offset > 0 && classReader.readByte(offset - 1) == 7) {
validateClass(classLoader, classReader.readUTF8(offset, charBuffer));
}
}
}
public void validateClassPathsAndOutput(ClassReader classReader,
ClassLoader directClassPathClassLoader, ClassLoader fullClassPathClassLoader,
Collection<String> jarsOnlyInFullClassPath, boolean isPrebuilt, boolean verbose,
Set<String> missingClassAllowlist) throws ClassNotLoadedException {
if (isPrebuilt) {
// Prebuilts only need transitive dependencies checked, not direct dependencies.
try {
validateClassPath(classReader, fullClassPathClassLoader);
} catch (ClassNotLoadedException e) {
if (!missingClassAllowlist.contains(e.getClassName())) {
printAndQuit(e, classReader, verbose);
}
}
} else {
try {
validateClassPath(classReader, directClassPathClassLoader);
} catch (ClassNotLoadedException e) {
try {
validateClass(fullClassPathClassLoader, e.getClassName());
} catch (ClassNotLoadedException d) {
if (!missingClassAllowlist.contains(d.getClassName())) {
printAndQuit(d, classReader, verbose);
}
}
if (verbose) {
System.err.println("Class \"" + e.getClassName()
+ "\" not found in direct dependencies,"
+ " but found in indirect dependiences.");
}
// Iterating through all jars that are in the full classpath but not the direct
// classpath to find which one provides the class we are looking for.
for (String jarPath : jarsOnlyInFullClassPath) {
try {
ClassLoader smallLoader =
ByteCodeProcessor.loadJars(Collections.singletonList(jarPath));
validateClass(smallLoader, e.getClassName());
Map<String, Set<String>> failedClassesByMissingClass = mErrors.get(jarPath);
if (failedClassesByMissingClass == null) {
// TreeMap so that error messages have sorted list of classes.
failedClassesByMissingClass = new TreeMap<>();
mErrors.put(jarPath, failedClassesByMissingClass);
}
Set<String> failedClasses =
failedClassesByMissingClass.get(e.getClassName());
if (failedClasses == null) {
failedClasses = new TreeSet<>();
failedClassesByMissingClass.put(e.getClassName(), failedClasses);
}
failedClasses.add(classReader.getClassName());
break;
} catch (ClassNotLoadedException f) {
}
}
}
}
}
public Map<String, Map<String, Set<String>>> getErrors() {
return mErrors;
}
public boolean hasErrors() {
return !mErrors.isEmpty();
}
}
@@ -0,0 +1,84 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.brave.bytecode;
import static org.objectweb.asm.Opcodes.ASM7;
import static org.objectweb.asm.Opcodes.INVOKESTATIC;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
/**
* A ClassVisitor which adds calls to
* {@link org.chromium.base.ThreadUtils}'s assertOnUiThread/assertOnBackgroundThread when the
* corresponding {@link androidx.annotation.UiThread} or
* {@link androidx.annotation.WorkerThread} annotations are present. The function calls
* are placed at the start of the method.
*/
class ThreadAssertionClassAdapter extends ClassVisitor {
private static final String THREAD_UTILS_DESCRIPTOR = "org/chromium/base/ThreadUtils";
private static final String THREAD_UTILS_SIGNATURE = "()V";
private static final String UI_THREAD_ANNOTATION_DESCRIPTOR =
"Landroid/support/annotation/UiThread;";
private static final String WORKER_THREAD_ANNOTATION_DESCRIPTOR =
"Landroid/support/annotation/WorkerThread;";
ThreadAssertionClassAdapter(ClassVisitor visitor) {
super(ASM7, visitor);
}
@Override
public MethodVisitor visitMethod(final int access, final String name, String desc,
String signature, String[] exceptions) {
return new AddAssertMethodVisitor(
super.visitMethod(access, name, desc, signature, exceptions));
}
private static class AddAssertMethodVisitor extends MethodVisitor {
String mAssertMethodName = "";
AddAssertMethodVisitor(MethodVisitor mv) {
super(ASM7, mv);
}
/**
* Call for annotations on the method. Checks if the annotation is @UiThread
* or @WorkerThread, and if so will set the mAssertMethodName property to the name of the
* method to call in order to assert that a method is running on the intented thread.
*
* @param descriptor Annotation descriptor containing its name and package.
*/
@Override
public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
switch (descriptor) {
case UI_THREAD_ANNOTATION_DESCRIPTOR:
mAssertMethodName = "assertOnUiThread";
break;
case WORKER_THREAD_ANNOTATION_DESCRIPTOR:
mAssertMethodName = "assertOnBackgroundThread";
break;
default:
break;
}
return super.visitAnnotation(descriptor, visible);
}
/**
* Called to start visiting code. Will also insert the assertOnXThread methods at the start
* of the method if needed.
*/
@Override
public void visitCode() {
super.visitCode();
if (!mAssertMethodName.equals("")) {
visitMethodInsn(INVOKESTATIC, THREAD_UTILS_DESCRIPTOR, mAssertMethodName,
THREAD_UTILS_SIGNATURE, false);
}
}
}
}
@@ -0,0 +1,88 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.brave.bytecode;
import org.objectweb.asm.Type;
import java.util.HashMap;
import java.util.Map;
/**
* Utility methods for accessing {@link Type}s Strings.
*
* Useful definitions to keep in mind when using this class:
* Internal name - The fully qualified name for a type with dots replaced by slashes. Not really
* relevant for primitive types.
* Type descriptor - Single letters for primitive types, "L" + internal name + ";" for class types.
*
* The methods in this class accept internal names or primitive type descriptors.
*/
class TypeUtils {
static final String ASSERTION_ERROR = "java/lang/AssertionError";
static final String ASSET_MANAGER = "android/content/res/AssetManager";
static final String BUILD_HOOKS = "org/chromium/build/BuildHooks";
static final String BUILD_HOOKS_ANDROID = "org/chromium/build/BuildHooksAndroid";
static final String CONFIGURATION = "android/content/res/Configuration";
static final String CONTEXT = "android/content/Context";
static final String CONTEXT_WRAPPER = "android/content/ContextWrapper";
static final String RESOURCES = "android/content/res/Resources";
static final String STRING = "java/lang/String";
static final String THEME = "android/content/res/Resources$Theme";
static final String BOOLEAN = "Z";
static final String INT = "I";
static final String VOID = "V";
private static final Map<String, Type> PRIMITIVE_DESCRIPTORS;
static {
PRIMITIVE_DESCRIPTORS = new HashMap<>();
PRIMITIVE_DESCRIPTORS.put(Type.BOOLEAN_TYPE.toString(), Type.BOOLEAN_TYPE);
PRIMITIVE_DESCRIPTORS.put(Type.INT_TYPE.toString(), Type.INT_TYPE);
PRIMITIVE_DESCRIPTORS.put(Type.VOID_TYPE.toString(), Type.VOID_TYPE);
}
/**
* Returns the full method signature with internal names.
*
* @param methodName Name of the method (ex. "getResources").
* @param returnType Internal name for the return type.
* @param argumentTypes List of internal names for argument types.
* @return String representation of the method signature.
*/
static String getMethodSignature(
String methodName, String returnType, String... argumentTypes) {
return methodName + getMethodDescriptor(returnType, argumentTypes);
}
/**
* Builds a method descriptor suitable for use with {@link org.objectweb.asm.MethodVisitor}.
*
* @param returnType Internal name for the return type of the method (primitive or class).
* @param argumentTypes Internal names for the argument types (primitive or class).
* @return The generated method descriptor.
*/
static String getMethodDescriptor(String returnType, String... argumentTypes) {
Type[] typedArguments = new Type[argumentTypes.length];
for (int i = 0; i < argumentTypes.length; ++i) {
// Argument list should be empty in this case, not V (void).
assert !Type.VOID_TYPE.toString().equals(argumentTypes[i]);
typedArguments[i] = convert(argumentTypes[i]);
}
return Type.getMethodDescriptor(convert(returnType), typedArguments);
}
/**
* Converts an internal name for a type to a {@link Type}.
*
* @param type Internal name for a type (primitive or class).
* @return The resulting Type.
*/
private static Type convert(String type) {
if (PRIMITIVE_DESCRIPTORS.containsKey(type)) {
return PRIMITIVE_DESCRIPTORS.get(type);
}
return Type.getObjectType(type);
}
}
-15
View File
@@ -1,15 +0,0 @@
brave_java_bytecode_files = [
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveClassVisitor.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveHomepageManagerClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveLaunchIntentDispatcherClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveAndroidSyncSettingsClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveEditUrlSuggestionProcessorClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveExternalNavigationHandlerClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveFeedSurfaceCoordinatorClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveMainPreferenceBaseClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveManageSyncSettingsClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveNewTabPageClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveNewTabPageLayoutClassAdapter.java",
"../../../brave/build/android/bytecode/java/org/brave/bytecode/BraveSearchEngineAdapterClassAdapter.java",
]
+6 -2
View File
@@ -1,7 +1,6 @@
import("//brave/android/brave_java_resources.gni")
import("//brave/android/brave_java_sources.gni")
import("//brave/build/android/bytecode/java_sources.gni")
import("//brave/components/sync/android/java_sources.gni")
import("//brave/build/android/bytecode/bytecode_rewriter.gni")
declare_args() {
brave_android_manifest_includes = []
@@ -39,3 +38,8 @@ brave_components_browser_ui_site_settings_android_java_resources_deps = [
brave_resources_exclusion_exceptions = [
"*com_google_android_material_material*design_bottom_*"
]
brave_resource_values_filter_rules_exclusions = [
"*com_google_android_material_material*:[Bb]ottomSheet",
"*com_google_android_material_material*:[Ff]loatingActionButton",
]
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env python
# Copyright 2020 The Brave Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Wraps bin/helper/java_bytecode_rewriter and expands @FileArgs."""
import argparse
import os
import subprocess
import sys
sys.path.append('../../build/android/gyp/util')
import build_utils
def _AddSwitch(parser, val):
parser.add_argument(
val, action='store_const', default='--disabled', const=val)
def main(argv):
argv = build_utils.ExpandFileArgs(argv[1:])
parser = argparse.ArgumentParser()
parser.add_argument('--script', required=True,
help='Path to the java binary wrapper script.')
parser.add_argument('--input-jar', required=True)
parser.add_argument('--output-jar', required=True)
parser.add_argument('--direct-classpath-jars', required=True)
parser.add_argument('--sdk-classpath-jars', required=True)
parser.add_argument('--extra-classpath-jars', dest='extra_jars',
action='append', default=[],
help='Extra inputs, passed last to the binary script.')
parser.add_argument('-v', '--verbose', action='store_true')
parser.add_argument('--missing-classes-allowlist')
_AddSwitch(parser, '--is-prebuilt')
_AddSwitch(parser, '--enable-thread-annotations')
_AddSwitch(parser, '--enable-check-class-path')
args = parser.parse_args(argv)
sdk_jars = build_utils.ParseGnList(args.sdk_classpath_jars)
assert len(sdk_jars) > 0
direct_jars = build_utils.ParseGnList(args.direct_classpath_jars)
assert len(direct_jars) > 0
extra_classpath_jars = []
for a in args.extra_jars:
extra_classpath_jars.extend(build_utils.ParseGnList(a))
args.missing_classes_allowlist = build_utils.ParseGnList(
args.missing_classes_allowlist)
if args.verbose:
verbose = '--verbose'
else:
verbose = '--not-verbose'
cmd = ([
args.script, args.input_jar, args.output_jar, verbose, args.is_prebuilt,
args.enable_thread_annotations, args.enable_check_class_path
] + [str(len(args.missing_classes_allowlist))] +
args.missing_classes_allowlist + [str(len(sdk_jars))] + sdk_jars +
[str(len(direct_jars))] + direct_jars + extra_classpath_jars)
subprocess.check_call(cmd)
if __name__ == '__main__':
sys.exit(main(sys.argv))
@@ -0,0 +1,5 @@
# Generated by running:
# build/print_python_deps.py --root build/android/gyp --output build/android/gyp/bytecode_processor.pydeps build/android/gyp/bytecode_processor.py
bytecode_processor.py
../../../../build/android/gyp/util/__init__.py
../../../../build/android/gyp/util/build_utils.py
+2
View File
@@ -95,6 +95,7 @@ const Config = function () {
this.updaterProdEndpoint = getNPMConfig(['updater_prod_endpoint']) || ''
this.updaterDevEndpoint = getNPMConfig(['updater_dev_endpoint']) || ''
this.webcompatReportApiEndpoint = getNPMConfig(['webcompat_report_api_endpoint']) || 'https://webcompat.brave.com/1/webcompat'
this.chromePgoPhase = 0
// this.buildProjects()
this.braveVersion = getNPMConfig(['version']) || '0.0.0'
this.androidOverrideVersionName = this.braveVersion
@@ -204,6 +205,7 @@ Config.prototype.buildArgs = function () {
enable_hangout_services_extension: this.enable_hangout_services_extension,
enable_cdm_host_verification: this.enableCDMHostVerification(),
skip_signing: !this.shouldSign(),
chrome_pgo_phase: this.chromePgoPhase,
...this.extraGnArgs,
}
+4 -1
View File
@@ -167,6 +167,9 @@ const util = {
"src/chrome/tools/test/reference_build/chrome_linux": "%None%",
"src/chrome/tools/test/reference_build/chrome_mac": "%None%",
"src/chrome/tools/test/reference_build/chrome_win": "%None%"
},
custom_vars: {
"checkout_pgo_profiles": "%False%"
}
},
{
@@ -179,7 +182,7 @@ const util = {
let cache_dir = process.env.GIT_CACHE_PATH ? ('\ncache_dir = "' + process.env.GIT_CACHE_PATH + '"\n') : '\n'
let out = 'solutions = ' + JSON.stringify(solutions, replacer, 2)
.replace(/"%None%"/g, "None").replace(/"%False%"/g, "False") + cache_dir
.replace(/"%None%"/g, "None").replace(/"%False%"/g, "False").replace(/"%True%"/g, "True") + cache_dir
if (config.targetOS === 'android') {
out = out + "target_os = [ 'android' ]"
+1
View File
@@ -2,6 +2,7 @@
# This file is included in most gn files either directly or through
# import("//build/config/chrome_build.gni") in compiler.gni
import("//brave/brave_repack_locales.gni")
import("//brave/browser/extensions/resources.gni")
import("//brave/build/config/compiler.gni")
import("//brave/build/features.gni")
import("//brave/components/sync/sources.gni")
@@ -48,6 +48,7 @@ using ntp_background_images::features::kBraveNTPSuperReferralWallpaper;
#endif
#define BRAVE_FEATURE_ENTRIES \
, \
{"use-dev-updater-url", \
flag_descriptions::kUseDevUpdaterUrlName, \
flag_descriptions::kUseDevUpdaterUrlDescription, kOsAll, \
@@ -0,0 +1,51 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */
#include "chrome/browser/extensions/chrome_component_extension_resource_manager.h"
#include "brave/components/brave_extension/grit/brave_extension_generated_map.h"
#include "brave/components/brave_extension/grit/brave_extension_resources_map.h"
#include "brave/components/brave_rewards/browser/buildflags/buildflags.h"
#include "brave/components/brave_webtorrent/browser/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_BRAVE_WEBTORRENT)
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_generated_map.h"
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources_map.h"
#endif
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources_map.h"
#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_panel_generated_map.h"
#endif
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
#define BRAVE_REWARDS_EXTENSION_RESOURCES \
AddComponentResourceEntries(kBraveRewardsExtensionResources, \
kBraveRewardsExtensionResourcesSize); \
AddComponentResourceEntries(kBraveRewardsPanelGenerated, \
kBraveRewardsPanelGeneratedSize);
#else
#define BRAVE_REWARDS_EXTENSION_RESOURCES
#endif
#if BUILDFLAG(ENABLE_BRAVE_WEBTORRENT)
#define BRAVE_WEBTORRENT_RESOURCES \
AddComponentResourceEntries(kBraveWebtorrentResources, \
kBraveWebtorrentResourcesSize); \
AddComponentResourceEntries(kBraveWebtorrentGenerated, \
kBraveWebtorrentGeneratedSize);
#else
#define BRAVE_WEBTORRENT_RESOURCES
#endif
#define BRAVE_CHROME_COMPONENT_EXTENSION_RESOURCE_MANAGER_DATA_DATA \
AddComponentResourceEntries(kBraveExtension, kBraveExtensionSize); \
AddComponentResourceEntries(kBraveExtensionGenerated, \
kBraveExtensionGeneratedSize); \
BRAVE_REWARDS_EXTENSION_RESOURCES \
BRAVE_WEBTORRENT_RESOURCES
#include "../../../../../chrome/browser/extensions/chrome_component_extension_resource_manager.cc"
#undef BRAVE_CHROME_COMPONENT_EXTENSION_RESOURCE_MANAGER_DATA_DATA

Some files were not shown because too many files have changed in this diff Show More