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

Unified Diff: google_apis/gcm/gcm_client.h

Issue 176823009: Show device information in chrome://gcm-internals page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gcm/gcm_client.h
diff --git a/google_apis/gcm/gcm_client.h b/google_apis/gcm/gcm_client.h
index c57cee784c57fd8d1f7a6e8c13e5ddbe07263559..80f55ea9f7030df7ab91c3a5cbf8b54e21c483f0 100644
--- a/google_apis/gcm/gcm_client.h
+++ b/google_apis/gcm/gcm_client.h
@@ -78,6 +78,18 @@ class GCM_EXPORT GCMClient {
MessageData data;
};
+ // Internal states and activity statistics of a GCM client.
+ struct GCM_EXPORT GCMStatistics {
+ public:
+ GCMStatistics();
+ ~GCMStatistics();
+
+ bool gcm_client_created;
+ std::string gcm_client_state;
+ bool connection_client_created;
+ std::string connection_state;
+ };
+
// A delegate interface that allows the GCMClient instance to interact with
// its caller, i.e. notifying asynchronous event.
class Delegate {
@@ -183,6 +195,9 @@ class GCM_EXPORT GCMClient {
virtual void Send(const std::string& app_id,
const std::string& receiver_id,
const OutgoingMessage& message) = 0;
+
+ // Get internal states and statistics.
+ virtual GCMStatistics GetStatistics() const = 0;
};
} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698