| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_FRAME_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_FRAME_METRICS_SERVICE_H_ |
| 9 #define CHROME_FRAME_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_FRAME_METRICS_SERVICE_H_ |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
| 16 #include "base/lock.h" | 16 #include "base/lock.h" |
| 17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
| 18 #include "base/platform_thread.h" | 18 #include "base/platform_thread.h" |
| 19 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
| 20 #include "base/thread_local.h" | 20 #include "base/threading/thread_local.h" |
| 21 #include "chrome/common/metrics_helpers.h" | 21 #include "chrome/common/metrics_helpers.h" |
| 22 | 22 |
| 23 // TODO(ananta) | 23 // TODO(ananta) |
| 24 // Refactor more common code from chrome/browser/metrics/metrics_service.h into | 24 // Refactor more common code from chrome/browser/metrics/metrics_service.h into |
| 25 // the MetricsServiceBase class. | 25 // the MetricsServiceBase class. |
| 26 class MetricsService : public MetricsServiceBase { | 26 class MetricsService : public MetricsServiceBase { |
| 27 public: | 27 public: |
| 28 static MetricsService* GetInstance(); | 28 static MetricsService* GetInstance(); |
| 29 // Start/stop the metrics recording and uploading machine. These should be | 29 // Start/stop the metrics recording and uploading machine. These should be |
| 30 // used on startup and when the user clicks the checkbox in the prefs. | 30 // used on startup and when the user clicks the checkbox in the prefs. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // The transmission timer id returned by SetTimer | 147 // The transmission timer id returned by SetTimer |
| 148 int transmission_timer_id_; | 148 int transmission_timer_id_; |
| 149 | 149 |
| 150 // Used to serialize the Start and Stop operations on the metrics service. | 150 // Used to serialize the Start and Stop operations on the metrics service. |
| 151 static Lock metrics_service_lock_; | 151 static Lock metrics_service_lock_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 153 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 #endif // CHROME_FRAME_METRICS_METRICS_SERVICE_H_ | 156 #endif // CHROME_FRAME_METRICS_SERVICE_H_ |
| OLD | NEW |