Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: components/safe_browsing/features.cc

Issue 2974243002: Revert of Added experiments section and exported the list of SafeBrowsing features in WebUI (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/safe_browsing/features.h ('k') | components/safe_browsing/renderer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing/features.cc
diff --git a/components/safe_browsing/features.cc b/components/safe_browsing/features.cc
deleted file mode 100644
index 20a49b180e7410e361d4b4019b2635c354d36753..0000000000000000000000000000000000000000
--- a/components/safe_browsing/features.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/safe_browsing/features.h"
-
-#include <stddef.h>
-#include <algorithm>
-#include <utility>
-#include <vector>
-#include "base/feature_list.h"
-
-#include "base/macros.h"
-#include "base/values.h"
-namespace safe_browsing {
-// Please define any new SafeBrowsing related features in this file, and add
-// them to the ExperimentalFeaturesList below to start displaying their status
-// on the chrome://safe-browsing page.
-const base::Feature kLocalDatabaseManagerEnabled{
- "SafeBrowsingV4LocalDatabaseManagerEnabled",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
-const base::Feature kV4OnlyEnabled{"SafeBrowsingV4OnlyEnabled",
- base::FEATURE_DISABLED_BY_DEFAULT};
-// This Feature specifies which non-resource HTML Elements to collect based on
-// their tag and attributes. It's a single param containing a comma-separated
-// list of pairs. For example: "tag1,id,tag1,height,tag2,foo" - this will
-// collect elements with tag "tag1" that have attribute "id" or "height" set,
-// and elements of tag "tag2" if they have attribute "foo" set. All tag names
-// and attributes should be lower case.
-const base::Feature kThreatDomDetailsTagAndAttributeFeature{
- "ThreatDomDetailsTagAttributes", base::FEATURE_DISABLED_BY_DEFAULT};
-
-namespace {
-// List of experimental features. Boolean value for each list member should be
-// set to True if the experiment is currently running at a probability other
-// than 1 or 0, or to False otherwise.
-std::vector<std::pair<const base::Feature*, bool>> ExperimentalFeaturesList = {
- std::make_pair(&kLocalDatabaseManagerEnabled, true),
- std::make_pair(&kV4OnlyEnabled, true),
- std::make_pair(&kThreatDomDetailsTagAndAttributeFeature, true)};
-
-// Adds the name and the enabled/disabled status of a given feature.
-void AddFeatureAndAvailability(const base::Feature* expFeature,
- base::ListValue* paramList) {
- paramList->GetList().push_back(base::Value(expFeature->name));
- if (base::FeatureList::IsEnabled(*expFeature)) {
- paramList->GetList().push_back(base::Value("Enabled"));
- } else {
- paramList->GetList().push_back(base::Value("Disabled"));
- }
-}
-} // namespace
-// Returns the list of the experimental features that are enabled or disabled,
-// as part of currently running Safe Browsing experiments.
-base::ListValue GetFeatureStatusList() {
- base::ListValue paramList;
- for (std::vector<std::pair<const base::Feature*, bool>>::iterator it =
- ExperimentalFeaturesList.begin();
- it != ExperimentalFeaturesList.end(); ++it) {
- if ((*it).second) {
- AddFeatureAndAvailability((*it).first, &paramList);
- }
- }
- return paramList;
-}
-
-} // namespace safe_browsing
« no previous file with comments | « components/safe_browsing/features.h ('k') | components/safe_browsing/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698