Index: chromecast/android/chromecast_config_android.h |
diff --git a/chromecast/android/chromecast_config_android.h b/chromecast/android/chromecast_config_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6f584a7c3eae5ad734e13ac6295c8d1149cade3e |
--- /dev/null |
+++ b/chromecast/android/chromecast_config_android.h |
@@ -0,0 +1,45 @@ |
+// Copyright 2014 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 CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |
+#define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/callback.h" |
+#include "base/macros.h" |
+ |
+namespace chromecast { |
+namespace android { |
+ |
+class ChromecastConfigAndroid { |
+ public: |
+ static bool RegisterJni(JNIEnv* env); |
+ static ChromecastConfigAndroid* GetInstance(); |
+ |
+ // Android build may provide this value as a system setting through the |
+ // Android preferences API. |
+ bool CanSendUsageStats(); |
Yaron
2014/08/20 18:11:01
Should this be handled as part of the MetricsServi
gunsch
2014/08/21 22:31:27
We do use MetricsService, and provide our own Metr
|
+ |
+ // Registers a handler to be notified when SendUsageStats is changed. |
+ void SetSendUsageStatsChangedCallback( |
+ const base::Callback<void(bool)>& callback); |
+ |
+ const base::Callback<void(bool)>& send_usage_stats_changed_callback() { |
+ return send_usage_stats_changed_callback_; |
+ } |
+ |
+ private: |
+ ChromecastConfigAndroid(); |
+ ~ChromecastConfigAndroid(); |
+ |
+ base::Callback<void(bool)> send_usage_stats_changed_callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid); |
+}; |
+ |
+} |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |