Index: chrome/browser/services/gcm/gcm_profile_service.h |
diff --git a/chrome/browser/services/gcm/gcm_profile_service.h b/chrome/browser/services/gcm/gcm_profile_service.h |
index 39b72663414857cf1cfa4029cef733d4c56085a2..a41cad719cde8bd8906b41072bbc4ac07087959e 100644 |
--- a/chrome/browser/services/gcm/gcm_profile_service.h |
+++ b/chrome/browser/services/gcm/gcm_profile_service.h |
@@ -48,7 +48,7 @@ class GCMProfileService : public KeyedService, |
GCMClient::Result result)> SendCallback; |
typedef base::Callback<void(GCMClient::Result result)> UnregisterCallback; |
typedef base::Callback<void(const GCMClient::GCMStatistics& stats)> |
- RequestGCMStatisticsCallback; |
+ GetGCMStatisticsCallback; |
// Any change made to this enum should have corresponding change in the |
// GetGCMEnabledStateString(...) function. |
@@ -125,9 +125,14 @@ class GCMProfileService : public KeyedService, |
// Returns true if the gcm client is ready. |
bool IsGCMClientReady() const; |
- // Get GCM client internal states and statistics. If it has not been created |
- // then stats won't be modified. |
- void RequestGCMStatistics(RequestGCMStatisticsCallback callback); |
+ // Get GCM client internal states and statistics. |
+ // If clear_logs is true then activity logs will be cleared before the stats |
+ // are returned. |
+ void GetGCMStatistics(GetGCMStatisticsCallback callback, |
+ bool clear_logs); |
+ |
+ // Enables/disables GCM activity recording, and then returns the stats. |
+ void SetGCMRecording(GetGCMStatisticsCallback callback, bool recording); |
private: |
friend class GCMProfileServiceTestConsumer; |
@@ -194,7 +199,7 @@ class GCMProfileService : public KeyedService, |
// Returns the handler for the given app. |
GCMAppHandler* GetAppHandler(const std::string& app_id); |
- void RequestGCMStatisticsFinished(GCMClient::GCMStatistics stats); |
+ void GetGCMStatisticsFinished(GCMClient::GCMStatistics stats); |
// The profile which owns this object. |
Profile* profile_; |
@@ -228,8 +233,8 @@ class GCMProfileService : public KeyedService, |
// Callback map (from <app_id, message_id> to callback) for Send. |
std::map<std::pair<std::string, std::string>, SendCallback> send_callbacks_; |
- // Callback for RequestGCMStatistics. |
- RequestGCMStatisticsCallback request_gcm_statistics_callback_; |
+ // Callback for GetGCMStatistics. |
+ GetGCMStatisticsCallback request_gcm_statistics_callback_; |
// Used to pass a weak pointer to the IO worker. |
base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_; |