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

Side by Side Diff: content/child/child_histogram_message_filter.cc

Issue 1425533011: Support "shared" histograms between processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shmem-alloc
Patch Set: fixed compile problems on non-Windows builds Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/child_histogram_message_filter.h" 5 #include "content/child/child_histogram_message_filter.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 UploadAllHistograms(sequence_number); 52 UploadAllHistograms(sequence_number);
53 } 53 }
54 54
55 void ChildHistogramMessageFilter::UploadAllHistograms(int sequence_number) { 55 void ChildHistogramMessageFilter::UploadAllHistograms(int sequence_number) {
56 if (!histogram_delta_serialization_) { 56 if (!histogram_delta_serialization_) {
57 histogram_delta_serialization_.reset( 57 histogram_delta_serialization_.reset(
58 new base::HistogramDeltaSerialization("ChildProcess")); 58 new base::HistogramDeltaSerialization("ChildProcess"));
59 } 59 }
60 60
61 std::vector<std::string> deltas; 61 std::vector<std::string> deltas;
62 histogram_delta_serialization_->PrepareAndSerializeDeltas(&deltas); 62 histogram_delta_serialization_->PrepareAndSerializeDeltas(&deltas, false);
63 sender_->Send( 63 sender_->Send(
64 new ChildProcessHostMsg_ChildHistogramData(sequence_number, deltas)); 64 new ChildProcessHostMsg_ChildHistogramData(sequence_number, deltas));
65 65
66 #ifndef NDEBUG 66 #ifndef NDEBUG
67 static int count = 0; 67 static int count = 0;
68 count++; 68 count++;
69 LOCAL_HISTOGRAM_COUNTS("Histogram.ChildProcessHistogramSentCount", count); 69 LOCAL_HISTOGRAM_COUNTS("Histogram.ChildProcessHistogramSentCount", count);
70 #endif 70 #endif
71 } 71 }
72 72
73 } // namespace content 73 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698