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

Side by Side Diff: components/metrics/metrics_log.h

Issue 2428413005: Revise system profile prefs clearing (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | components/metrics/metrics_log.cc » ('j') | components/metrics/metrics_service.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file defines a set of user experience metrics data recorded by 5 // This file defines a set of user experience metrics data recorded by
6 // the MetricsService. This is the unit of data that is sent to the server. 6 // the MetricsService. This is the unit of data that is sent to the server.
7 7
8 #ifndef COMPONENTS_METRICS_METRICS_LOG_H_ 8 #ifndef COMPONENTS_METRICS_METRICS_LOG_H_
9 #define COMPONENTS_METRICS_METRICS_LOG_H_ 9 #define COMPONENTS_METRICS_METRICS_LOG_H_
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 static int64_t GetCurrentTime(); 80 static int64_t GetCurrentTime();
81 81
82 // Records a user-initiated action. 82 // Records a user-initiated action.
83 void RecordUserAction(const std::string& key); 83 void RecordUserAction(const std::string& key);
84 84
85 // Record any changes in a given histogram for transmission. 85 // Record any changes in a given histogram for transmission.
86 void RecordHistogramDelta(const std::string& histogram_name, 86 void RecordHistogramDelta(const std::string& histogram_name,
87 const base::HistogramSamples& snapshot); 87 const base::HistogramSamples& snapshot);
88 88
89 // Records the current operating environment, including metrics provided by 89 // Records the current operating environment, including metrics provided by
90 // the specified set of |metrics_providers|. Takes the list of installed 90 // the specified set of |metrics_providers|. Takes the list of synthetic
91 // plugins, Google Update statistics, and synthetic trial IDs as parameters 91 // trial IDs as parameters because those can't be obtained synchronously from
92 // because those can't be obtained synchronously from the UI thread. 92 // the UI thread. A synthetic trial is one that is set up dynamically by code
Alexei Svitkine (slow) 2016/10/20 16:47:26 Thanks for removing references to old params. Act
manzagop (departed) 2016/10/20 18:38:37 Done.
93 // A synthetic trial is one that is set up dynamically by code in Chrome. For 93 // in Chrome. For example, a pref may be mapped to a synthetic trial such that
94 // example, a pref may be mapped to a synthetic trial such that the group 94 // the group is determined by the pref value.
95 // is determined by the pref value.
96 void RecordEnvironment( 95 void RecordEnvironment(
97 const std::vector<MetricsProvider*>& metrics_providers, 96 const std::vector<MetricsProvider*>& metrics_providers,
98 const std::vector<variations::ActiveGroupId>& synthetic_trials, 97 const std::vector<variations::ActiveGroupId>& synthetic_trials,
99 int64_t install_date, 98 int64_t install_date,
100 int64_t metrics_reporting_enabled_date); 99 int64_t metrics_reporting_enabled_date);
101 100
102 // Loads the environment proto that was saved by the last RecordEnvironment() 101 // Loads the environment proto that was saved by the last RecordEnvironment()
103 // call from prefs and clears the pref value. On success, returns true and 102 // call from prefs and clears the pref value. On success, returns true and
104 // |app_version| contains the recovered version. Otherwise (if there was no 103 // |app_version| contains the recovered version. Otherwise (if there was no
105 // saved environment in prefs or it could not be decoded), returns false and 104 // saved environment in prefs or it could not be decoded), returns false and
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 const base::TimeTicks creation_time_; 200 const base::TimeTicks creation_time_;
202 201
203 PrefService* local_state_; 202 PrefService* local_state_;
204 203
205 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 204 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
206 }; 205 };
207 206
208 } // namespace metrics 207 } // namespace metrics
209 208
210 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ 209 #endif // COMPONENTS_METRICS_METRICS_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_log.cc » ('j') | components/metrics/metrics_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698