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

Side by Side Diff: chrome/common/metrics/metrics_log_base.h

Issue 11682003: Serialize/Deserialize support in HistogramBase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another friend change Created 7 years, 11 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
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | chrome/common/metrics/metrics_log_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // url - which URL was loaded 68 // url - which URL was loaded
69 // origin - what kind of action initiated the load 69 // origin - what kind of action initiated the load
70 // load_time - how long it took to load the page 70 // load_time - how long it took to load the page
71 void RecordLoadEvent(int window_id, 71 void RecordLoadEvent(int window_id,
72 const GURL& url, 72 const GURL& url,
73 content::PageTransition origin, 73 content::PageTransition origin,
74 int session_index, 74 int session_index,
75 base::TimeDelta load_time); 75 base::TimeDelta load_time);
76 76
77 // Record any changes in a given histogram for transmission. 77 // Record any changes in a given histogram for transmission.
78 void RecordHistogramDelta(const base::Histogram& histogram, 78 void RecordHistogramDelta(const std::string& histogram_name,
79 const base::HistogramSamples& snapshot); 79 const base::HistogramSamples& snapshot);
80 80
81 // Stop writing to this record and generate the encoded representation. 81 // Stop writing to this record and generate the encoded representation.
82 // None of the Record* methods can be called after this is called. 82 // None of the Record* methods can be called after this is called.
83 void CloseLog(); 83 void CloseLog();
84 84
85 // These methods allow retrieval of the encoded representation of the 85 // These methods allow retrieval of the encoded representation of the
86 // record. They can only be called after CloseLog() has been called. 86 // record. They can only be called after CloseLog() has been called.
87 // GetEncodedLog returns false if buffer_size is less than 87 // GetEncodedLog returns false if buffer_size is less than
88 // GetEncodedLogSize(); 88 // GetEncodedLogSize();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Isolated to limit the dependency on the XML library for our consumers. 177 // Isolated to limit the dependency on the XML library for our consumers.
178 XmlWrapper* xml_wrapper_; 178 XmlWrapper* xml_wrapper_;
179 179
180 // Stores the protocol buffer representation for this log. 180 // Stores the protocol buffer representation for this log.
181 metrics::ChromeUserMetricsExtension uma_proto_; 181 metrics::ChromeUserMetricsExtension uma_proto_;
182 182
183 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); 183 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase);
184 }; 184 };
185 185
186 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ 186 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_
OLDNEW
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | chrome/common/metrics/metrics_log_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698