OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |