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

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: extract common histogram FactoryGet code; extract histogram persistence into seperate files Created 5 years 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 "chrome/common/service_messages.h" 8 #include "chrome/common/service_messages.h"
9 #include "ipc/ipc_logging.h" 9 #include "ipc/ipc_logging.h"
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 return handled; 116 return handled;
117 } 117 }
118 118
119 void ServiceIPCServer::OnGetHistograms() { 119 void ServiceIPCServer::OnGetHistograms() {
120 if (!histogram_delta_serializer_) { 120 if (!histogram_delta_serializer_) {
121 histogram_delta_serializer_.reset( 121 histogram_delta_serializer_.reset(
122 new base::HistogramDeltaSerialization("ServiceProcess")); 122 new base::HistogramDeltaSerialization("ServiceProcess"));
123 } 123 }
124 std::vector<std::string> deltas; 124 std::vector<std::string> deltas;
125 histogram_delta_serializer_->PrepareAndSerializeDeltas(&deltas); 125 histogram_delta_serializer_->PrepareAndSerializeDeltas(&deltas, false);
126 channel_->Send(new ServiceHostMsg_Histograms(deltas)); 126 channel_->Send(new ServiceHostMsg_Histograms(deltas));
127 } 127 }
128 128
129 void ServiceIPCServer::OnShutdown() { 129 void ServiceIPCServer::OnShutdown() {
130 client_->OnShutdown(); 130 client_->OnShutdown();
131 } 131 }
132 132
133 void ServiceIPCServer::OnUpdateAvailable() { 133 void ServiceIPCServer::OnUpdateAvailable() {
134 client_->OnUpdateAvailable(); 134 client_->OnUpdateAvailable();
135 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698