Index: chrome/common/metrics_helpers.h |
=================================================================== |
--- chrome/common/metrics_helpers.h (revision 49384) |
+++ chrome/common/metrics_helpers.h (working copy) |
@@ -77,6 +77,10 @@ |
int num_events() { return num_events_; } |
+ void set_hardware_class(const std::string& hardware_class) { |
+ hardware_class_ = hardware_class; |
+ } |
+ |
// Creates an MD5 hash of the given value, and returns hash as a byte |
// buffer encoded as a std::string. |
static std::string CreateHash(const std::string& value); |
@@ -131,6 +135,11 @@ |
static const char* WindowEventTypeToString(WindowEventType type); |
+ // Frees the resources allocated by the XML document writer: the |
+ // main writer object as well as the XML tree structure, if |
+ // applicable. |
+ void FreeDocWriter(); |
+ |
// Convenience versions of xmlWriter functions |
void StartElement(const char* name); |
void EndElement(); |
@@ -149,12 +158,14 @@ |
std::string client_id_; |
std::string session_id_; |
+ std::string hardware_class_; |
// locked_ is true when record has been packed up for sending, and should |
// no longer be written to. It is only used for sanity checking and is |
// not a real lock. |
bool locked_; |
+ xmlDocPtr doc_; |
xmlBufferPtr buffer_; |
xmlTextWriterPtr writer_; |
int num_events_; // the number of events recorded in this log |