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 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const base::TimeTicks& creation_time() const { | 108 const base::TimeTicks& creation_time() const { |
109 return creation_time_; | 109 return creation_time_; |
110 } | 110 } |
111 | 111 |
112 protected: | 112 protected: |
113 // Exposed for the sake of mocking in test code. | 113 // Exposed for the sake of mocking in test code. |
114 | 114 |
115 // Returns the PrefService from which to log metrics data. | 115 // Returns the PrefService from which to log metrics data. |
116 virtual PrefService* GetPrefService(); | 116 virtual PrefService* GetPrefService(); |
117 | 117 |
118 // Returns the screen size for the primary monitor. | |
119 virtual gfx::Size GetScreenSize() const; | |
120 | |
121 // Returns the device scale factor for the primary monitor. | |
122 virtual float GetScreenDeviceScaleFactor() const; | |
123 | |
124 // Returns the number of monitors the user is using. | |
125 virtual int GetScreenCount() const; | |
126 | |
127 // Fills |field_trial_ids| with the list of initialized field trials name and | 118 // Fills |field_trial_ids| with the list of initialized field trials name and |
128 // group ids. | 119 // group ids. |
129 virtual void GetFieldTrialIds( | 120 virtual void GetFieldTrialIds( |
130 std::vector<variations::ActiveGroupId>* field_trial_ids) const; | 121 std::vector<variations::ActiveGroupId>* field_trial_ids) const; |
131 | 122 |
132 // Exposed to allow dependency injection for tests. | 123 // Exposed to allow dependency injection for tests. |
133 #if defined(OS_CHROMEOS) | 124 #if defined(OS_CHROMEOS) |
134 scoped_ptr<MetricsLogChromeOS> metrics_log_chromeos_; | 125 scoped_ptr<MetricsLogChromeOS> metrics_log_chromeos_; |
135 #endif | 126 #endif |
136 | 127 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // The time when the current log was created. | 160 // The time when the current log was created. |
170 const base::TimeTicks creation_time_; | 161 const base::TimeTicks creation_time_; |
171 | 162 |
172 // For including information on which extensions are installed in reports. | 163 // For including information on which extensions are installed in reports. |
173 HashedExtensionMetrics extension_metrics_; | 164 HashedExtensionMetrics extension_metrics_; |
174 | 165 |
175 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 166 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
176 }; | 167 }; |
177 | 168 |
178 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 169 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
OLD | NEW |