| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/chromeos/cros_settings_provider.h" | 12 #include "chrome/browser/chromeos/cros_settings_provider.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 // CrosSettingsProvider that abstracts switching of stats/crash | 16 // CrosSettingsProvider that abstracts switching of stats/crash |
| 17 // reporting to Google. | 17 // reporting to Google. |
| 18 class MetricsCrosSettingsProvider : public CrosSettingsProvider { | 18 class MetricsCrosSettingsProvider : public CrosSettingsProvider { |
| 19 public: | 19 public: |
| 20 MetricsCrosSettingsProvider() {} | 20 MetricsCrosSettingsProvider() {} |
| 21 | 21 |
| 22 // Actual methods to control stats/crash reporting. Currently these | 22 // Actual methods to control stats/crash reporting. Currently these |
| 23 // methods are public and static so they are accessible directly | 23 // methods are public and static so they are accessible directly |
| 24 // from cros code. But this will change soon: crosbug.com/7359 | 24 // from cros code. But this will change soon: crosbug.com/7359 |
| 25 static bool SetMetricsStatus(bool enabled); | 25 static bool SetMetricsStatus(bool enabled); |
| 26 static bool GetMetricsStatus(); | 26 static bool GetMetricsStatus(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // CrosSettingsProvider implementation. | 29 // CrosSettingsProvider implementation. |
| 30 virtual void DoSet(const std::string& path, Value* value); | 30 virtual void DoSet(const std::string& path, base::Value* value); |
| 31 virtual bool Get(const std::string& path, Value** value) const; | 31 virtual bool Get(const std::string& path, base::Value** value) const; |
| 32 virtual bool HandlesSetting(const std::string& path); | 32 virtual bool HandlesSetting(const std::string& path); |
| 33 | 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(MetricsCrosSettingsProvider); | 34 DISALLOW_COPY_AND_ASSIGN(MetricsCrosSettingsProvider); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 }; // namespace chromeos | 37 }; // namespace chromeos |
| 38 | 38 |
| 39 #endif // CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ | 39 #endif // CHROME_BROWSER_CHROMEOS_METRICS_CROS_SETTINGS_PROVIDER_H_ |
| OLD | NEW |