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

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

Issue 2296543002: Quantify initial stability report edge cases. (Closed)
Patch Set: Change a metric's name Created 4 years, 3 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 | « base/metrics/histogram_macros.h ('k') | components/metrics/metrics_log.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 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // A synthetic trial is one that is set up dynamically by code in Chrome. For 93 // A synthetic trial is one that is set up dynamically by code in Chrome. For
94 // example, a pref may be mapped to a synthetic trial such that the group 94 // example, a pref may be mapped to a synthetic trial such that the group
95 // is determined by the pref value. 95 // is determined by the pref value.
96 void RecordEnvironment( 96 void RecordEnvironment(
97 const std::vector<MetricsProvider*>& metrics_providers, 97 const std::vector<MetricsProvider*>& metrics_providers,
98 const std::vector<variations::ActiveGroupId>& synthetic_trials, 98 const std::vector<variations::ActiveGroupId>& synthetic_trials,
99 int64_t install_date, 99 int64_t install_date,
100 int64_t metrics_reporting_enabled_date); 100 int64_t metrics_reporting_enabled_date);
101 101
102 // Loads the environment proto that was saved by the last RecordEnvironment() 102 // Loads the environment proto that was saved by the last RecordEnvironment()
103 // call from prefs and clears the pref value. Returns true on success or false 103 // call from prefs and clears the pref value. On success, returns true and
104 // if there was no saved environment in prefs or it could not be decoded. 104 // |app_version| contains the recovered version. Otherwise (if there was no
105 bool LoadSavedEnvironmentFromPrefs(); 105 // saved environment in prefs or it could not be decoded), returns false and
106 // |app_version| is empty.
107 bool LoadSavedEnvironmentFromPrefs(std::string* app_version);
106 108
107 // Writes application stability metrics, including stability metrics provided 109 // Writes application stability metrics, including stability metrics provided
108 // by the specified set of |metrics_providers|. The system profile portion of 110 // by the specified set of |metrics_providers|. The system profile portion of
109 // the log must have already been filled in by a call to RecordEnvironment() 111 // the log must have already been filled in by a call to RecordEnvironment()
110 // or LoadSavedEnvironmentFromPrefs(). 112 // or LoadSavedEnvironmentFromPrefs().
111 // NOTE: Has the side-effect of clearing the stability prefs.. 113 // NOTE: Has the side-effect of clearing the stability prefs..
112 // 114 //
113 // If this log is of type INITIAL_STABILITY_LOG, records additional info such 115 // If this log is of type INITIAL_STABILITY_LOG, records additional info such
114 // as number of incomplete shutdowns as well as extra breakpad and debugger 116 // as number of incomplete shutdowns as well as extra breakpad and debugger
115 // stats. 117 // stats.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const base::TimeTicks creation_time_; 201 const base::TimeTicks creation_time_;
200 202
201 PrefService* local_state_; 203 PrefService* local_state_;
202 204
203 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 205 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
204 }; 206 };
205 207
206 } // namespace metrics 208 } // namespace metrics
207 209
208 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ 210 #endif // COMPONENTS_METRICS_METRICS_LOG_H_
OLDNEW
« no previous file with comments | « base/metrics/histogram_macros.h ('k') | components/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698