OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // uma log upload, just as we send histogram data. | 56 // uma log upload, just as we send histogram data. |
57 void RecordIncrementalStabilityElements(); | 57 void RecordIncrementalStabilityElements(); |
58 | 58 |
59 // Get the amount of uptime in seconds since this function was last called. | 59 // Get the amount of uptime in seconds since this function was last called. |
60 // This updates the cumulative uptime metric for uninstall as a side effect. | 60 // This updates the cumulative uptime metric for uninstall as a side effect. |
61 static int64 GetIncrementalUptime(PrefService* pref); | 61 static int64 GetIncrementalUptime(PrefService* pref); |
62 | 62 |
63 // Get the current version of the application as a string. | 63 // Get the current version of the application as a string. |
64 static std::string GetVersionString(); | 64 static std::string GetVersionString(); |
65 | 65 |
66 virtual MetricsLog* AsMetricsLog(); | 66 virtual MetricsLog* AsMetricsLog() OVERRIDE; |
67 | 67 |
68 // Use |extension| in all uploaded appversions in addition to the standard | 68 // Use |extension| in all uploaded appversions in addition to the standard |
69 // version string. | 69 // version string. |
70 static void set_version_extension(const std::string& extension); | 70 static void set_version_extension(const std::string& extension); |
71 static const std::string& version_extension(); | 71 static const std::string& version_extension(); |
72 | 72 |
73 private: | 73 private: |
74 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); | 74 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); |
75 | 75 |
76 // Returns the date at which the current metrics client ID was created as | 76 // Returns the date at which the current metrics client ID was created as |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Writes metrics for the profile identified by key. This writes all | 109 // Writes metrics for the profile identified by key. This writes all |
110 // key/value pairs in profile_metrics. | 110 // key/value pairs in profile_metrics. |
111 void WriteProfileMetrics(const std::string& key, | 111 void WriteProfileMetrics(const std::string& key, |
112 const base::DictionaryValue& profile_metrics); | 112 const base::DictionaryValue& profile_metrics); |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 114 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
115 }; | 115 }; |
116 | 116 |
117 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 117 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
OLD | NEW |