Chromium Code Reviews| 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 service that collects information about the user | 5 // This file defines a service that collects information about the user |
| 6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 class MetricsReportingScheduler; | 36 class MetricsReportingScheduler; |
| 37 class PrefService; | 37 class PrefService; |
| 38 class Profile; | 38 class Profile; |
| 39 class TemplateURLService; | 39 class TemplateURLService; |
| 40 | 40 |
| 41 namespace base { | 41 namespace base { |
| 42 class DictionaryValue; | 42 class DictionaryValue; |
| 43 class MessageLoopProxy; | 43 class MessageLoopProxy; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace chromeos { | |
| 47 class DeviceSettingsProviderTest; | |
| 48 } | |
| 49 | |
| 46 namespace content { | 50 namespace content { |
| 47 class RenderProcessHost; | 51 class RenderProcessHost; |
| 48 } | 52 } |
| 49 | 53 |
| 50 namespace prerender { | 54 namespace prerender { |
| 51 bool IsOmniboxEnabled(Profile* profile); | 55 bool IsOmniboxEnabled(Profile* profile); |
| 52 } | 56 } |
| 53 | 57 |
| 54 namespace webkit { | 58 namespace webkit { |
| 55 struct WebPluginInfo; | 59 struct WebPluginInfo; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 bool recording_active() const; | 130 bool recording_active() const; |
| 127 bool reporting_active() const; | 131 bool reporting_active() const; |
| 128 | 132 |
| 129 // Redundant test to ensure that we are notified of a clean exit. | 133 // Redundant test to ensure that we are notified of a clean exit. |
| 130 // This value should be true when process has completed shutdown. | 134 // This value should be true when process has completed shutdown. |
| 131 static bool UmaMetricsProperlyShutdown(); | 135 static bool UmaMetricsProperlyShutdown(); |
| 132 | 136 |
| 133 // Set the dirty flag, which will require a later call to LogCleanShutdown(). | 137 // Set the dirty flag, which will require a later call to LogCleanShutdown(). |
| 134 static void LogNeedForCleanShutdown(); | 138 static void LogNeedForCleanShutdown(); |
| 135 | 139 |
| 140 protected: | |
| 141 // Constructor used in tests. | |
| 142 explicit MetricsService(bool active); | |
| 143 | |
| 144 friend class chromeos::DeviceSettingsProviderTest; | |
|
jar (doing other things)
2012/03/16 16:29:16
I'm always leery about adding friendship to classe
pastarmovj
2012/03/21 15:23:27
I decided to split this CL and get all MetricsServ
| |
| 145 | |
| 136 private: | 146 private: |
| 137 // The MetricsService has a lifecycle that is stored as a state. | 147 // The MetricsService has a lifecycle that is stored as a state. |
| 138 // See metrics_service.cc for description of this lifecycle. | 148 // See metrics_service.cc for description of this lifecycle. |
| 139 enum State { | 149 enum State { |
| 140 INITIALIZED, // Constructor was called. | 150 INITIALIZED, // Constructor was called. |
| 141 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to complete. | 151 INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to complete. |
| 142 INIT_TASK_DONE, // Waiting for timer to send initial log. | 152 INIT_TASK_DONE, // Waiting for timer to send initial log. |
| 143 INITIAL_LOG_READY, // Initial log generated, and waiting for reply. | 153 INITIAL_LOG_READY, // Initial log generated, and waiting for reply. |
| 144 SENDING_OLD_LOGS, // Sending unsent logs from previous session. | 154 SENDING_OLD_LOGS, // Sending unsent logs from previous session. |
| 145 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue. | 155 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 436 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 446 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
| 437 friend class ManifestFetchesBuilder; | 447 friend class ManifestFetchesBuilder; |
| 438 | 448 |
| 439 // Returns true if prefs::kMetricsReportingEnabled is set. | 449 // Returns true if prefs::kMetricsReportingEnabled is set. |
| 440 static bool IsMetricsReportingEnabled(); | 450 static bool IsMetricsReportingEnabled(); |
| 441 | 451 |
| 442 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 452 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 443 }; | 453 }; |
| 444 | 454 |
| 445 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 455 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |