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

Unified Diff: chrome/browser/metrics/metrics_log_serializer.h

Issue 26646003: MetricsService: Send a hash of the UMA log in a header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698