Commit 5cbc0240 authored by Charlie Harrison's avatar Charlie Harrison Committed by Commit Bot

Remove SubresourceFilter Rappor

We have a suitable UKM replacement now.

Bug: None
Change-Id: Ic628dbc19b69f56d0ee5a4184f8bcb786348c594
Reviewed-on: https://chromium-review.googlesource.com/1056330Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558384}
parent 308072ba
......@@ -20,9 +20,6 @@
#include "chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/rappor/public/rappor_parameters.h"
#include "components/rappor/public/rappor_utils.h"
#include "components/rappor/rappor_service_impl.h"
#include "components/safe_browsing/db/database_manager.h"
#include "components/subresource_filter/content/browser/content_ruleset_service.h"
#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h"
......@@ -199,13 +196,6 @@ void ChromeSubresourceFilterClient::ShowUI(const GURL& url) {
content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_ADS);
LogAction(kActionUIShown);
if (rappor::RapporService* rappor_service =
g_browser_process->rappor_service()) {
rappor_service->RecordSampleString(
"SubresourceFilter.UIShown", rappor::UMA_RAPPOR_TYPE,
rappor::GetDomainAndRegistrySampleFromGURL(url));
}
did_show_ui_for_navigation_ = true;
settings_manager_->OnDidShowUI(url);
}
......@@ -9,8 +9,6 @@
#include "chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h"
#include "chrome/browser/subresource_filter/subresource_filter_test_harness.h"
#include "chrome/test/base/testing_browser_process.h"
#include "components/rappor/public/rappor_parameters.h"
#include "components/rappor/test_rappor_service.h"
#include "components/safe_browsing/db/util.h"
#include "components/safe_browsing/db/v4_protocol_manager_util.h"
#include "components/subresource_filter/content/browser/content_activation_list_utils.h"
......@@ -235,26 +233,6 @@ TEST_F(SubresourceFilterTest, ToggleOffForceActivation_AfterCommit) {
kActionUIShown, 0);
}
TEST_F(SubresourceFilterTest, UIShown_LogsRappor) {
rappor::TestRapporServiceImpl rappor_tester;
TestingBrowserProcess::GetGlobal()->SetRapporServiceImpl(&rappor_tester);
const char kRapporMetric[] = "SubresourceFilter.UIShown";
const GURL url("https://example.test");
ConfigureAsSubresourceFilterOnlyURL(url);
SimulateNavigateAndCommit(url, main_rfh());
EXPECT_FALSE(CreateAndNavigateDisallowedSubframe(main_rfh()));
EXPECT_TRUE(GetClient()->did_show_ui_for_navigation());
std::string sample_string;
rappor::RapporType type;
EXPECT_TRUE(rappor_tester.GetRecordedSampleForMetric(kRapporMetric,
&sample_string, &type));
EXPECT_EQ(rappor::RapporType::UMA_RAPPOR_TYPE, type);
// The host is the same as the etld+1 in this case.
EXPECT_EQ(url.host(), sample_string);
}
TEST_F(SubresourceFilterTest, NotifySafeBrowsing) {
typedef safe_browsing::SubresourceFilterType Type;
typedef safe_browsing::SubresourceFilterLevel Level;
......
......@@ -2426,6 +2426,9 @@ now we are only interested in H264, VP8 and VP9.
</rappor-metric>
<rappor-metric name="SubresourceFilter.UIShown" type="UMA_RAPPOR_TYPE">
<obsolete>
Deprecated May 2018 in favor of SubresourceFilter UKM.
</obsolete>
<owner>csharrison@chromium.org</owner>
<summary>
The eTLD+1 that caused the SubresourceFilter UI to show that ads are being
......
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