Chromium Code Reviews| Index: components/metrics/enabled_state_provider.h |
| diff --git a/components/metrics/enabled_state_provider.h b/components/metrics/enabled_state_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cc05785f6d3cf92d772adc2325144af6facc8c0c |
| --- /dev/null |
| +++ b/components/metrics/enabled_state_provider.h |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 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. |
| + |
| +#ifndef COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |
| +#define COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |
| + |
| +namespace metrics { |
| + |
| +// An interface that provides whether metrics should be reported. |
| +class EnabledStateProvider { |
| + public: |
| + virtual ~EnabledStateProvider() {} |
| + |
| + // Indicates that the user has provided consent to collect and report metrics. |
| + virtual bool IsConsentGiven() = 0; |
| + |
| + // Should collection and reporting be enabled. This should depend on consent |
| + // being given. |
|
Alexei Svitkine (slow)
2016/05/11 17:16:28
Nit: Please expand comment to shed light of why th
jwd
2016/05/11 18:31:38
Done.
|
| + virtual bool IsReportingEnabled(); |
| +}; |
| + |
| +} // namespace metrics |
| + |
| +#endif // COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |