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

Unified Diff: components/gcm_driver/gcm_driver.h

Issue 1515153003: Enable chrome://gcm-internals on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver.h
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h
index 48590697a9cba53c125e93afc8d4c80fdcfb3942..6db537d37f88a647a86e6dafd71ea73d9d5db5ef 100644
--- a/components/gcm_driver/gcm_driver.h
+++ b/components/gcm_driver/gcm_driver.h
@@ -85,6 +85,13 @@ class GCMDriver {
typedef base::Callback<void(const GCMClient::GCMStatistics& stats)>
GetGCMStatisticsCallback;
+ // Enumeration to be used with GetGCMStatistics() for indicating whether the
+ // existing logs should be cleared or kept.
+ enum ClearActivityLogs {
+ CLEAR_LOGS,
+ KEEP_LOGS
+ };
+
GCMDriver(
const base::FilePath& store_path,
const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
@@ -173,11 +180,10 @@ class GCMDriver {
// Returns true if the gcm client has an open and active connection.
virtual bool IsConnected() const = 0;
- // Get GCM client internal states and statistics.
- // If clear_logs is true then activity logs will be cleared before the stats
- // are returned.
+ // Get GCM client internal states and statistics. The activity logs will be
+ // cleared before returning the stats when |clear_logs| is set to CLEAR_LOGS.
virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback,
- bool clear_logs) = 0;
+ ClearActivityLogs clear_logs) = 0;
// Enables/disables GCM activity recording, and then returns the stats.
virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback,
« no previous file with comments | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698