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

Side by Side Diff: components/gcm_driver/gcm_client_impl.cc

Issue 1515153003: Enable chrome://gcm-internals on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « components/gcm_driver/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/gcm_driver/gcm_client_impl.h" 5 #include "components/gcm_driver/gcm_client_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 return "INITIAL_DEVICE_CHECKIN"; 1147 return "INITIAL_DEVICE_CHECKIN";
1148 case GCMClientImpl::READY: 1148 case GCMClientImpl::READY:
1149 return "READY"; 1149 return "READY";
1150 default: 1150 default:
1151 NOTREACHED(); 1151 NOTREACHED();
1152 return std::string(); 1152 return std::string();
1153 } 1153 }
1154 } 1154 }
1155 1155
1156 void GCMClientImpl::SetRecording(bool recording) { 1156 void GCMClientImpl::SetRecording(bool recording) {
1157 recorder_.SetRecording(recording); 1157 recorder_.set_is_recording(recording);
1158 } 1158 }
1159 1159
1160 void GCMClientImpl::ClearActivityLogs() { 1160 void GCMClientImpl::ClearActivityLogs() {
1161 recorder_.Clear(); 1161 recorder_.Clear();
1162 } 1162 }
1163 1163
1164 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const { 1164 GCMClient::GCMStatistics GCMClientImpl::GetStatistics() const {
1165 GCMClient::GCMStatistics stats; 1165 GCMClient::GCMStatistics stats;
1166 stats.gcm_client_created = true; 1166 stats.gcm_client_created = true;
1167 stats.is_recording = recorder_.is_recording(); 1167 stats.is_recording = recorder_.is_recording();
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 bool GCMClientImpl::HasStandaloneRegisteredApp() const { 1373 bool GCMClientImpl::HasStandaloneRegisteredApp() const {
1374 if (registrations_.empty()) 1374 if (registrations_.empty())
1375 return false; 1375 return false;
1376 // Note that account mapper is not counted as a standalone app since it is 1376 // Note that account mapper is not counted as a standalone app since it is
1377 // automatically started when other app uses GCM. 1377 // automatically started when other app uses GCM.
1378 return registrations_.size() > 1 || 1378 return registrations_.size() > 1 ||
1379 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId); 1379 !ExistsGCMRegistrationInMap(registrations_, kGCMAccountMapperAppId);
1380 } 1380 }
1381 1381
1382 } // namespace gcm 1382 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698