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

Side by Side Diff: chrome/service/service_ipc_server.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 "chrome/service/service_ipc_server.h" 5 #include "chrome/service/service_ipc_server.h"
6 6
7 #include "base/metrics/histogram_delta_serialization.h" 7 #include "base/metrics/histogram_delta_serialization.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/common/service_messages.h" 9 #include "chrome/common/service_messages.h"
10 #include "ipc/ipc_logging.h" 10 #include "ipc/ipc_logging.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 return handled; 117 return handled;
118 } 118 }
119 119
120 void ServiceIPCServer::OnGetHistograms() { 120 void ServiceIPCServer::OnGetHistograms() {
121 if (!histogram_delta_serializer_) { 121 if (!histogram_delta_serializer_) {
122 histogram_delta_serializer_.reset( 122 histogram_delta_serializer_.reset(
123 new base::HistogramDeltaSerialization("ServiceProcess")); 123 new base::HistogramDeltaSerialization("ServiceProcess"));
124 } 124 }
125 std::vector<std::string> deltas; 125 std::vector<std::string> deltas;
126 histogram_delta_serializer_->PrepareAndSerializeDeltas(&deltas); 126 // "false" to SPerpareAndSerializeDeltas() indicates to *not* include
Alexei Svitkine (slow) 2016/01/22 16:15:16 Nit: SPerpareAndSerializeDeltas() -> PerpareAndSer
bcwhite 2016/01/22 17:17:48 Done.
127 // histograms held in persistent storage on the assumption that they will be
128 // visible to the recipient through other means.
129 histogram_delta_serializer_->PrepareAndSerializeDeltas(&deltas, false);
127 channel_->Send(new ServiceHostMsg_Histograms(deltas)); 130 channel_->Send(new ServiceHostMsg_Histograms(deltas));
128 } 131 }
129 132
130 void ServiceIPCServer::OnShutdown() { 133 void ServiceIPCServer::OnShutdown() {
131 client_->OnShutdown(); 134 client_->OnShutdown();
132 } 135 }
133 136
134 void ServiceIPCServer::OnUpdateAvailable() { 137 void ServiceIPCServer::OnUpdateAvailable() {
135 client_->OnUpdateAvailable(); 138 client_->OnUpdateAvailable();
136 } 139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698