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

Unified Diff: components/gcm_driver/gcm_driver_android.h

Issue 1515153003: Enable chrome://gcm-internals on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..163cdb4c049b64d5c0e219ccb08df77f5f7267f7 100644
--- a/components/gcm_driver/gcm_driver_android.h
+++ b/components/gcm_driver/gcm_driver_android.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/gcm_driver/gcm_driver.h"
+#include "components/gcm_driver/gcm_stats_recorder_android.h"
namespace base {
class FilePath;
@@ -21,7 +22,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,
@@ -65,7 +67,7 @@ class GCMDriverAndroid : public GCMDriver {
bool IsStarted() const override;
bool IsConnected() const override;
void GetGCMStatistics(const GetGCMStatisticsCallback& callback,
- bool clear_logs) override;
+ ClearActivityLogs clear_logs) override;
void SetGCMRecording(const GetGCMStatisticsCallback& callback,
bool recording) override;
void SetAccountTokens(
@@ -79,6 +81,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 +99,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);
};
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698