Commit d33f0085 authored by Xinghui Lu's avatar Xinghui Lu Committed by Commit Bot

Set RealTimeUrlLookupEnabledWithToken enabled by default on desktop.

Bug: 1041912
Change-Id: Id2ff5e55264f66767e144fbc288ae888c22ba26f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303856
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790632}
parent 8f89ebbc
...@@ -100,8 +100,13 @@ const base::Feature kRealTimeUrlLookupEnabledForEPWithToken{ ...@@ -100,8 +100,13 @@ const base::Feature kRealTimeUrlLookupEnabledForEPWithToken{
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kRealTimeUrlLookupEnabledWithToken{ const base::Feature kRealTimeUrlLookupEnabledWithToken{
"SafeBrowsingRealTimeUrlLookupEnabledWithToken", "SafeBrowsingRealTimeUrlLookupEnabledWithToken",
base::FEATURE_DISABLED_BY_DEFAULT}; #if BUILDFLAG(FULL_SAFE_BROWSING)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
const base::Feature kRealTimeUrlLookupNonMainframeEnabledForEP{ const base::Feature kRealTimeUrlLookupNonMainframeEnabledForEP{
"SafeBrowsingRealTimeUrlLookupNonMainframeEnabledForEP", "SafeBrowsingRealTimeUrlLookupNonMainframeEnabledForEP",
......
...@@ -224,7 +224,8 @@ TEST_F(RealTimePolicyEngineTest, ...@@ -224,7 +224,8 @@ TEST_F(RealTimePolicyEngineTest,
feature_list.InitWithFeatures( feature_list.InitWithFeatures(
/* enabled_features */ {kEnhancedProtection, /* enabled_features */ {kEnhancedProtection,
kRealTimeUrlLookupEnabledForEP}, kRealTimeUrlLookupEnabledForEP},
/* disabled_features */ {kRealTimeUrlLookupEnabledForEPWithToken}); /* disabled_features */ {kRealTimeUrlLookupEnabledForEPWithToken,
kRealTimeUrlLookupEnabledWithToken});
EXPECT_TRUE(CanPerformFullURLLookup(/* is_off_the_record */ false)); EXPECT_TRUE(CanPerformFullURLLookup(/* is_off_the_record */ false));
EXPECT_FALSE(CanPerformFullURLLookupWithToken( EXPECT_FALSE(CanPerformFullURLLookupWithToken(
/* is_off_the_record */ false, &sync_service, identity_manager)); /* is_off_the_record */ false, &sync_service, identity_manager));
...@@ -314,7 +315,9 @@ TEST_F(RealTimePolicyEngineTest, ...@@ -314,7 +315,9 @@ TEST_F(RealTimePolicyEngineTest,
TEST_F(RealTimePolicyEngineTest, TEST_F(RealTimePolicyEngineTest,
TestCanPerformFullURLLookupWithToken_EnhancedProtection) { TestCanPerformFullURLLookupWithToken_EnhancedProtection) {
base::test::ScopedFeatureList feature_list; base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnhancedProtection); feature_list.InitWithFeatures(
/* enabled_features */ {kEnhancedProtection},
/* disabled_features */ {kRealTimeUrlLookupEnabledWithToken});
std::unique_ptr<signin::IdentityTestEnvironment> identity_test_env = std::unique_ptr<signin::IdentityTestEnvironment> identity_test_env =
std::make_unique<signin::IdentityTestEnvironment>(); std::make_unique<signin::IdentityTestEnvironment>();
signin::IdentityManager* identity_manager = signin::IdentityManager* identity_manager =
......
...@@ -167,7 +167,8 @@ class RealTimeUrlLookupServiceTest : public PlatformTest { ...@@ -167,7 +167,8 @@ class RealTimeUrlLookupServiceTest : public PlatformTest {
feature_list_.InitWithFeatures( feature_list_.InitWithFeatures(
{kRealTimeUrlLookupEnabled, kRealTimeUrlLookupEnabledWithToken}, {}); {kRealTimeUrlLookupEnabled, kRealTimeUrlLookupEnabledWithToken}, {});
} else { } else {
feature_list_.InitWithFeatures({kRealTimeUrlLookupEnabled}, {}); feature_list_.InitWithFeatures({kRealTimeUrlLookupEnabled},
{kRealTimeUrlLookupEnabledWithToken});
} }
#endif #endif
} }
......
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