// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/no_destructor.h" #include "components/page_load_metrics/browser/observers/use_counter_page_load_metrics_observer.h" // This file defines a list of UseCounter WebFeature measured in the // UKM-based UseCounter. Features must all satisfy UKM privacy requirements // (see go/ukm). In addition, features should only be added if it's shown to be // (or highly likely to be) rare, e.g. <1% of page views as measured by UMA. // // UKM-based UseCounter should be used to cover the case when UMA UseCounter // data shows a behaviour that is rare but too common to blindly change. // UKM-based UseCounter would allow us to find specific pages to reason about // whether a breaking change is acceptable or not. // // This event is emitted for every page load and is not sub-sampled by the UKM // system. The WebFeature::kPageVisits is always present in the event, so // it is valid to take the ratio of events with your feature to kPageVisit to // estimate "percentage of page views using a feature". Note that the lack of // sub-sampling is the reason why this event must only be used for rare // features. // // Obsolete UseCounters (kOBSOLETE_*) should be removed from this list. WebFeature; // UKM-based UseCounter features (WebFeature) should be defined in // opt_in_features list. const UseCounterMetricsRecorder::UkmFeatureList& UseCounterMetricsRecorder::GetAllowedUkmFeatures() { … }