Commit 5161e513 authored by Xinghui Lu's avatar Xinghui Lu Committed by Commit Bot

Remove RT Lookup Experiment in chrome://safe-browsing/#tab-rt-lookup

This flag was added for testing purpose. It is now misleading because
RT Lookup can still be performed when this flag is false(e.g. for ESB
users).

The same information can also be checked in chrome://safe-browsing,
so this flag is not needed anymore.

Bug: 1069651
Change-Id: Ib96f9e456b6477bff77e18f9049309b5d75728b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146795Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815891}
parent 02dbb74a
......@@ -26,7 +26,6 @@ static_library("web_ui") {
"//components/safe_browsing/core/browser:referrer_chain_provider",
"//components/safe_browsing/core/common:safe_browsing_prefs",
"//components/safe_browsing/core/db:v4_local_database_manager",
"//components/safe_browsing/core/realtime:policy_engine",
"//components/safe_browsing/core/web_ui:constants",
"//components/strings:components_strings_grit",
"//components/sync/protocol:protocol",
......
......@@ -92,7 +92,6 @@
</tabpanel>
<tabpanel>
<h2>RT Lookup Pings</h2>
<p id="rt-lookup-experiment-enabled" class="result-container"></p>
<table id="rt-lookup-ping-list" class="request-response"></table>
</tabpanel>
<tabpanel>
......
......@@ -111,9 +111,6 @@ cr.define('safe_browsing', function() {
addRTLookupResponse(result);
});
cr.sendWithPromise('getRTLookupExperimentEnabled', [])
.then((enabled) => addRTLookupExperimentEnabled(enabled));
cr.sendWithPromise('getLogMessages', []).then((logMessages) => {
logMessages.forEach(function(message) {
addLogMessage(message);
......@@ -323,12 +320,6 @@ cr.define('safe_browsing', function() {
}
}
function addRTLookupExperimentEnabled(enabled) {
const enabledFormatted = $('rt-lookup-template').content.cloneNode(true);
enabledFormatted.querySelector('#experiment-bool').textContent = enabled;
$('rt-lookup-experiment-enabled').appendChild(enabledFormatted);
}
function addLogMessage(result) {
const logDiv = $('log-messages');
const eventFormatted = "[" + (new Date(result["time"])).toLocaleString() +
......
......@@ -37,7 +37,6 @@
#include "components/enterprise/common/proto/connectors.pb.h"
#include "components/safe_browsing/core/proto/webprotect.pb.h"
#endif
#include "components/safe_browsing/core/realtime/policy_engine.h"
#include "components/safe_browsing/core/web_ui/constants.h"
#include "components/strings/grit/components_strings.h"
#include "components/user_prefs/user_prefs.h"
......@@ -1992,17 +1991,6 @@ void SafeBrowsingUIHandler::GetRTLookupResponses(const base::ListValue* args) {
ResolveJavascriptCallback(base::Value(callback_id), responses_sent);
}
void SafeBrowsingUIHandler::GetRTLookupExperimentEnabled(
const base::ListValue* args) {
base::ListValue value;
value.Append(base::Value(RealTimePolicyEngine::IsUrlLookupEnabled()));
AllowJavascript();
std::string callback_id;
args->GetString(0, &callback_id);
ResolveJavascriptCallback(base::Value(callback_id), value);
}
void SafeBrowsingUIHandler::GetReferrerChain(const base::ListValue* args) {
std::string url_string;
args->GetString(1, &url_string);
......@@ -2239,10 +2227,6 @@ void SafeBrowsingUIHandler::RegisterMessages() {
"getRTLookupResponses",
base::BindRepeating(&SafeBrowsingUIHandler::GetRTLookupResponses,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"getRTLookupExperimentEnabled",
base::BindRepeating(&SafeBrowsingUIHandler::GetRTLookupExperimentEnabled,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"getLogMessages",
base::BindRepeating(&SafeBrowsingUIHandler::GetLogMessages,
......
......@@ -128,10 +128,6 @@ class SafeBrowsingUIHandler : public content::WebUIMessageHandler {
// currently open chrome://safe-browsing tab was opened.
void GetRTLookupResponses(const base::ListValue* args);
// Show whether real time lookup experiment is enabled. This is useful for
// testing on Android, because it also takes memory threshold into account.
void GetRTLookupExperimentEnabled(const base::ListValue* args);
// Get the current referrer chain for a given URL.
void GetReferrerChain(const base::ListValue* args);
......
......@@ -74,7 +74,6 @@ class RealTimePolicyEngine {
bool is_off_the_record);
friend class SafeBrowsingService;
friend class SafeBrowsingUIHandler;
private:
static bool IsInExcludedCountry(const std::string& country_code);
......
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