Chromium Code Reviews| Index: components/gcm_driver/gcm_internals_helper.cc |
| diff --git a/components/gcm_driver/gcm_internals_helper.cc b/components/gcm_driver/gcm_internals_helper.cc |
| index eb2ee7680a7c7cf12b287e359f31f8eced4d4528..66cada27816c7400cbbf62999c12562781d8bd04 100644 |
| --- a/components/gcm_driver/gcm_internals_helper.cc |
| +++ b/components/gcm_driver/gcm_internals_helper.cc |
| @@ -8,9 +8,11 @@ |
| #include <utility> |
| #include "base/format_macros.h" |
| +#include "base/i18n/time_formatting.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/strings/string_util.h" |
| #include "base/strings/stringprintf.h" |
| +#include "base/strings/utf_string_conversions.h" |
| #include "base/values.h" |
| #include "components/gcm_driver/gcm_activity.h" |
| #include "components/gcm_driver/gcm_internals_constants.h" |
| @@ -118,6 +120,14 @@ void SetGCMInternalsInfo(const gcm::GCMClient::GCMStatistics* stats, |
| base::JoinString(stats->registered_app_ids, ",")); |
| if (stats->connection_client_created) |
| device_info->SetString(kConnectionState, stats->connection_state); |
| + device_info->SetString( |
| + kLastCheckin, base::UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( |
| + stats->last_checkin))); |
|
Peter Beverloo
2016/10/28 15:52:30
last_checkin can be NULL here when the CheckinRequ
Nicolas Zea
2016/11/01 00:18:16
Done.
|
| + if (!stats->next_checkin.is_null()) { |
| + device_info->SetString( |
| + kNextCheckin, base::UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( |
| + stats->next_checkin))); |
| + } |
| if (stats->android_id > 0) { |
| device_info->SetString( |
| kAndroidId, base::StringPrintf("0x%" PRIx64, stats->android_id)); |