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 | 10 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 void IncrementLongPrefsValue(const char* path); | 360 void IncrementLongPrefsValue(const char* path); |
| 361 | 361 |
| 362 // Records a renderer process crash. | 362 // Records a renderer process crash. |
| 363 void LogRendererCrash(content::RenderProcessHost* host, | 363 void LogRendererCrash(content::RenderProcessHost* host, |
| 364 base::TerminationStatus status, | 364 base::TerminationStatus status, |
| 365 int exit_code); | 365 int exit_code); |
| 366 | 366 |
| 367 // Records a renderer process hang. | 367 // Records a renderer process hang. |
| 368 void LogRendererHang(); | 368 void LogRendererHang(); |
| 369 | 369 |
| 370 // Records that the browser was shut down cleanly. | 370 // Records that the browser was shutdown cleanly, and the value of |
| 371 void LogCleanShutdown(); | 371 // |kStatabilitySessionEndCompleted|. |
|
jar (doing other things)
2013/10/11 22:55:44
nit: I think you didn't finish this sentence.
A
| |
| 372 void RecordStabilitySessionEndCompleted(bool value); | |
| 372 | 373 |
| 373 // Returns reference to ChildProcessStats corresponding to |data|. | 374 // Returns reference to ChildProcessStats corresponding to |data|. |
| 374 ChildProcessStats& GetChildProcessStats( | 375 ChildProcessStats& GetChildProcessStats( |
| 375 const content::ChildProcessData& data); | 376 const content::ChildProcessData& data); |
| 376 | 377 |
| 377 // Saves plugin-related updates from the in-object buffer to Local State | 378 // Saves plugin-related updates from the in-object buffer to Local State |
| 378 // for retrieval next time we send a Profile log (generally next launch). | 379 // for retrieval next time we send a Profile log (generally next launch). |
| 379 void RecordPluginChanges(PrefService* pref); | 380 void RecordPluginChanges(PrefService* pref); |
| 380 | 381 |
| 381 // Records state that should be periodically saved, like uptime and | 382 // Records state that should be periodically saved, like uptime and |
| 382 // buffered plugin stability statistics. | 383 // buffered plugin stability statistics. |
| 383 void RecordCurrentState(PrefService* pref); | 384 void RecordCurrentState(PrefService* pref); |
| 384 | 385 |
| 385 // Logs the initiation of a page load and uses |web_contents| to do | 386 // Logs the initiation of a page load and uses |web_contents| to do |
| 386 // additional logging of the type of page loaded. | 387 // additional logging of the type of page loaded. |
| 387 void LogLoadStarted(content::WebContents* web_contents); | 388 void LogLoadStarted(content::WebContents* web_contents); |
| 388 | 389 |
| 389 // Checks whether a notification can be logged. | 390 // Checks whether a notification can be logged. |
| 390 bool CanLogNotification(); | 391 bool CanLogNotification(); |
| 391 | 392 |
| 392 // Sets the value of the specified path in prefs and schedules a save. | |
| 393 void RecordBooleanPrefValue(const char* path, bool value); | |
| 394 | |
| 395 // Returns true if process of type |type| should be counted as a plugin | 393 // Returns true if process of type |type| should be counted as a plugin |
| 396 // process, and false otherwise. | 394 // process, and false otherwise. |
| 397 static bool IsPluginProcess(int process_type); | 395 static bool IsPluginProcess(int process_type); |
| 398 | 396 |
| 399 content::ActionCallback action_callback_; | 397 content::ActionCallback action_callback_; |
| 400 | 398 |
| 401 content::NotificationRegistrar registrar_; | 399 content::NotificationRegistrar registrar_; |
| 402 | 400 |
| 403 // Indicate whether recording and reporting are currently happening. | 401 // Indicate whether recording and reporting are currently happening. |
| 404 // These should not be set directly, but by calling SetRecording and | 402 // These should not be set directly, but by calling SetRecording and |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 friend class extensions::ExtensionDownloader; | 508 friend class extensions::ExtensionDownloader; |
| 511 friend class extensions::ManifestFetchData; | 509 friend class extensions::ManifestFetchData; |
| 512 | 510 |
| 513 // Returns true if prefs::kMetricsReportingEnabled is set. | 511 // Returns true if prefs::kMetricsReportingEnabled is set. |
| 514 static bool IsMetricsReportingEnabled(); | 512 static bool IsMetricsReportingEnabled(); |
| 515 | 513 |
| 516 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 514 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
| 517 }; | 515 }; |
| 518 | 516 |
| 519 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 517 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |