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

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

Issue 83023006: Remove plugin_list param from MetricsLog::RecordStabilityMetrics. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 1 month 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.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 // 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 CHROME_BROWSER_METRICS_METRICS_LOG_H_ 8 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_H_
9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_ 9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Records the input text, available choices, and selected entry when the 98 // Records the input text, available choices, and selected entry when the
99 // user uses the Omnibox to open a URL. 99 // user uses the Omnibox to open a URL.
100 void RecordOmniboxOpenedURL(const OmniboxLog& log); 100 void RecordOmniboxOpenedURL(const OmniboxLog& log);
101 101
102 // Records the passed profiled data, which should be a snapshot of the 102 // Records the passed profiled data, which should be a snapshot of the
103 // browser's profiled performance during startup for a single process. 103 // browser's profiled performance during startup for a single process.
104 void RecordProfilerData( 104 void RecordProfilerData(
105 const tracked_objects::ProcessDataSnapshot& process_data, 105 const tracked_objects::ProcessDataSnapshot& process_data,
106 int process_type); 106 int process_type);
107 107
108 // Writes application stability metrics (as part of the profile log). Takes 108 // Writes application stability metrics (as part of the profile log). The
109 // the list of installed plugins as a parameter because that can't be obtained 109 // system profile portion of the log must have already been filled in by a
110 // synchronously from the UI thread. 110 // call to RecordEnvironment().
111 // NOTE: Has the side-effect of clearing those counts. 111 // NOTE: Has the side-effect of clearing the stability prefs..
112 // 112 //
113 // If |log_type| is INITIAL_LOG, records additional info such as number of 113 // If |log_type| is INITIAL_LOG, records additional info such as number of
114 // incomplete shutdowns as well as extra breakpad and debugger stats. 114 // incomplete shutdowns as well as extra breakpad and debugger stats.
115 void RecordStabilityMetrics( 115 void RecordStabilityMetrics(
116 const std::vector<content::WebPluginInfo>& plugin_list,
117 base::TimeDelta incremental_uptime, 116 base::TimeDelta incremental_uptime,
118 LogType log_type); 117 LogType log_type);
119 118
120 const base::TimeTicks& creation_time() const { 119 const base::TimeTicks& creation_time() const {
121 return creation_time_; 120 return creation_time_;
122 } 121 }
123 122
124 protected: 123 protected:
125 // Exposed for the sake of mocking in test code. 124 // Exposed for the sake of mocking in test code.
126 125
127 // Returns the PrefService from which to log metrics data. 126 // Returns the PrefService from which to log metrics data.
128 virtual PrefService* GetPrefService(); 127 virtual PrefService* GetPrefService();
129 128
130 // Returns the screen size for the primary monitor. 129 // Returns the screen size for the primary monitor.
131 virtual gfx::Size GetScreenSize() const; 130 virtual gfx::Size GetScreenSize() const;
132 131
133 // Returns the device scale factor for the primary monitor. 132 // Returns the device scale factor for the primary monitor.
134 virtual float GetScreenDeviceScaleFactor() const; 133 virtual float GetScreenDeviceScaleFactor() const;
135 134
136 // Returns the number of monitors the user is using. 135 // Returns the number of monitors the user is using.
137 virtual int GetScreenCount() const; 136 virtual int GetScreenCount() const;
138 137
139 // Fills |field_trial_ids| with the list of initialized field trials name and 138 // Fills |field_trial_ids| with the list of initialized field trials name and
140 // group ids. 139 // group ids.
141 virtual void GetFieldTrialIds( 140 virtual void GetFieldTrialIds(
142 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const; 141 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const;
143 142
144 private: 143 private:
145 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); 144 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData);
146 145
147 // Within stability group, write plugin crash stats. 146 // Within stability group, write plugin crash stats.
148 void WritePluginStabilityElements( 147 void WritePluginStabilityElements(PrefService* pref);
149 const std::vector<content::WebPluginInfo>& plugin_list,
150 PrefService* pref);
151 148
152 // Within the stability group, write required attributes. 149 // Within the stability group, write required attributes.
153 void WriteRequiredStabilityAttributes(PrefService* pref); 150 void WriteRequiredStabilityAttributes(PrefService* pref);
154 151
155 // Within the stability group, write attributes that need to be updated asap 152 // Within the stability group, write attributes that need to be updated asap
156 // and can't be delayed until the user decides to restart chromium. 153 // and can't be delayed until the user decides to restart chromium.
157 // Delaying these stats would bias metrics away from happy long lived 154 // Delaying these stats would bias metrics away from happy long lived
158 // chromium processes (ones that don't crash, and keep on running). 155 // chromium processes (ones that don't crash, and keep on running).
159 void WriteRealtimeStabilityAttributes(PrefService* pref, 156 void WriteRealtimeStabilityAttributes(PrefService* pref,
160 base::TimeDelta incremental_uptime); 157 base::TimeDelta incremental_uptime);
(...skipping 30 matching lines...) Expand all
191 // Bluetooth Adapter instance for collecting information about paired devices. 188 // Bluetooth Adapter instance for collecting information about paired devices.
192 scoped_refptr<device::BluetoothAdapter> adapter_; 189 scoped_refptr<device::BluetoothAdapter> adapter_;
193 190
194 // The time when the current log was created. 191 // The time when the current log was created.
195 const base::TimeTicks creation_time_; 192 const base::TimeTicks creation_time_;
196 193
197 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 194 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
198 }; 195 };
199 196
200 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ 197 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698