This is the same patch as issue 202083005 which you have approved. Issue 202083005 got reverted because it broke mcs_probe. I have fixed the breakage in mcs_probe.cc here; the rest are the same.

Add activity recording capability to gcm internals page. User can refresh, start/stop recording, and clear recording logs.
Also added more information to the device info section and fixed a bug there.

arv: owner review of chrome/browser/resources/*.
zea: please review changes in mcs_probe.cc, and do owner review of the rest of the code.

[email protected]

BUG=341256

Review URL: https://codereview.chromium.org/238353012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264689 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/google_apis/gcm/gcm_client.h b/google_apis/gcm/gcm_client.h
index 16ba53b..5996c06 100644
--- a/google_apis/gcm/gcm_client.h
+++ b/google_apis/gcm/gcm_client.h
@@ -11,6 +11,7 @@
 
 #include "base/basictypes.h"
 #include "google_apis/gcm/base/gcm_export.h"
+#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
 
 template <class T> class scoped_refptr;
 
@@ -94,11 +95,17 @@
     GCMStatistics();
     ~GCMStatistics();
 
+    bool is_recording;
     bool gcm_client_created;
     std::string gcm_client_state;
     bool connection_client_created;
     std::string connection_state;
     uint64 android_id;
+    std::vector<std::string> registered_app_ids;
+    int send_queue_size;
+    int resend_queue_size;
+
+    std::vector<GCMStatsRecorder::SendingActivity> sending_activities;
   };
 
   // A delegate interface that allows the GCMClient instance to interact with
@@ -208,6 +215,12 @@
                     const std::string& receiver_id,
                     const OutgoingMessage& message) = 0;
 
+  // Enables or disables internal activity recording.
+  virtual void SetRecording(bool recording) = 0;
+
+  // Clear all recorded GCM activity logs.
+  virtual void ClearActivityLogs() = 0;
+
   // Gets internal states and statistics.
   virtual GCMStatistics GetStatistics() const = 0;
 };