Index: chrome/browser/metrics/metrics_log_serializer.h |
=================================================================== |
--- chrome/browser/metrics/metrics_log_serializer.h (revision 229433) |
+++ chrome/browser/metrics/metrics_log_serializer.h (working copy) |
@@ -5,6 +5,8 @@ |
#ifndef CHROME_BROWSER_METRICS_METRICS_LOG_SERIALIZER_H_ |
#define CHROME_BROWSER_METRICS_METRICS_LOG_SERIALIZER_H_ |
+#include <vector> |
+ |
#include "base/basictypes.h" |
#include "base/gtest_prod_util.h" |
#include "chrome/common/metrics/metrics_log_manager.h" |
@@ -38,10 +40,12 @@ |
virtual ~MetricsLogSerializer(); |
// Implementation of MetricsLogManager::LogSerializer |
- virtual void SerializeLogs(const std::vector<std::string>& logs, |
- MetricsLogManager::LogType log_type) OVERRIDE; |
- virtual void DeserializeLogs(MetricsLogManager::LogType log_type, |
- std::vector<std::string>* logs) OVERRIDE; |
+ virtual void SerializeLogs( |
+ const std::vector<MetricsLogManager::SerializedLog>& logs, |
+ MetricsLogManager::LogType log_type) OVERRIDE; |
+ virtual void DeserializeLogs( |
+ MetricsLogManager::LogType log_type, |
+ std::vector<MetricsLogManager::SerializedLog>* logs) OVERRIDE; |
private: |
// Encodes the textual log data from |local_list| and writes it to the given |
@@ -49,16 +53,17 @@ |
// with the most recent, and working backward until at least |
// |list_length_limit| logs and |byte_limit| bytes of logs have been |
// stored. At least one of those two arguments must be non-zero. |
- static void WriteLogsToPrefList(const std::vector<std::string>& local_list, |
- size_t list_length_limit, |
- size_t byte_limit, |
- base::ListValue* list); |
+ static void WriteLogsToPrefList( |
+ const std::vector<MetricsLogManager::SerializedLog>& local_list, |
+ size_t list_length_limit, |
+ size_t byte_limit, |
+ base::ListValue* list); |
// Decodes and verifies the textual log data from |list|, populating |
// |local_list| and returning a status code. |
static LogReadStatus ReadLogsFromPrefList( |
const base::ListValue& list, |
- std::vector<std::string>* local_list); |
+ std::vector<MetricsLogManager::SerializedLog>* local_list); |
FRIEND_TEST_ALL_PREFIXES(MetricsLogSerializerTest, EmptyLogList); |
FRIEND_TEST_ALL_PREFIXES(MetricsLogSerializerTest, SingleElementLogList); |