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

Unified Diff: components/gcm_driver/gcm_driver_desktop.cc

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_driver_desktop.h ('k') | components/gcm_driver/gcm_stats_recorder_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_desktop.cc
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index 282cb4b4fe4f4ad5355e16aa3e2dd74bb6c90f15..147c418b0c9cf781b3d723a0b356f6f5ce6f236b 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -80,7 +80,7 @@ class GCMDriverDesktop::IOWorker : public GCMClient::Delegate {
void Send(const std::string& app_id,
const std::string& receiver_id,
const OutgoingMessage& message);
- void GetGCMStatistics(bool clear_logs);
+ void GetGCMStatistics(GCMDriver::ClearActivityLogs clear_logs);
void SetGCMRecording(bool recording);
void SetAccountTokens(
@@ -284,7 +284,7 @@ void GCMDriverDesktop::IOWorker::OnActivityRecorded() {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
// When an activity is recorded, get all the stats and refresh the UI of
// gcm-internals page.
- GetGCMStatistics(false);
+ GetGCMStatistics(GCMDriver::KEEP_LOGS);
}
void GCMDriverDesktop::IOWorker::OnConnected(
@@ -343,12 +343,13 @@ void GCMDriverDesktop::IOWorker::Send(const std::string& app_id,
gcm_client_->Send(app_id, receiver_id, message);
}
-void GCMDriverDesktop::IOWorker::GetGCMStatistics(bool clear_logs) {
+void GCMDriverDesktop::IOWorker::GetGCMStatistics(
+ ClearActivityLogs clear_logs) {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
gcm::GCMClient::GCMStatistics stats;
if (gcm_client_.get()) {
- if (clear_logs)
+ if (clear_logs == GCMDriver::CLEAR_LOGS)
gcm_client_->ClearActivityLogs();
stats = gcm_client_->GetStatistics();
}
@@ -735,7 +736,7 @@ bool GCMDriverDesktop::IsConnected() const {
void GCMDriverDesktop::GetGCMStatistics(
const GetGCMStatisticsCallback& callback,
- bool clear_logs) {
+ ClearActivityLogs clear_logs) {
DCHECK(ui_thread_->RunsTasksOnCurrentThread());
DCHECK(!callback.is_null());
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | components/gcm_driver/gcm_stats_recorder_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698