| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 20 matching lines...) Expand all Loading... |
| 31 class HistogramSynchronizer; | 31 class HistogramSynchronizer; |
| 32 class MetricsLogBase; | 32 class MetricsLogBase; |
| 33 class MetricsReportingScheduler; | 33 class MetricsReportingScheduler; |
| 34 class PrefService; | 34 class PrefService; |
| 35 class Profile; | 35 class Profile; |
| 36 class TemplateURLService; | 36 class TemplateURLService; |
| 37 | 37 |
| 38 namespace base { | 38 namespace base { |
| 39 class DictionaryValue; | 39 class DictionaryValue; |
| 40 class ListValue; | 40 class ListValue; |
| 41 class MessageLoopProxy; |
| 41 } | 42 } |
| 42 | 43 |
| 43 namespace prerender { | 44 namespace prerender { |
| 44 bool IsOmniboxEnabled(Profile* profile); | 45 bool IsOmniboxEnabled(Profile* profile); |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace webkit { | 48 namespace webkit { |
| 48 struct WebPluginInfo; | 49 struct WebPluginInfo; |
| 49 } | 50 } |
| 50 | 51 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session. | 159 SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session. |
| 159 SENDING_OLD_LOGS, // Sending unsent logs from previous session. | 160 SENDING_OLD_LOGS, // Sending unsent logs from previous session. |
| 160 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue. | 161 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue. |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 enum ShutdownCleanliness { | 164 enum ShutdownCleanliness { |
| 164 CLEANLY_SHUTDOWN = 0xdeadbeef, | 165 CLEANLY_SHUTDOWN = 0xdeadbeef, |
| 165 NEED_TO_SHUTDOWN = ~CLEANLY_SHUTDOWN | 166 NEED_TO_SHUTDOWN = ~CLEANLY_SHUTDOWN |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 class InitTask; | 169 // First part of the init task. Called on the FILE thread to load hardware |
| 169 class InitTaskComplete; | 170 // class information. |
| 171 void InitTaskGetHardwareClass(base::MessageLoopProxy* target_loop); |
| 170 | 172 |
| 171 // Callback to let us know that the init task is done. | 173 // Callback from InitTaskGetHardwareClass() that continues the init task by |
| 172 void OnInitTaskComplete( | 174 // loading plugin information. |
| 173 const std::string& hardware_class, | 175 void OnInitTaskGotHardwareClass(const std::string& hardware_class); |
| 176 |
| 177 // Callback from PluginService::GetPlugins() that moves the state to |
| 178 // INIT_TASK_DONE. |
| 179 void OnInitTaskGotPluginInfo( |
| 174 const std::vector<webkit::WebPluginInfo>& plugins); | 180 const std::vector<webkit::WebPluginInfo>& plugins); |
| 175 | 181 |
| 176 // When we start a new version of Chromium (different from our last run), we | 182 // When we start a new version of Chromium (different from our last run), we |
| 177 // need to discard the old crash stats so that we don't attribute crashes etc. | 183 // need to discard the old crash stats so that we don't attribute crashes etc. |
| 178 // in the old version to the current version (via current logs). | 184 // in the old version to the current version (via current logs). |
| 179 // Without this, a common reason to finally start a new version is to crash | 185 // Without this, a common reason to finally start a new version is to crash |
| 180 // the old version (after an autoupdate has arrived), and so we'd bias | 186 // the old version (after an autoupdate has arrived), and so we'd bias |
| 181 // initial results towards showing crashes :-(. | 187 // initial results towards showing crashes :-(. |
| 182 static void DiscardOldStabilityStats(PrefService* local_state); | 188 static void DiscardOldStabilityStats(PrefService* local_state); |
| 183 | 189 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 friend class InstantFieldTrial; | 470 friend class InstantFieldTrial; |
| 465 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 471 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
| 466 | 472 |
| 467 // Returns true if prefs::kMetricsReportingEnabled is set. | 473 // Returns true if prefs::kMetricsReportingEnabled is set. |
| 468 static bool IsMetricsReportingEnabled(); | 474 static bool IsMetricsReportingEnabled(); |
| 469 | 475 |
| 470 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 476 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 471 }; | 477 }; |
| 472 | 478 |
| 473 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 479 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |