Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome_frame/metrics_service.h

Issue 10829466: SampleSet -> HistogramSamples (will be reused by SparseHistogram) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_FRAME_METRICS_SERVICE_H_ 8 #ifndef CHROME_FRAME_METRICS_SERVICE_H_
9 #define CHROME_FRAME_METRICS_SERVICE_H_ 9 #define CHROME_FRAME_METRICS_SERVICE_H_
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 MetricsService(); 43 MetricsService();
44 virtual ~MetricsService(); 44 virtual ~MetricsService();
45 // The MetricsService has a lifecycle that is stored as a state. 45 // The MetricsService has a lifecycle that is stored as a state.
46 // See metrics_service.cc for description of this lifecycle. 46 // See metrics_service.cc for description of this lifecycle.
47 enum State { 47 enum State {
48 INITIALIZED, // Constructor was called. 48 INITIALIZED, // Constructor was called.
49 ACTIVE, // Accumalating log data 49 ACTIVE, // Accumalating log data
50 STOPPED, // Service has stopped 50 STOPPED, // Service has stopped
51 }; 51 };
52 52
53 // Maintain a map of histogram names to the sample stats we've sent.
54 typedef std::map<std::string, base::Histogram::SampleSet> LoggedSampleMap;
55
56 // Sets and gets whether metrics recording is active. 53 // Sets and gets whether metrics recording is active.
57 // SetRecording(false) also forces a persistent save of logging state (if 54 // SetRecording(false) also forces a persistent save of logging state (if
58 // anything has been recorded, or transmitted). 55 // anything has been recorded, or transmitted).
59 void SetRecording(bool enabled); 56 void SetRecording(bool enabled);
60 57
61 // Enable/disable transmission of accumulated logs and crash reports (dumps). 58 // Enable/disable transmission of accumulated logs and crash reports (dumps).
62 // Return value "true" indicates setting was definitively set as requested). 59 // Return value "true" indicates setting was definitively set as requested).
63 // Return value of "false" indicates that the enable state is effectively 60 // Return value of "false" indicates that the enable state is effectively
64 // stuck in the other logical setting. 61 // stuck in the other logical setting.
65 // Google Update maintains the authoritative preference in the registry, so 62 // Google Update maintains the authoritative preference in the registry, so
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // The transmission timer id returned by SetTimer 142 // The transmission timer id returned by SetTimer
146 int transmission_timer_id_; 143 int transmission_timer_id_;
147 144
148 // Used to serialize the Start and Stop operations on the metrics service. 145 // Used to serialize the Start and Stop operations on the metrics service.
149 static base::Lock metrics_service_lock_; 146 static base::Lock metrics_service_lock_;
150 147
151 DISALLOW_COPY_AND_ASSIGN(MetricsService); 148 DISALLOW_COPY_AND_ASSIGN(MetricsService);
152 }; 149 };
153 150
154 #endif // CHROME_FRAME_METRICS_SERVICE_H_ 151 #endif // CHROME_FRAME_METRICS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698