| 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/metrics/persisted_logs.h" | 5 #include "components/metrics/persisted_logs.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/md5.h" | 10 #include "base/md5.h" |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/prefs/scoped_user_pref_update.h" | 13 #include "base/prefs/scoped_user_pref_update.h" |
| 14 #include "base/sha1.h" | 14 #include "base/sha1.h" |
| 15 #include "base/timer/elapsed_timer.h" | 15 #include "base/timer/elapsed_timer.h" |
| 16 #include "components/compression/compression_utils.h" | 16 #include "third_party/zlib/google/compression_utils.h" |
| 17 | 17 |
| 18 namespace metrics { | 18 namespace metrics { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 PersistedLogs::LogReadStatus MakeRecallStatusHistogram( | 22 PersistedLogs::LogReadStatus MakeRecallStatusHistogram( |
| 23 PersistedLogs::LogReadStatus status) { | 23 PersistedLogs::LogReadStatus status) { |
| 24 UMA_HISTOGRAM_ENUMERATION("PrefService.PersistentLogRecallProtobufs", | 24 UMA_HISTOGRAM_ENUMERATION("PrefService.PersistentLogRecallProtobufs", |
| 25 status, PersistedLogs::END_RECALL_STATUS); | 25 status, PersistedLogs::END_RECALL_STATUS); |
| 26 return status; | 26 return status; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 !ReadBase64String(list_value, i * 2 + 1, &list_[i].hash)) { | 162 !ReadBase64String(list_value, i * 2 + 1, &list_[i].hash)) { |
| 163 list_.clear(); | 163 list_.clear(); |
| 164 return MakeRecallStatusHistogram(LOG_STRING_CORRUPTION); | 164 return MakeRecallStatusHistogram(LOG_STRING_CORRUPTION); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 return MakeRecallStatusHistogram(RECALL_SUCCESS); | 168 return MakeRecallStatusHistogram(RECALL_SUCCESS); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace metrics | 171 } // namespace metrics |
| OLD | NEW |