| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // uma log upload, just as we send histogram data. | 48 // uma log upload, just as we send histogram data. |
| 49 void RecordIncrementalStabilityElements(); | 49 void RecordIncrementalStabilityElements(); |
| 50 | 50 |
| 51 // Get the amount of uptime in seconds since this function was last called. | 51 // Get the amount of uptime in seconds since this function was last called. |
| 52 // This updates the cumulative uptime metric for uninstall as a side effect. | 52 // This updates the cumulative uptime metric for uninstall as a side effect. |
| 53 static int64 GetIncrementalUptime(PrefService* pref); | 53 static int64 GetIncrementalUptime(PrefService* pref); |
| 54 | 54 |
| 55 // Get the current version of the application as a string. | 55 // Get the current version of the application as a string. |
| 56 static std::string GetVersionString(); | 56 static std::string GetVersionString(); |
| 57 | 57 |
| 58 virtual MetricsLog* AsMetricsLog() { | 58 virtual MetricsLog* AsMetricsLog(); |
| 59 return this; | |
| 60 } | |
| 61 | 59 |
| 62 private: | 60 private: |
| 63 // Returns the date at which the current metrics client ID was created as | 61 // Returns the date at which the current metrics client ID was created as |
| 64 // a string containing milliseconds since the epoch, or "0" if none was found. | 62 // a string containing milliseconds since the epoch, or "0" if none was found. |
| 65 std::string GetInstallDate() const; | 63 std::string GetInstallDate() const; |
| 66 | 64 |
| 67 | 65 |
| 68 // Writes application stability metrics (as part of the profile log). | 66 // Writes application stability metrics (as part of the profile log). |
| 69 // NOTE: Has the side-effect of clearing those counts. | 67 // NOTE: Has the side-effect of clearing those counts. |
| 70 void WriteStabilityElement(); | 68 void WriteStabilityElement(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 93 | 91 |
| 94 // Writes metrics for the profile identified by key. This writes all | 92 // Writes metrics for the profile identified by key. This writes all |
| 95 // key/value pairs in profile_metrics. | 93 // key/value pairs in profile_metrics. |
| 96 void WriteProfileMetrics(const std::string& key, | 94 void WriteProfileMetrics(const std::string& key, |
| 97 const DictionaryValue& profile_metrics); | 95 const DictionaryValue& profile_metrics); |
| 98 | 96 |
| 99 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 97 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
| 100 }; | 98 }; |
| 101 | 99 |
| 102 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 100 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| OLD | NEW |