| OLD | NEW |
| 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 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "chrome/browser/metrics/extension_metrics.h" | 15 #include "chrome/browser/metrics/extension_metrics.h" |
| 16 #include "chrome/browser/metrics/metrics_network_observer.h" | 16 #include "chrome/browser/metrics/metrics_network_observer.h" |
| 17 #include "chrome/common/variations/variations_util.h" | 17 #include "chrome/common/variations/variations_util.h" |
| 18 #include "chrome/installer/util/google_update_settings.h" | 18 #include "chrome/installer/util/google_update_settings.h" |
| 19 #include "components/metrics/metrics_log_base.h" | 19 #include "components/metrics/metrics_log_base.h" |
| 20 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| 21 | 21 |
| 22 class HashedExtensionMetrics; | 22 class HashedExtensionMetrics; |
| 23 class MetricsNetworkObserver; | 23 class MetricsNetworkObserver; |
| 24 class PrefService; | 24 class PrefService; |
| 25 class PrefRegistrySimple; | 25 class PrefRegistrySimple; |
| 26 | 26 |
| 27 #if defined(OS_CHROMEOS) | |
| 28 class MetricsLogChromeOS; | |
| 29 #endif | |
| 30 | |
| 31 namespace base { | 27 namespace base { |
| 32 class DictionaryValue; | 28 class DictionaryValue; |
| 33 } | 29 } |
| 34 | 30 |
| 35 namespace content { | 31 namespace content { |
| 36 struct WebPluginInfo; | 32 struct WebPluginInfo; |
| 37 } | 33 } |
| 38 | 34 |
| 39 namespace metrics { | 35 namespace metrics { |
| 40 class MetricsProvider; | 36 class MetricsProvider; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 virtual float GetScreenDeviceScaleFactor() const; | 120 virtual float GetScreenDeviceScaleFactor() const; |
| 125 | 121 |
| 126 // Returns the number of monitors the user is using. | 122 // Returns the number of monitors the user is using. |
| 127 virtual int GetScreenCount() const; | 123 virtual int GetScreenCount() const; |
| 128 | 124 |
| 129 // Fills |field_trial_ids| with the list of initialized field trials name and | 125 // Fills |field_trial_ids| with the list of initialized field trials name and |
| 130 // group ids. | 126 // group ids. |
| 131 virtual void GetFieldTrialIds( | 127 virtual void GetFieldTrialIds( |
| 132 std::vector<variations::ActiveGroupId>* field_trial_ids) const; | 128 std::vector<variations::ActiveGroupId>* field_trial_ids) const; |
| 133 | 129 |
| 134 // Exposed to allow dependency injection for tests. | |
| 135 #if defined(OS_CHROMEOS) | |
| 136 scoped_ptr<MetricsLogChromeOS> metrics_log_chromeos_; | |
| 137 #endif | |
| 138 | |
| 139 private: | 130 private: |
| 140 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); | 131 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); |
| 141 | 132 |
| 142 // Returns true if the environment has already been filled in by a call to | 133 // Returns true if the environment has already been filled in by a call to |
| 143 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). | 134 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). |
| 144 bool HasEnvironment() const; | 135 bool HasEnvironment() const; |
| 145 | 136 |
| 146 // Returns true if the stability metrics have already been filled in by a | 137 // Returns true if the stability metrics have already been filled in by a |
| 147 // call to RecordStabilityMetrics(). | 138 // call to RecordStabilityMetrics(). |
| 148 bool HasStabilityMetrics() const; | 139 bool HasStabilityMetrics() const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 170 // The time when the current log was created. | 161 // The time when the current log was created. |
| 171 const base::TimeTicks creation_time_; | 162 const base::TimeTicks creation_time_; |
| 172 | 163 |
| 173 // For including information on which extensions are installed in reports. | 164 // For including information on which extensions are installed in reports. |
| 174 HashedExtensionMetrics extension_metrics_; | 165 HashedExtensionMetrics extension_metrics_; |
| 175 | 166 |
| 176 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 167 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
| 177 }; | 168 }; |
| 178 | 169 |
| 179 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 170 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| OLD | NEW |