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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service.h

Issue 202083005: Add activity recording capability to gcm internals page. User can refresh, start/stop recording, an… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 8 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
« no previous file with comments | « chrome/browser/services/gcm/gcm_client_mock.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chrome/browser/services/gcm/gcm_client_mock.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698