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 3817b0ea8f0f5076c01f1dfd07bed6724cbb2ee8..b93bfa2b30666f61940b8ff17f4416f74a5044bb 100644 |
--- a/chrome/browser/services/gcm/gcm_profile_service.h |
+++ b/chrome/browser/services/gcm/gcm_profile_service.h |
@@ -52,7 +52,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. |
@@ -129,9 +129,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; |
@@ -199,7 +204,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_; |
@@ -233,8 +238,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_; |