Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: chromecast/android/chromecast_config_android.h

Issue 620673003: Chromecast: adds crash handling for Android build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address lei's comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ 5 #ifndef CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
6 #define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ 6 #define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 namespace chromecast { 14 namespace chromecast {
15 namespace android { 15 namespace android {
16 16
17 class ChromecastConfigAndroid { 17 class ChromecastConfigAndroid {
18 public: 18 public:
19 static ChromecastConfigAndroid* GetInstance(); 19 static ChromecastConfigAndroid* GetInstance();
20 20
21 // Returns whether or not the user has allowed sending usage stats and
22 // crash reports.
23 bool CanSendUsageStats();
24
21 // Registers a handler to be notified when SendUsageStats is changed. 25 // Registers a handler to be notified when SendUsageStats is changed.
22 void SetSendUsageStatsChangedCallback( 26 void SetSendUsageStatsChangedCallback(
23 const base::Callback<void(bool)>& callback); 27 const base::Callback<void(bool)>& callback);
24 28
25 const base::Callback<void(bool)>& send_usage_stats_changed_callback() const { 29 const base::Callback<void(bool)>& send_usage_stats_changed_callback() const {
26 return send_usage_stats_changed_callback_; 30 return send_usage_stats_changed_callback_;
27 } 31 }
28 32
29 private: 33 private:
30 friend struct base::DefaultLazyInstanceTraits<ChromecastConfigAndroid>; 34 friend struct base::DefaultLazyInstanceTraits<ChromecastConfigAndroid>;
31 35
32 ChromecastConfigAndroid(); 36 ChromecastConfigAndroid();
33 ~ChromecastConfigAndroid(); 37 ~ChromecastConfigAndroid();
34 38
35 base::Callback<void(bool)> send_usage_stats_changed_callback_; 39 base::Callback<void(bool)> send_usage_stats_changed_callback_;
36 40
37 DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid); 41 DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid);
38 }; 42 };
39 43
40 } // namespace android 44 } // namespace android
41 } // namespace chromecast 45 } // namespace chromecast
42 46
43 #endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ 47 #endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
OLDNEW
« no previous file with comments | « chromecast/android/cast_jni_registrar.cc ('k') | chromecast/android/chromecast_config_android_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698