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

Unified Diff: content/browser/histogram_synchronizer.cc

Issue 27460003: Consolidate serialization code in base::HistogramDeltasSerializer. (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 | « base/metrics/statistics_recorder.h ('k') | content/child/child_histogram_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/histogram_synchronizer.cc
diff --git a/content/browser/histogram_synchronizer.cc b/content/browser/histogram_synchronizer.cc
index 5a1e6f9a413f17f72197dadd79d6c27de6947107..166172376ccf287605f4682feabe0423e2409d78 100644
--- a/content/browser/histogram_synchronizer.cc
+++ b/content/browser/histogram_synchronizer.cc
@@ -8,6 +8,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/histogram_delta_serialization.h"
#include "base/pickle.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
@@ -268,16 +269,10 @@ void HistogramSynchronizer::OnHistogramDataCollected(
const std::vector<std::string>& pickled_histograms) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- RequestContext* request = RequestContext::GetRequestContext(sequence_number);
-
- for (std::vector<std::string>::const_iterator it = pickled_histograms.begin();
- it < pickled_histograms.end();
- ++it) {
- Pickle pickle(it->data(), it->size());
- PickleIterator iter(pickle);
- base::DeserializeHistogramAndAddSamples(&iter);
- }
+ base::HistogramDeltaSerialization::DeserializeAndAddSamples(
+ pickled_histograms);
+ RequestContext* request = RequestContext::GetRequestContext(sequence_number);
if (!request)
return;
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | content/child/child_histogram_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698