OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |
| 7 |
| 8 namespace metrics { |
| 9 |
| 10 // An interface that provides whether metrics should be reported. |
| 11 class EnabledStateProvider { |
| 12 public: |
| 13 virtual ~EnabledStateProvider() {} |
| 14 |
| 15 // Indicates that the user has provided consent to collect and report metrics. |
| 16 virtual bool IsConsentGiven() = 0; |
| 17 |
| 18 // Should collection and reporting be enabled. This should depend on consent |
| 19 // being given. |
| 20 virtual bool IsReportingEnabled(); |
| 21 }; |
| 22 |
| 23 } // namespace metrics |
| 24 |
| 25 #endif // COMPONENTS_METRICS_ENABLED_STATE_PROVIDER_H_ |
OLD | NEW |