Index: components/gcm_driver/gcm_driver_android.h |
diff --git a/components/gcm_driver/gcm_driver_android.h b/components/gcm_driver/gcm_driver_android.h |
index f9b44d8f98a375973e08f96b8ff4bd4327a42221..ef69fc0e935ed498ea3bf5785eb2c9a8fed9a61d 100644 |
--- a/components/gcm_driver/gcm_driver_android.h |
+++ b/components/gcm_driver/gcm_driver_android.h |
@@ -11,7 +11,9 @@ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
Nicolas Zea
2015/12/16 22:24:32
is this needed?
Peter Beverloo
2015/12/17 17:08:24
No. Removed.
|
#include "components/gcm_driver/gcm_driver.h" |
+#include "components/gcm_driver/gcm_stats_recorder_android.h" |
namespace base { |
class FilePath; |
@@ -21,7 +23,8 @@ class SequencedTaskRunner; |
namespace gcm { |
// GCMDriver implementation for Android, using Android GCM APIs. |
-class GCMDriverAndroid : public GCMDriver { |
+class GCMDriverAndroid : public GCMDriver, |
+ public GCMStatsRecorderAndroid::Delegate { |
public: |
GCMDriverAndroid( |
const base::FilePath& store_path, |
@@ -79,6 +82,9 @@ class GCMDriverAndroid : public GCMDriver { |
void AddHeartbeatInterval(const std::string& scope, int interval_ms) override; |
void RemoveHeartbeatInterval(const std::string& scope) override; |
+ // GCMStatsRecorder::Delegate implementation: |
+ void OnActivityRecorded() override; |
+ |
protected: |
// GCMDriver implementation: |
GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; |
@@ -94,6 +100,12 @@ class GCMDriverAndroid : public GCMDriver { |
private: |
base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+ // Callback for GetGCMStatistics. |
+ GetGCMStatisticsCallback get_gcm_statistics_callback_; |
+ |
+ // Recorder that logs GCM activities. |
+ GCMStatsRecorderAndroid recorder_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); |
}; |