| 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 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
| 27 #include "content/public/browser/user_metrics.h" | 27 #include "content/public/browser/user_metrics.h" |
| 28 #include "net/url_request/url_fetcher_delegate.h" | 28 #include "net/url_request/url_fetcher_delegate.h" |
| 29 | 29 |
| 30 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
| 31 #include "chrome/browser/chromeos/external_metrics.h" | 31 #include "chrome/browser/chromeos/external_metrics.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 class MetricsReportingScheduler; | 34 class MetricsReportingScheduler; |
| 35 class PrefService; | 35 class PrefService; |
| 36 class PrefServiceSimple; | 36 class PrefRegistrySimple; |
| 37 class Profile; | 37 class Profile; |
| 38 class TemplateURLService; | 38 class TemplateURLService; |
| 39 | 39 |
| 40 namespace base { | 40 namespace base { |
| 41 class DictionaryValue; | 41 class DictionaryValue; |
| 42 class MessageLoopProxy; | 42 class MessageLoopProxy; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 class RenderProcessHost; | 46 class RenderProcessHost; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // to be started. | 116 // to be started. |
| 117 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider( | 117 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider( |
| 118 bool reporting_will_be_enabled); | 118 bool reporting_will_be_enabled); |
| 119 | 119 |
| 120 // Force the client ID to be generated. This is useful in case it's needed | 120 // Force the client ID to be generated. This is useful in case it's needed |
| 121 // before recording. | 121 // before recording. |
| 122 void ForceClientIdCreation(); | 122 void ForceClientIdCreation(); |
| 123 | 123 |
| 124 // At startup, prefs needs to be called with a list of all the pref names and | 124 // At startup, prefs needs to be called with a list of all the pref names and |
| 125 // types we'll be using. | 125 // types we'll be using. |
| 126 static void RegisterPrefs(PrefServiceSimple* local_state); | 126 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 127 | 127 |
| 128 // Set up notifications which indicate that a user is performing work. This is | 128 // Set up notifications which indicate that a user is performing work. This is |
| 129 // useful to allow some features to sleep, until the machine becomes active, | 129 // useful to allow some features to sleep, until the machine becomes active, |
| 130 // such as precluding UMA uploads unless there was recent activity. | 130 // such as precluding UMA uploads unless there was recent activity. |
| 131 static void SetUpNotifications(content::NotificationRegistrar* registrar, | 131 static void SetUpNotifications(content::NotificationRegistrar* registrar, |
| 132 content::NotificationObserver* observer); | 132 content::NotificationObserver* observer); |
| 133 | 133 |
| 134 // Implementation of content::NotificationObserver | 134 // Implementation of content::NotificationObserver |
| 135 virtual void Observe(int type, | 135 virtual void Observe(int type, |
| 136 const content::NotificationSource& source, | 136 const content::NotificationSource& source, |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 friend class extensions::ExtensionDownloader; | 519 friend class extensions::ExtensionDownloader; |
| 520 friend class extensions::ManifestFetchData; | 520 friend class extensions::ManifestFetchData; |
| 521 | 521 |
| 522 // Returns true if prefs::kMetricsReportingEnabled is set. | 522 // Returns true if prefs::kMetricsReportingEnabled is set. |
| 523 static bool IsMetricsReportingEnabled(); | 523 static bool IsMetricsReportingEnabled(); |
| 524 | 524 |
| 525 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 525 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 526 }; | 526 }; |
| 527 | 527 |
| 528 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 528 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |