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 set of user experience metrics data recorded by | 5 // This file defines a set of user experience metrics data recorded by |
6 // the MetricsService. This is the unit of data that is sent to the server. | 6 // the MetricsService. This is the unit of data that is sent to the server. |
7 | 7 |
8 #ifndef CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 8 #ifndef CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ |
9 #define CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 9 #define CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // origin - what kind of action initiated the load | 65 // origin - what kind of action initiated the load |
66 // load_time - how long it took to load the page | 66 // load_time - how long it took to load the page |
67 void RecordLoadEvent(int window_id, | 67 void RecordLoadEvent(int window_id, |
68 const GURL& url, | 68 const GURL& url, |
69 content::PageTransition origin, | 69 content::PageTransition origin, |
70 int session_index, | 70 int session_index, |
71 base::TimeDelta load_time); | 71 base::TimeDelta load_time); |
72 | 72 |
73 // Record any changes in a given histogram for transmission. | 73 // Record any changes in a given histogram for transmission. |
74 void RecordHistogramDelta(const base::Histogram& histogram, | 74 void RecordHistogramDelta(const base::Histogram& histogram, |
75 const base::Histogram::SampleSet& snapshot); | 75 const base::HistogramSamples& snapshot); |
76 | 76 |
77 // Stop writing to this record and generate the encoded representation. | 77 // Stop writing to this record and generate the encoded representation. |
78 // None of the Record* methods can be called after this is called. | 78 // None of the Record* methods can be called after this is called. |
79 void CloseLog(); | 79 void CloseLog(); |
80 | 80 |
81 // These methods allow retrieval of the encoded representation of the | 81 // These methods allow retrieval of the encoded representation of the |
82 // record. They can only be called after CloseLog() has been called. | 82 // record. They can only be called after CloseLog() has been called. |
83 // GetEncodedLog returns false if buffer_size is less than | 83 // GetEncodedLog returns false if buffer_size is less than |
84 // GetEncodedLogSize(); | 84 // GetEncodedLogSize(); |
85 int GetEncodedLogSizeXml(); | 85 int GetEncodedLogSizeXml(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // Isolated to limit the dependency on the XML library for our consumers. | 173 // Isolated to limit the dependency on the XML library for our consumers. |
174 XmlWrapper* xml_wrapper_; | 174 XmlWrapper* xml_wrapper_; |
175 | 175 |
176 // Stores the protocol buffer representation for this log. | 176 // Stores the protocol buffer representation for this log. |
177 metrics::ChromeUserMetricsExtension uma_proto_; | 177 metrics::ChromeUserMetricsExtension uma_proto_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); | 179 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); |
180 }; | 180 }; |
181 | 181 |
182 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 182 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ |
OLD | NEW |