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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); |
67 | 67 |
| 68 // Use |extension| in all uploaded appversions in addition to the standard |
| 69 // version string. |
| 70 static void set_version_extension(const std::string& extension); |
| 71 static const std::string& version_extension(); |
| 72 |
68 private: | 73 private: |
69 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); | 74 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); |
70 | 75 |
71 // 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 |
72 // a string containing milliseconds since the epoch, or "0" if none was found. | 77 // a string containing milliseconds since the epoch, or "0" if none was found. |
73 std::string GetInstallDate() const; | 78 std::string GetInstallDate() const; |
74 | 79 |
75 | 80 |
76 // Writes application stability metrics (as part of the profile log). | 81 // Writes application stability metrics (as part of the profile log). |
77 // NOTE: Has the side-effect of clearing those counts. | 82 // NOTE: Has the side-effect of clearing those counts. |
(...skipping 25 matching lines...) Expand all Loading... |
103 | 108 |
104 // Writes metrics for the profile identified by key. This writes all | 109 // Writes metrics for the profile identified by key. This writes all |
105 // key/value pairs in profile_metrics. | 110 // key/value pairs in profile_metrics. |
106 void WriteProfileMetrics(const std::string& key, | 111 void WriteProfileMetrics(const std::string& key, |
107 const base::DictionaryValue& profile_metrics); | 112 const base::DictionaryValue& profile_metrics); |
108 | 113 |
109 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 114 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
110 }; | 115 }; |
111 | 116 |
112 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 117 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
OLD | NEW |