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

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

Issue 1564773002: Move components/compression to third_party/zlib/google (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another #include... Created 4 years, 11 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" 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
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_service_unittest.cc ('k') | components/metrics/persisted_logs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698