Commit 7d450e40 authored by Xinghui Lu's avatar Xinghui Lu Committed by Commit Bot

[Android] Add settings fragments for Safe Browsing modes.

Add EnhancedProtectionSettingsFragment and
StandardProtectionSettingsFragment. They are launched when the expand
arrows on the Safe Browsing radio buttons are clicked.

Add an interface named FragmentSettingsLauncher, which is used to
inject an instance of SettingsLauncher to SecuritySettingsFragment.

Enhanced protection screenshot: http://screen/QvKbx401JAE
Standard protection screenshot: http://screen/KdwYdsgcUf5

Bug: 1097310
Fixed: 1072800
Change-Id: I4316e261d85d8e12cd8dd40199c86cd318aed7b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298727
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avatarNatalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790274}
parent 47d00edc
...@@ -80,6 +80,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ...@@ -80,6 +80,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
private static boolean sActivityNotExportedChecked; private static boolean sActivityNotExportedChecked;
/** An instance of settings launcher that can be injected into a fragment */
private SettingsLauncher mSettingsLauncher = new SettingsLauncherImpl();
@SuppressLint("InlinedApi") @SuppressLint("InlinedApi")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -270,6 +273,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ...@@ -270,6 +273,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
if (fragment instanceof SiteSettingsPreferenceFragment) { if (fragment instanceof SiteSettingsPreferenceFragment) {
((SiteSettingsPreferenceFragment) fragment) ((SiteSettingsPreferenceFragment) fragment)
.setSiteSettingsClient(new ChromeSiteSettingsClient(this)); .setSiteSettingsClient(new ChromeSiteSettingsClient(this));
} else if (fragment instanceof FragmentSettingsLauncher) {
FragmentSettingsLauncher framentSettingsLauncher = (FragmentSettingsLauncher) fragment;
framentSettingsLauncher.setSettingsLauncher(mSettingsLauncher);
} else if (fragment instanceof SafetyCheckSettingsFragment) { } else if (fragment instanceof SafetyCheckSettingsFragment) {
SafetyCheckCoordinator.create((SafetyCheckSettingsFragment) fragment, SafetyCheckCoordinator.create((SafetyCheckSettingsFragment) fragment,
new SafetyCheckUpdatesDelegateImpl(this)); new SafetyCheckUpdatesDelegateImpl(this));
......
...@@ -21,14 +21,17 @@ source_set("android") { ...@@ -21,14 +21,17 @@ source_set("android") {
android_library("java") { android_library("java") {
sources = [ sources = [
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java", "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java",
"java/src/org/chromium/chrome/browser/safe_browsing/settings/EnhancedProtectionSettingsFragment.java",
"java/src/org/chromium/chrome/browser/safe_browsing/settings/RadioButtonGroupSafeBrowsingPreference.java", "java/src/org/chromium/chrome/browser/safe_browsing/settings/RadioButtonGroupSafeBrowsingPreference.java",
"java/src/org/chromium/chrome/browser/safe_browsing/settings/SecuritySettingsFragment.java", "java/src/org/chromium/chrome/browser/safe_browsing/settings/SecuritySettingsFragment.java",
"java/src/org/chromium/chrome/browser/safe_browsing/settings/StandardProtectionSettingsFragment.java",
] ]
deps = [ deps = [
":java_resources", ":java_resources",
"//base:base_java", "//base:base_java",
"//base:jni_java", "//base:jni_java",
"//chrome/browser/flags:java", "//chrome/browser/flags:java",
"//chrome/browser/settings:java",
"//components/browser_ui/settings/android:java", "//components/browser_ui/settings/android:java",
"//components/browser_ui/widget/android:java", "//components/browser_ui/widget/android:java",
"//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/android_deps:androidx_annotation_annotation_java",
...@@ -47,19 +50,23 @@ android_library("javatests") { ...@@ -47,19 +50,23 @@ android_library("javatests") {
":java", ":java",
"//base:base_java_test_support", "//base:base_java_test_support",
"//chrome/browser/flags:java", "//chrome/browser/flags:java",
"//chrome/browser/settings:java",
"//chrome/browser/settings:test_support_java", "//chrome/browser/settings:test_support_java",
"//chrome/test/android:chrome_java_test_support", "//chrome/test/android:chrome_java_test_support",
"//components/browser_ui/widget/android:java", "//components/browser_ui/widget/android:java",
"//content/public/test/android:content_java_test_support", "//content/public/test/android:content_java_test_support",
"//third_party/android_deps:androidx_test_runner_java", "//third_party/android_deps:androidx_test_runner_java",
"//third_party/junit", "//third_party/junit",
"//third_party/mockito:mockito_java",
] ]
} }
android_resources("java_resources") { android_resources("java_resources") {
sources = [ sources = [
"java/res/layout/radio_button_group_safe_browsing_preference.xml", "java/res/layout/radio_button_group_safe_browsing_preference.xml",
"java/res/xml/enhanced_protection_preferences.xml",
"java/res/xml/security_preferences.xml", "java/res/xml/security_preferences.xml",
"java/res/xml/standard_protection_preferences.xml",
] ]
deps = [ deps = [
"//chrome/browser/ui/android/strings:ui_strings_grd", "//chrome/browser/ui/android/strings:ui_strings_grd",
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:key="subtitle"
android:title="@string/safe_browsing_enhanced_protection_subtitle"
app:allowDividerBelow="false" />
<!-- TODO(crbug.com/1097310): Add other views under this preference page. -->
</PreferenceScreen>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:key="subtitle"
android:title="@string/safe_browsing_standard_protection_subtitle"
app:allowDividerBelow="false" />
<!-- TODO(crbug.com/1097310): Add other views under this preference page. -->
</PreferenceScreen>
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.safe_browsing.settings;
import android.os.Bundle;
import androidx.preference.PreferenceFragmentCompat;
import org.chromium.components.browser_ui.settings.SettingsUtils;
/**
* Fragment containing enhanced protection settings.
*/
public class EnhancedProtectionSettingsFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle bundle, String rootKey) {
SettingsUtils.addPreferencesFromResource(this, R.xml.enhanced_protection_preferences);
getActivity().setTitle(R.string.prefs_section_safe_browsing_title);
}
}
...@@ -20,17 +20,38 @@ import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionAndAu ...@@ -20,17 +20,38 @@ import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionAndAu
import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionLayout; import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionLayout;
/** /**
* <p>
* A radio button group used for Safe Browsing. Currently, it has 3 options: Enhanced Protection, * A radio button group used for Safe Browsing. Currently, it has 3 options: Enhanced Protection,
* Standard Protection and No Protection. When the Enhanced Protection flag is disabled, the * Standard Protection and No Protection. When the Enhanced Protection flag is disabled, the
* Enhanced Protection option will be removed. * Enhanced Protection option will be removed.
* </p>
*
* <p>
* This preference also provides an interface {@link
* RadioButtonGroupSafeBrowsingPreference.OnSafeBrowsingModeDetailsRequested} that is triggered when
* more information of a Safe Browsing mode is requested.
* </p>
*/ */
public class RadioButtonGroupSafeBrowsingPreference public class RadioButtonGroupSafeBrowsingPreference extends Preference
extends Preference implements RadioGroup.OnCheckedChangeListener { implements RadioGroup.OnCheckedChangeListener,
RadioButtonWithDescriptionAndAuxButton.OnAuxButtonClickedListener {
/**
* Interface that will subscribe to Safe Browsing mode details requested events.
*/
public interface OnSafeBrowsingModeDetailsRequested {
/**
* Notify that details of a Safe Browsing mode are requested.
* @param safeBrowsingState The Safe Browsing mode that is requested for more details.
*/
void onSafeBrowsingModeDetailsRequested(@SafeBrowsingState int safeBrowsingState);
}
private @Nullable RadioButtonWithDescriptionAndAuxButton mEnhancedProtection; private @Nullable RadioButtonWithDescriptionAndAuxButton mEnhancedProtection;
private RadioButtonWithDescriptionAndAuxButton mStandardProtection; private RadioButtonWithDescriptionAndAuxButton mStandardProtection;
private RadioButtonWithDescription mNoProtection; private RadioButtonWithDescription mNoProtection;
private @SafeBrowsingState int mSafeBrowsingState; private @SafeBrowsingState int mSafeBrowsingState;
private boolean mIsEnhancedProtectionEnabled; private boolean mIsEnhancedProtectionEnabled;
private OnSafeBrowsingModeDetailsRequested mSafeBrowsingModeDetailsRequestedListener;
public RadioButtonGroupSafeBrowsingPreference(Context context, AttributeSet attrs) { public RadioButtonGroupSafeBrowsingPreference(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
...@@ -72,9 +93,11 @@ public class RadioButtonGroupSafeBrowsingPreference ...@@ -72,9 +93,11 @@ public class RadioButtonGroupSafeBrowsingPreference
mEnhancedProtection = (RadioButtonWithDescriptionAndAuxButton) holder.findViewById( mEnhancedProtection = (RadioButtonWithDescriptionAndAuxButton) holder.findViewById(
R.id.enhanced_protection); R.id.enhanced_protection);
mEnhancedProtection.setVisibility(View.VISIBLE); mEnhancedProtection.setVisibility(View.VISIBLE);
mEnhancedProtection.setAuxButtonClickedListener(this);
} }
mStandardProtection = (RadioButtonWithDescriptionAndAuxButton) holder.findViewById( mStandardProtection = (RadioButtonWithDescriptionAndAuxButton) holder.findViewById(
R.id.standard_protection); R.id.standard_protection);
mStandardProtection.setAuxButtonClickedListener(this);
mNoProtection = (RadioButtonWithDescription) holder.findViewById(R.id.no_protection); mNoProtection = (RadioButtonWithDescription) holder.findViewById(R.id.no_protection);
RadioButtonWithDescriptionLayout groupLayout = RadioButtonWithDescriptionLayout groupLayout =
(RadioButtonWithDescriptionLayout) mNoProtection.getRootView(); (RadioButtonWithDescriptionLayout) mNoProtection.getRootView();
...@@ -91,6 +114,31 @@ public class RadioButtonGroupSafeBrowsingPreference ...@@ -91,6 +114,31 @@ public class RadioButtonGroupSafeBrowsingPreference
mNoProtection.setChecked(mSafeBrowsingState == SafeBrowsingState.NO_SAFE_BROWSING); mNoProtection.setChecked(mSafeBrowsingState == SafeBrowsingState.NO_SAFE_BROWSING);
} }
@Override
public void onAuxButtonClicked(int clickedButtonId) {
assert mSafeBrowsingModeDetailsRequestedListener
!= null : "The listener should be set if the aux button is clickable.";
if (mIsEnhancedProtectionEnabled && clickedButtonId == mEnhancedProtection.getId()) {
mSafeBrowsingModeDetailsRequestedListener.onSafeBrowsingModeDetailsRequested(
SafeBrowsingState.ENHANCED_PROTECTION);
} else if (clickedButtonId == mStandardProtection.getId()) {
mSafeBrowsingModeDetailsRequestedListener.onSafeBrowsingModeDetailsRequested(
SafeBrowsingState.STANDARD_PROTECTION);
} else {
assert false : "Should not be reached.";
}
}
/**
* Sets a listener that will be notified when details of a Safe Browsing mode are requested.
* @param listener New listener that will be notified when details of a Safe Browsing mode are
* requested.
*/
public void setSafeBrowsingModeDetailsRequestedListener(
OnSafeBrowsingModeDetailsRequested listener) {
mSafeBrowsingModeDetailsRequestedListener = listener;
}
@VisibleForTesting @VisibleForTesting
public @SafeBrowsingState int getSafeBrowsingStateForTesting() { public @SafeBrowsingState int getSafeBrowsingStateForTesting() {
return mSafeBrowsingState; return mSafeBrowsingState;
......
...@@ -12,15 +12,22 @@ import androidx.preference.PreferenceFragmentCompat; ...@@ -12,15 +12,22 @@ import androidx.preference.PreferenceFragmentCompat;
import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge; import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
import org.chromium.chrome.browser.safe_browsing.SafeBrowsingState; import org.chromium.chrome.browser.safe_browsing.SafeBrowsingState;
import org.chromium.chrome.browser.settings.FragmentSettingsLauncher;
import org.chromium.chrome.browser.settings.SettingsLauncher;
import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.browser_ui.settings.SettingsUtils;
/** /**
* Fragment containing security settings. * Fragment containing security settings.
*/ */
public class SecuritySettingsFragment extends PreferenceFragmentCompat { public class SecuritySettingsFragment extends PreferenceFragmentCompat
implements FragmentSettingsLauncher,
RadioButtonGroupSafeBrowsingPreference.OnSafeBrowsingModeDetailsRequested {
@VisibleForTesting @VisibleForTesting
public static final String PREF_SAFE_BROWSING = "safe_browsing_radio_button_group"; public static final String PREF_SAFE_BROWSING = "safe_browsing_radio_button_group";
// An instance of SettingsLauncher that is used to launch Safe Browsing subsections.
private SettingsLauncher mSettingsLauncher;
@Override @Override
public void onCreatePreferences(Bundle bundle, String s) { public void onCreatePreferences(Bundle bundle, String s) {
SettingsUtils.addPreferencesFromResource(this, R.xml.security_preferences); SettingsUtils.addPreferencesFromResource(this, R.xml.security_preferences);
...@@ -31,6 +38,7 @@ public class SecuritySettingsFragment extends PreferenceFragmentCompat { ...@@ -31,6 +38,7 @@ public class SecuritySettingsFragment extends PreferenceFragmentCompat {
safeBrowsingPreference.init(SafeBrowsingBridge.getSafeBrowsingState(), safeBrowsingPreference.init(SafeBrowsingBridge.getSafeBrowsingState(),
ChromeFeatureList.isEnabled( ChromeFeatureList.isEnabled(
ChromeFeatureList.SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED)); ChromeFeatureList.SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED));
safeBrowsingPreference.setSafeBrowsingModeDetailsRequestedListener(this);
safeBrowsingPreference.setOnPreferenceChangeListener((preference, newValue) -> { safeBrowsingPreference.setOnPreferenceChangeListener((preference, newValue) -> {
@SafeBrowsingState @SafeBrowsingState
int newState = (int) newValue; int newState = (int) newValue;
...@@ -38,4 +46,22 @@ public class SecuritySettingsFragment extends PreferenceFragmentCompat { ...@@ -38,4 +46,22 @@ public class SecuritySettingsFragment extends PreferenceFragmentCompat {
return true; return true;
}); });
} }
@Override
public void onSafeBrowsingModeDetailsRequested(@SafeBrowsingState int safeBrowsingState) {
if (safeBrowsingState == SafeBrowsingState.ENHANCED_PROTECTION) {
mSettingsLauncher.launchSettingsActivity(
getActivity(), EnhancedProtectionSettingsFragment.class);
} else if (safeBrowsingState == SafeBrowsingState.STANDARD_PROTECTION) {
mSettingsLauncher.launchSettingsActivity(
getActivity(), StandardProtectionSettingsFragment.class);
} else {
assert false : "Should not be reached";
}
}
@Override
public void setSettingsLauncher(SettingsLauncher settingsLauncher) {
mSettingsLauncher = settingsLauncher;
}
} }
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.safe_browsing.settings;
import android.os.Bundle;
import androidx.preference.PreferenceFragmentCompat;
import org.chromium.components.browser_ui.settings.SettingsUtils;
/**
* Fragment containing standard protection settings.
*/
public class StandardProtectionSettingsFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle bundle, String rootKey) {
SettingsUtils.addPreferencesFromResource(this, R.xml.standard_protection_preferences);
getActivity().setTitle(R.string.prefs_section_safe_browsing_title);
}
}
...@@ -12,6 +12,9 @@ import org.junit.Rule; ...@@ -12,6 +12,9 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.TestRule; import org.junit.rules.TestRule;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Feature;
...@@ -19,6 +22,7 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; ...@@ -19,6 +22,7 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge; import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
import org.chromium.chrome.browser.safe_browsing.SafeBrowsingState; import org.chromium.chrome.browser.safe_browsing.SafeBrowsingState;
import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.browser.settings.SettingsActivityTestRule;
import org.chromium.chrome.browser.settings.SettingsLauncher;
import org.chromium.chrome.test.util.browser.Features; import org.chromium.chrome.test.util.browser.Features;
import org.chromium.components.browser_ui.widget.RadioButtonWithDescription; import org.chromium.components.browser_ui.widget.RadioButtonWithDescription;
import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionAndAuxButton; import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionAndAuxButton;
...@@ -46,18 +50,23 @@ public class SecuritySettingsFragmentTest { ...@@ -46,18 +50,23 @@ public class SecuritySettingsFragmentTest {
@Rule @Rule
public TestRule mFeatureProcessor = new Features.InstrumentationProcessor(); public TestRule mFeatureProcessor = new Features.InstrumentationProcessor();
@Mock
private SettingsLauncher mSettingsLauncher;
private SecuritySettingsFragment mSecuritySettingsFragment;
private RadioButtonGroupSafeBrowsingPreference mSafeBrowsingPreference; private RadioButtonGroupSafeBrowsingPreference mSafeBrowsingPreference;
@Before @Before
public void setUp() { public void setUp() {
MockitoAnnotations.initMocks(this);
launchSettingsActivity(); launchSettingsActivity();
} }
private void launchSettingsActivity() { private void launchSettingsActivity() {
mTestRule.startSettingsActivity(); mTestRule.startSettingsActivity();
SecuritySettingsFragment fragment = mTestRule.getFragment(); mSecuritySettingsFragment = mTestRule.getFragment();
mSafeBrowsingPreference = mSafeBrowsingPreference = mSecuritySettingsFragment.findPreference(
fragment.findPreference(SecuritySettingsFragment.PREF_SAFE_BROWSING); SecuritySettingsFragment.PREF_SAFE_BROWSING);
Assert.assertNotNull( Assert.assertNotNull(
"Safe Browsing preference should not be null.", mSafeBrowsingPreference); "Safe Browsing preference should not be null.", mSafeBrowsingPreference);
} }
...@@ -138,6 +147,34 @@ public class SecuritySettingsFragmentTest { ...@@ -138,6 +147,34 @@ public class SecuritySettingsFragmentTest {
Assert.assertNull(getEnhancedProtectionButton()); Assert.assertNull(getEnhancedProtectionButton());
} }
@Test
@SmallTest
@Feature({"SafeBrowsing"})
@Features.EnableFeatures(ChromeFeatureList.SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED)
public void testEnhancedProtectionAuxButtonClicked() {
TestThreadUtils.runOnUiThreadBlocking(() -> {
mSecuritySettingsFragment.setSettingsLauncher(mSettingsLauncher);
getEnhancedProtectionButton().getAuxButtonForTests().performClick();
Mockito.verify(mSettingsLauncher)
.launchSettingsActivity(mSecuritySettingsFragment.getContext(),
EnhancedProtectionSettingsFragment.class);
});
}
@Test
@SmallTest
@Feature({"SafeBrowsing"})
@Features.EnableFeatures(ChromeFeatureList.SAFE_BROWSING_ENHANCED_PROTECTION_ENABLED)
public void testStandardProtectionAuxButtonClicked() {
TestThreadUtils.runOnUiThreadBlocking(() -> {
mSecuritySettingsFragment.setSettingsLauncher(mSettingsLauncher);
getStandardProtectionButton().getAuxButtonForTests().performClick();
Mockito.verify(mSettingsLauncher)
.launchSettingsActivity(mSecuritySettingsFragment.getContext(),
StandardProtectionSettingsFragment.class);
});
}
private @SafeBrowsingState int getSafeBrowsingState() { private @SafeBrowsingState int getSafeBrowsingState() {
return mSafeBrowsingPreference.getSafeBrowsingStateForTesting(); return mSafeBrowsingPreference.getSafeBrowsingStateForTesting();
} }
......
...@@ -7,6 +7,7 @@ import("//build/config/android/rules.gni") ...@@ -7,6 +7,7 @@ import("//build/config/android/rules.gni")
android_library("java") { android_library("java") {
sources = [ sources = [
"android/java/src/org/chromium/chrome/browser/settings/ChromeManagedPreferenceDelegate.java", "android/java/src/org/chromium/chrome/browser/settings/ChromeManagedPreferenceDelegate.java",
"android/java/src/org/chromium/chrome/browser/settings/FragmentSettingsLauncher.java",
"android/java/src/org/chromium/chrome/browser/settings/SettingsLauncher.java", "android/java/src/org/chromium/chrome/browser/settings/SettingsLauncher.java",
] ]
deps = [ deps = [
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.settings;
/**
* Interface for injecting SettingsLauncher to a fragment. It is useful for modularized fragments
* that need access to SettingsLauncher. See: go/clank-modularize-settings-launcher.
*/
public interface FragmentSettingsLauncher {
/**
* Sets an instance of SettingsLauncher in a fragment.
*
* @param settingsLauncher The SettingsLauncher that is injected.
*/
void setSettingsLauncher(SettingsLauncher settingsLauncher);
}
...@@ -936,12 +936,19 @@ Your Google account may have other forms of browsing history like searches and a ...@@ -936,12 +936,19 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_SAFE_BROWSING_ENHANCED_PROTECTION_TITLE" desc="Title for Safe Browsing enhanced protection mode. [CHAR-LIMIT=32]"> <message name="IDS_SAFE_BROWSING_ENHANCED_PROTECTION_TITLE" desc="Title for Safe Browsing enhanced protection mode. [CHAR-LIMIT=32]">
Enhanced protection Enhanced protection
</message> </message>
<message name="IDS_SAFE_BROWSING_ENHANCED_PROTECTION_SUBTITLE" desc="Subtitle for Safe Browsing enhanced protection mode.">
Enhanced protection:
</message>
<message name="IDS_SAFE_BROWSING_ENHANCED_PROTECTION_SUMMARY" desc="Summary for Safe Browsing enhanced protection mode."> <message name="IDS_SAFE_BROWSING_ENHANCED_PROTECTION_SUMMARY" desc="Summary for Safe Browsing enhanced protection mode.">
Faster, proactive protection against dangerous websites, downloads, and extensions. Warns you about password breaches. Requires browsing data to be sent to Google. Faster, proactive protection against dangerous websites, downloads, and extensions. Warns you about password breaches. Requires browsing data to be sent to Google.
</message> </message>
<message name="IDS_SAFE_BROWSING_STANDARD_PROTECTION_TITLE" desc="Title for Safe Browsing standard protection mode. [CHAR-LIMIT=32]"> <message name="IDS_SAFE_BROWSING_STANDARD_PROTECTION_TITLE" desc="Title for Safe Browsing standard protection mode. [CHAR-LIMIT=32]">
Standard protection Standard protection
</message> </message>
<message name="IDS_SAFE_BROWSING_STANDARD_PROTECTION_SUBTITLE" desc="Subtitle for Safe Browsing standard protection mode.">
Standard protection:
</message>
<message name="IDS_SAFE_BROWSING_STANDARD_PROTECTION_SUMMARY" desc="Summary for Safe Browsing standard protection mode."> <message name="IDS_SAFE_BROWSING_STANDARD_PROTECTION_SUMMARY" desc="Summary for Safe Browsing standard protection mode.">
Standard protection against websites, downloads, and extensions that are known to be dangerous. Standard protection against websites, downloads, and extensions that are known to be dangerous.
</message> </message>
......
...@@ -134,7 +134,7 @@ public class RadioButtonWithDescriptionAndAuxButton extends RadioButtonWithDescr ...@@ -134,7 +134,7 @@ public class RadioButtonWithDescriptionAndAuxButton extends RadioButtonWithDescr
* @return the aux button living inside this widget. * @return the aux button living inside this widget.
*/ */
@VisibleForTesting @VisibleForTesting
ImageButton getAuxButtonForTests() { public ImageButton getAuxButtonForTests() {
return mAuxButton; return mAuxButton;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment