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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // Callback from InitTaskGetGoogleUpdateData() that continues the init task by | 245 // Callback from InitTaskGetGoogleUpdateData() that continues the init task by |
246 // loading profiler data. | 246 // loading profiler data. |
247 void OnInitTaskGotGoogleUpdateData( | 247 void OnInitTaskGotGoogleUpdateData( |
248 const GoogleUpdateMetrics& google_update_metrics); | 248 const GoogleUpdateMetrics& google_update_metrics); |
249 | 249 |
250 void OnUserAction(const std::string& action); | 250 void OnUserAction(const std::string& action); |
251 | 251 |
252 // TrackingSynchronizerObserver: | 252 // TrackingSynchronizerObserver: |
253 virtual void ReceivedProfilerData( | 253 virtual void ReceivedProfilerData( |
254 const tracked_objects::ProcessDataSnapshot& process_data, | 254 const tracked_objects::ProcessDataSnapshot& process_data, |
255 content::ProcessType process_type) OVERRIDE; | 255 int process_type) OVERRIDE; |
256 // Callback that moves the state to INIT_TASK_DONE. | 256 // Callback that moves the state to INIT_TASK_DONE. |
257 virtual void FinishedReceivingProfilerData() OVERRIDE; | 257 virtual void FinishedReceivingProfilerData() OVERRIDE; |
258 | 258 |
259 // Returns the low entropy source for this client. This is a random value | 259 // Returns the low entropy source for this client. This is a random value |
260 // that is non-identifying amongst browser clients. This method will | 260 // that is non-identifying amongst browser clients. This method will |
261 // generate the entropy source value if it has not been called before. | 261 // generate the entropy source value if it has not been called before. |
262 int GetLowEntropySource(); | 262 int GetLowEntropySource(); |
263 | 263 |
264 // Returns the first entropy source that was returned by this service since | 264 // Returns the first entropy source that was returned by this service since |
265 // start up, or NONE if neither was returned yet. This is exposed for testing | 265 // start up, or NONE if neither was returned yet. This is exposed for testing |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 const content::NotificationDetails& details); | 398 const content::NotificationDetails& details); |
399 | 399 |
400 // Checks whether a notification can be logged. | 400 // Checks whether a notification can be logged. |
401 bool CanLogNotification(); | 401 bool CanLogNotification(); |
402 | 402 |
403 // Sets the value of the specified path in prefs and schedules a save. | 403 // Sets the value of the specified path in prefs and schedules a save. |
404 void RecordBooleanPrefValue(const char* path, bool value); | 404 void RecordBooleanPrefValue(const char* path, bool value); |
405 | 405 |
406 // Returns true if process of type |type| should be counted as a plugin | 406 // Returns true if process of type |type| should be counted as a plugin |
407 // process, and false otherwise. | 407 // process, and false otherwise. |
408 static bool IsPluginProcess(content::ProcessType type); | 408 static bool IsPluginProcess(int process_type); |
409 | 409 |
410 content::ActionCallback action_callback_; | 410 content::ActionCallback action_callback_; |
411 | 411 |
412 content::NotificationRegistrar registrar_; | 412 content::NotificationRegistrar registrar_; |
413 | 413 |
414 // Indicate whether recording and reporting are currently happening. | 414 // Indicate whether recording and reporting are currently happening. |
415 // These should not be set directly, but by calling SetRecording and | 415 // These should not be set directly, but by calling SetRecording and |
416 // SetReporting. | 416 // SetReporting. |
417 bool recording_active_; | 417 bool recording_active_; |
418 bool reporting_active_; | 418 bool reporting_active_; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 friend class extensions::ExtensionDownloader; | 526 friend class extensions::ExtensionDownloader; |
527 friend class extensions::ManifestFetchData; | 527 friend class extensions::ManifestFetchData; |
528 | 528 |
529 // Returns true if prefs::kMetricsReportingEnabled is set. | 529 // Returns true if prefs::kMetricsReportingEnabled is set. |
530 static bool IsMetricsReportingEnabled(); | 530 static bool IsMetricsReportingEnabled(); |
531 | 531 |
532 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 532 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
533 }; | 533 }; |
534 | 534 |
535 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 535 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |