Commit 5a7e34ee authored by Alex Ilin's avatar Alex Ilin Committed by Commit Bot

Expose kSafeBrowsingExtendedReportingOptInAllowed pref in Java

This CL makes it possible to disable the checkbox for extended Safe
Browsing reporting from Java.

Bug: 938902
Change-Id: I82eaa03094cd75cd3da4dc3235dfc7bd681d29f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1660862
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670011}
parent f962545c
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "components/ntp_snippets/pref_names.h" #include "components/ntp_snippets/pref_names.h"
#include "components/offline_pages/core/prefetch/prefetch_prefs.h" #include "components/offline_pages/core/prefetch/prefetch_prefs.h"
#include "components/payments/core/payment_prefs.h" #include "components/payments/core/payment_prefs.h"
#include "components/safe_browsing/common/safe_browsing_prefs.h"
// A preference exposed to Java. // A preference exposed to Java.
// A Java counterpart will be generated for this enum. // A Java counterpart will be generated for this enum.
...@@ -36,6 +37,7 @@ enum Pref { ...@@ -36,6 +37,7 @@ enum Pref {
AUTOFILL_CREDIT_CARD_ENABLED, AUTOFILL_CREDIT_CARD_ENABLED,
USAGE_STATS_ENABLED, USAGE_STATS_ENABLED,
OFFLINE_PREFETCH_USER_SETTING_ENABLED, OFFLINE_PREFETCH_USER_SETTING_ENABLED,
SAFE_BROWSING_EXTENDED_REPORTING_OPT_IN_ALLOWED,
// PREF_NUM_PREFS must be the last entry. // PREF_NUM_PREFS must be the last entry.
PREF_NUM_PREFS PREF_NUM_PREFS
}; };
...@@ -63,6 +65,7 @@ const char* const kPrefsExposedToJava[] = { ...@@ -63,6 +65,7 @@ const char* const kPrefsExposedToJava[] = {
autofill::prefs::kAutofillCreditCardEnabled, autofill::prefs::kAutofillCreditCardEnabled,
prefs::kUsageStatsEnabled, prefs::kUsageStatsEnabled,
offline_pages::prefetch_prefs::kUserSettingEnabled, offline_pages::prefetch_prefs::kUserSettingEnabled,
prefs::kSafeBrowsingExtendedReportingOptInAllowed,
}; };
#endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREFS_H_ #endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREFS_H_
...@@ -62,6 +62,8 @@ TEST_F(PrefsTest, TestIndex) { ...@@ -62,6 +62,8 @@ TEST_F(PrefsTest, TestIndex) {
EXPECT_EQ(prefs::kUsageStatsEnabled, GetPrefName(USAGE_STATS_ENABLED)); EXPECT_EQ(prefs::kUsageStatsEnabled, GetPrefName(USAGE_STATS_ENABLED));
EXPECT_EQ(offline_pages::prefetch_prefs::kUserSettingEnabled, EXPECT_EQ(offline_pages::prefetch_prefs::kUserSettingEnabled,
GetPrefName(OFFLINE_PREFETCH_USER_SETTING_ENABLED)); GetPrefName(OFFLINE_PREFETCH_USER_SETTING_ENABLED));
EXPECT_EQ(prefs::kSafeBrowsingExtendedReportingOptInAllowed,
GetPrefName(SAFE_BROWSING_EXTENDED_REPORTING_OPT_IN_ALLOWED));
// If this check fails, a pref is missing a test case above. // If this check fails, a pref is missing a test case above.
EXPECT_EQ(Pref::PREF_NUM_PREFS, pref_count_); EXPECT_EQ(Pref::PREF_NUM_PREFS, pref_count_);
......
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