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

Side by Side Diff: components/metrics/persisted_logs.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/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"
13 #include "base/prefs/scoped_user_pref_update.h"
14 #include "base/sha1.h" 12 #include "base/sha1.h"
15 #include "base/timer/elapsed_timer.h" 13 #include "base/timer/elapsed_timer.h"
14 #include "components/prefs/pref_service.h"
15 #include "components/prefs/scoped_user_pref_update.h"
16 #include "third_party/zlib/google/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);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/metrics/metrics_state_manager_unittest.cc ('k') | components/metrics/persisted_logs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698