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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 217083002: One-time reset of UMA client ids and low entropy source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 namespace { 77 namespace {
78 78
79 // Returns the date at which the current metrics client ID was created as 79 // Returns the date at which the current metrics client ID was created as
80 // a string containing seconds since the epoch, or "0" if none was found. 80 // a string containing seconds since the epoch, or "0" if none was found.
81 std::string GetMetricsEnabledDate(PrefService* pref) { 81 std::string GetMetricsEnabledDate(PrefService* pref) {
82 if (!pref) { 82 if (!pref) {
83 NOTREACHED(); 83 NOTREACHED();
84 return "0"; 84 return "0";
85 } 85 }
86 86
87 return pref->GetString(prefs::kMetricsClientIDTimestamp); 87 return pref->GetString(prefs::kMetricsReportingEnabledTimestamp);
88 } 88 }
89 89
90 OmniboxEventProto::InputType AsOmniboxEventInputType( 90 OmniboxEventProto::InputType AsOmniboxEventInputType(
91 AutocompleteInput::Type type) { 91 AutocompleteInput::Type type) {
92 switch (type) { 92 switch (type) {
93 case AutocompleteInput::INVALID: 93 case AutocompleteInput::INVALID:
94 return OmniboxEventProto::INVALID; 94 return OmniboxEventProto::INVALID;
95 case AutocompleteInput::UNKNOWN: 95 case AutocompleteInput::UNKNOWN:
96 return OmniboxEventProto::UNKNOWN; 96 return OmniboxEventProto::UNKNOWN;
97 case AutocompleteInput::URL: 97 case AutocompleteInput::URL:
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 ProductDataToProto(google_update_metrics.google_update_data, 892 ProductDataToProto(google_update_metrics.google_update_data,
893 google_update->mutable_google_update_status()); 893 google_update->mutable_google_update_status());
894 } 894 }
895 895
896 if (!google_update_metrics.product_data.version.empty()) { 896 if (!google_update_metrics.product_data.version.empty()) {
897 ProductDataToProto(google_update_metrics.product_data, 897 ProductDataToProto(google_update_metrics.product_data,
898 google_update->mutable_client_status()); 898 google_update->mutable_client_status());
899 } 899 }
900 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 900 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
901 } 901 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698