summaryrefslogtreecommitdiffstats
path: root/chrome/browser/services/gcm/gcm_profile_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/services/gcm/gcm_profile_service.h')
-rw-r--r--chrome/browser/services/gcm/gcm_profile_service.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/services/gcm/gcm_profile_service.h b/chrome/browser/services/gcm/gcm_profile_service.h
index 3817b0e..b93bfa2 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_;