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

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

Issue 9474041: Upload UMA data using protocol buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crash in test Created 8 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
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 #pragma once 10 #pragma once
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const std::vector<webkit::WebPluginInfo>& plugin_list, 58 const std::vector<webkit::WebPluginInfo>& plugin_list,
59 const base::DictionaryValue* profile_metrics); 59 const base::DictionaryValue* profile_metrics);
60 60
61 // Records the input text, available choices, and selected entry when the 61 // Records the input text, available choices, and selected entry when the
62 // user uses the Omnibox to open a URL. 62 // user uses the Omnibox to open a URL.
63 void RecordOmniboxOpenedURL(const AutocompleteLog& log); 63 void RecordOmniboxOpenedURL(const AutocompleteLog& log);
64 64
65 // Record recent delta for critical stability metrics. We can't wait for a 65 // Record recent delta for critical stability metrics. We can't wait for a
66 // restart to gather these, as that delay biases our observation away from 66 // restart to gather these, as that delay biases our observation away from
67 // users that run happily for a looooong time. We send increments with each 67 // users that run happily for a looooong time. We send increments with each
68 // uma log upload, just as we send histogram data. 68 // uma log upload, just as we send histogram data. Takes the list of
69 void RecordIncrementalStabilityElements(); 69 // installed plugins as a parameter because that can't be obtained
70 // synchronously from the UI thread.
71 void RecordIncrementalStabilityElements(
72 const std::vector<webkit::WebPluginInfo>& plugin_list);
70 73
71 private: 74 private:
72 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); 75 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData);
73 76
74 // Writes application stability metrics (as part of the profile log). 77 // Writes application stability metrics (as part of the profile log).
75 // NOTE: Has the side-effect of clearing those counts. 78 // NOTE: Has the side-effect of clearing those counts.
76 void WriteStabilityElement(PrefService* pref); 79 void WriteStabilityElement(
80 const std::vector<webkit::WebPluginInfo>& plugin_list,
81 PrefService* pref);
77 82
78 // Within stability group, write plugin crash stats. 83 // Within stability group, write plugin crash stats.
79 void WritePluginStabilityElements(PrefService* pref); 84 void WritePluginStabilityElements(
85 const std::vector<webkit::WebPluginInfo>& plugin_list,
86 PrefService* pref);
80 87
81 // Within the stability group, write required attributes. 88 // Within the stability group, write required attributes.
82 void WriteRequiredStabilityAttributes(PrefService* pref); 89 void WriteRequiredStabilityAttributes(PrefService* pref);
83 90
84 // Within the stability group, write attributes that need to be updated asap 91 // Within the stability group, write attributes that need to be updated asap
85 // and can't be delayed until the user decides to restart chromium. 92 // and can't be delayed until the user decides to restart chromium.
86 // Delaying these stats would bias metrics away from happy long lived 93 // Delaying these stats would bias metrics away from happy long lived
87 // chromium processes (ones that don't crash, and keep on running). 94 // chromium processes (ones that don't crash, and keep on running).
88 void WriteRealtimeStabilityAttributes(PrefService* pref); 95 void WriteRealtimeStabilityAttributes(PrefService* pref);
89 96
(...skipping 11 matching lines...) Expand all
101 108
102 // Writes metrics for the profile identified by key. This writes all 109 // Writes metrics for the profile identified by key. This writes all
103 // key/value pairs in profile_metrics. 110 // key/value pairs in profile_metrics.
104 void WriteProfileMetrics(const std::string& key, 111 void WriteProfileMetrics(const std::string& key,
105 const base::DictionaryValue& profile_metrics); 112 const base::DictionaryValue& profile_metrics);
106 113
107 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 114 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
108 }; 115 };
109 116
110 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ 117 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log.cc » ('j') | chrome/browser/metrics/metrics_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698