Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: chrome/browser/metrics/metrics_log.h

Issue 292433015: Refactor MetricsLogChromeOS to ChromeOSMetricsProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fixes Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/variations/variations_util.h" 15 #include "chrome/common/variations/variations_util.h"
16 #include "components/metrics/metrics_log_base.h" 16 #include "components/metrics/metrics_log_base.h"
17 #include "ui/gfx/size.h" 17 #include "ui/gfx/size.h"
18 18
19 class PrefService; 19 class PrefService;
20 20
21 #if defined(OS_CHROMEOS)
22 class MetricsLogChromeOS;
23 #endif
24
25 namespace base { 21 namespace base {
26 class DictionaryValue; 22 class DictionaryValue;
27 } 23 }
28 24
29 namespace content { 25 namespace content {
30 struct WebPluginInfo; 26 struct WebPluginInfo;
31 } 27 }
32 28
33 namespace metrics { 29 namespace metrics {
34 class MetricsProvider; 30 class MetricsProvider;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Exposed for the sake of mocking in test code. 102 // Exposed for the sake of mocking in test code.
107 103
108 // Returns the PrefService from which to log metrics data. 104 // Returns the PrefService from which to log metrics data.
109 virtual PrefService* GetPrefService(); 105 virtual PrefService* GetPrefService();
110 106
111 // Fills |field_trial_ids| with the list of initialized field trials name and 107 // Fills |field_trial_ids| with the list of initialized field trials name and
112 // group ids. 108 // group ids.
113 virtual void GetFieldTrialIds( 109 virtual void GetFieldTrialIds(
114 std::vector<variations::ActiveGroupId>* field_trial_ids) const; 110 std::vector<variations::ActiveGroupId>* field_trial_ids) const;
115 111
116 // Exposed to allow dependency injection for tests.
117 #if defined(OS_CHROMEOS)
118 scoped_ptr<MetricsLogChromeOS> metrics_log_chromeos_;
119 #endif
120
121 private: 112 private:
122 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); 113 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData);
123 114
124 // Returns true if the environment has already been filled in by a call to 115 // Returns true if the environment has already been filled in by a call to
125 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). 116 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs().
126 bool HasEnvironment() const; 117 bool HasEnvironment() const;
127 118
128 // Returns true if the stability metrics have already been filled in by a 119 // Returns true if the stability metrics have already been filled in by a
129 // call to RecordStabilityMetrics(). 120 // call to RecordStabilityMetrics().
130 bool HasStabilityMetrics() const; 121 bool HasStabilityMetrics() const;
(...skipping 13 matching lines...) Expand all
144 // instance. 135 // instance.
145 metrics::MetricsServiceClient* const client_; 136 metrics::MetricsServiceClient* const client_;
146 137
147 // The time when the current log was created. 138 // The time when the current log was created.
148 const base::TimeTicks creation_time_; 139 const base::TimeTicks creation_time_;
149 140
150 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 141 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
151 }; 142 };
152 143
153 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ 144 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chromeos_metrics_provider_unittest.cc ('k') | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698