Commit 4ec309b8 authored by felt's avatar felt Committed by Commit bot

Remove the finch gate from the UWS interstitial

The UwS interstitial launch went well, so there's no longer any reason
for a Finch gate. This kills the Finch-related logic.

BUG=451123

Review URL: https://codereview.chromium.org/1134603004

Cr-Commit-Position: refs/heads/master@{#329726}
parent 766a9570
...@@ -260,7 +260,7 @@ LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager( ...@@ -260,7 +260,7 @@ LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager(
enable_download_whitelist_(false), enable_download_whitelist_(false),
enable_extension_blacklist_(false), enable_extension_blacklist_(false),
enable_ip_blacklist_(false), enable_ip_blacklist_(false),
enable_unwanted_software_blacklist_(false), enable_unwanted_software_blacklist_(true),
update_in_progress_(false), update_in_progress_(false),
database_update_in_progress_(false), database_update_in_progress_(false),
closing_database_(false), closing_database_(false),
...@@ -293,10 +293,6 @@ LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager( ...@@ -293,10 +293,6 @@ LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager(
// The client-side IP blacklist feature is tightly integrated with client-side // The client-side IP blacklist feature is tightly integrated with client-side
// phishing protection for now. // phishing protection for now.
enable_ip_blacklist_ = enable_csd_whitelist_; enable_ip_blacklist_ = enable_csd_whitelist_;
// The UwS blacklist feature is controlled by a flag for M40.
enable_unwanted_software_blacklist_ =
safe_browsing_util::GetUnwantedTrialGroup() > safe_browsing_util::UWS_OFF;
#endif #endif
} }
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "chrome/browser/safe_browsing/safe_browsing_util.h" #include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
...@@ -169,13 +168,6 @@ bool IsKnownList(const std::string& name) { ...@@ -169,13 +168,6 @@ bool IsKnownList(const std::string& name) {
} }
return false; return false;
} }
// String constants for the M40 UwS Finch trial.
const char kUnwantedTrialName[] = "UwSInterstitialStatus";
const char kOff[] = "Off";
const char kOnButInvisible[] = "OnButInvisible";
const char kOn[] = "On";
} // namespace } // namespace
namespace safe_browsing_util { namespace safe_browsing_util {
...@@ -532,15 +524,4 @@ std::string SBFullHashToString(const SBFullHash& hash) { ...@@ -532,15 +524,4 @@ std::string SBFullHashToString(const SBFullHash& hash) {
return std::string(hash.full_hash, sizeof(hash.full_hash)); return std::string(hash.full_hash, sizeof(hash.full_hash));
} }
UnwantedStatus GetUnwantedTrialGroup() {
std::string status(base::FieldTrialList::FindFullName(kUnwantedTrialName));
if (status == kOff)
return UWS_OFF;
if (status == kOnButInvisible)
return UWS_ON_INVISIBLE;
if (status == kOn)
return UWS_ON;
return UWS_ON;
}
} // namespace safe_browsing_util } // namespace safe_browsing_util
...@@ -200,13 +200,6 @@ enum ListType { ...@@ -200,13 +200,6 @@ enum ListType {
// See above comment. Leave 17 available. // See above comment. Leave 17 available.
}; };
// M40 experimental flag controls rollout of the UwS warning.
enum UnwantedStatus {
UWS_OFF,
UWS_ON_INVISIBLE,
UWS_ON
};
// Maps a list name to ListType. // Maps a list name to ListType.
ListType GetListId(const base::StringPiece& name); ListType GetListId(const base::StringPiece& name);
...@@ -237,9 +230,6 @@ GURL GeneratePhishingReportUrl(const std::string& report_page, ...@@ -237,9 +230,6 @@ GURL GeneratePhishingReportUrl(const std::string& report_page,
SBFullHash StringToSBFullHash(const std::string& hash_in); SBFullHash StringToSBFullHash(const std::string& hash_in);
std::string SBFullHashToString(const SBFullHash& hash_out); std::string SBFullHashToString(const SBFullHash& hash_out);
// Look up the status of the UwS warning. The default is off.
UnwantedStatus GetUnwantedTrialGroup();
} // namespace safe_browsing_util } // namespace safe_browsing_util
#endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
...@@ -117,13 +117,9 @@ void SafeBrowsingUIManager::DisplayBlockingPage( ...@@ -117,13 +117,9 @@ void SafeBrowsingUIManager::DisplayBlockingPage(
} }
} }
// For M40, the UwS warning may be gated to not show any UI.
const bool ping_only = resource.threat_type == SB_THREAT_TYPE_URL_UNWANTED
&& safe_browsing_util::GetUnwantedTrialGroup() < safe_browsing_util::UWS_ON;
// Indicate to interested observers that the resource in question matched the // Indicate to interested observers that the resource in question matched the
// SB filters, unless the UwS interstitial is in ping-only mode. // SB filters.
if (resource.threat_type != SB_THREAT_TYPE_SAFE && !ping_only) { if (resource.threat_type != SB_THREAT_TYPE_SAFE) {
FOR_EACH_OBSERVER(Observer, observer_list_, OnSafeBrowsingMatch(resource)); FOR_EACH_OBSERVER(Observer, observer_list_, OnSafeBrowsingMatch(resource));
} }
...@@ -179,15 +175,6 @@ void SafeBrowsingUIManager::DisplayBlockingPage( ...@@ -179,15 +175,6 @@ void SafeBrowsingUIManager::DisplayBlockingPage(
std::string() /* post_data */); std::string() /* post_data */);
} }
// If UwS interstitials are turned off, return here before showing UI.
if (ping_only) {
if (!resource.callback.is_null()) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, base::Bind(resource.callback, true));
}
return;
}
if (resource.threat_type != SB_THREAT_TYPE_SAFE) { if (resource.threat_type != SB_THREAT_TYPE_SAFE) {
FOR_EACH_OBSERVER(Observer, observer_list_, OnSafeBrowsingHit(resource)); FOR_EACH_OBSERVER(Observer, observer_list_, OnSafeBrowsingHit(resource));
} }
......
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