From 46f89e149da3971fcf52b778de939256fae4249a Mon Sep 17 00:00:00 2001 From: "ziadh@chromium.org" Date: Mon, 19 Jul 2010 08:00:42 +0000 Subject: Compress and checksum pending logs that are going to be persisted. Persisted logs now have the following format: [list_size, log1, log2, ..., log_n, checksum]. where each log is bzipped before being written. Upon reading the logs from disk, we verify the data and register whether we faced corruptions or not. r=jar Review URL: http://codereview.chromium.org/2936005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52885 0039d316-1c4b-4281-b951-d872f2087c98 --- base/histogram.cc | 6 +++--- base/histogram.h | 2 +- base/values.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'base') diff --git a/base/histogram.cc b/base/histogram.cc index 4b76160..2206756 100644 --- a/base/histogram.cc +++ b/base/histogram.cc @@ -589,9 +589,9 @@ scoped_refptr LinearHistogram::FactoryGet( return histogram; } -scoped_refptr LinearHistogram::FactoryGet(const std::string& name, - base::TimeDelta minimum, base::TimeDelta maximum, size_t bucket_count, - Flags flags) { +scoped_refptr LinearHistogram::FactoryTimeGet( + const std::string& name, base::TimeDelta minimum, base::TimeDelta maximum, + size_t bucket_count, Flags flags) { return FactoryGet(name, minimum.InMilliseconds(), maximum.InMilliseconds(), bucket_count, flags); } diff --git a/base/histogram.h b/base/histogram.h index ac97a67..b745026 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -497,7 +497,7 @@ class LinearHistogram : public Histogram { default underflow bucket. */ static scoped_refptr FactoryGet(const std::string& name, Sample minimum, Sample maximum, size_t bucket_count, Flags flags); - static scoped_refptr FactoryGet(const std::string& name, + static scoped_refptr FactoryTimeGet(const std::string& name, base::TimeDelta minimum, base::TimeDelta maximum, size_t bucket_count, Flags flags); diff --git a/base/values.cc b/base/values.cc index 58a91f1..eebd7eb 100644 --- a/base/values.cc +++ b/base/values.cc @@ -876,7 +876,7 @@ void ListValue::Append(Value* in_value) { bool ListValue::AppendIfNotPresent(Value* in_value) { DCHECK(in_value); - for (ValueVector::iterator i(list_.begin()); i != list_.end(); ++i) { + for (ValueVector::const_iterator i(list_.begin()); i != list_.end(); ++i) { if ((*i)->Equals(in_value)) return false; } -- cgit v1.1