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

Side by Side Diff: ceee/ie/broker/broker_rpc_server.cc

Issue 5481002: Ensure that just started broker doesn't get events addressed to dead instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « ceee/ie/broker/broker_rpc_lib.idl ('k') | ceee/ie/broker/broker_rpc_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Broker RPC Server implementation. 5 // Broker RPC Server implementation.
6 6
7 #include "ceee/ie/broker/broker_rpc_server.h" 7 #include "ceee/ie/broker/broker_rpc_server.h"
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 // Called when client process terminated without releasing context handle. 122 // Called when client process terminated without releasing context handle.
123 void __RPC_USER BrokerContextHandle_rundown(BrokerContextHandle context) { 123 void __RPC_USER BrokerContextHandle_rundown(BrokerContextHandle context) {
124 DCHECK(context != NULL); 124 DCHECK(context != NULL);
125 ceee_module_util::UnlockModule(); 125 ceee_module_util::UnlockModule();
126 } 126 }
127 127
128 void BrokerRpcServer_FireEvent( 128 void BrokerRpcServer_FireEvent(
129 handle_t binding_handle, 129 handle_t binding_handle,
130 BrokerContextHandle context,
130 const char* event_name, 131 const char* event_name,
131 const char* event_args) { 132 const char* event_args) {
132 DCHECK(ChromePostman::GetInstance()); 133 DCHECK(ChromePostman::GetInstance());
133 if (ChromePostman::GetInstance()) 134 if (ChromePostman::GetInstance())
134 ChromePostman::GetInstance()->FireEvent(event_name, event_args); 135 ChromePostman::GetInstance()->FireEvent(event_name, event_args);
135 } 136 }
136 137
137 void BrokerRpcServer_SendUmaHistogramTimes(handle_t binding_handle, 138 void BrokerRpcServer_SendUmaHistogramTimes(handle_t binding_handle,
138 const char* name, 139 const char* name,
139 int sample) { 140 int sample) {
(...skipping 18 matching lines...) Expand all
158 // We can't unfortunately use the HISTOGRAM_*_COUNT here because they use 159 // We can't unfortunately use the HISTOGRAM_*_COUNT here because they use
159 // static variables to save time. 160 // static variables to save time.
160 AutoLock lock(g_metrics_lock); 161 AutoLock lock(g_metrics_lock);
161 scoped_refptr<base::Histogram> counter = 162 scoped_refptr<base::Histogram> counter =
162 base::Histogram::FactoryGet(name, min, max, bucket_count, 163 base::Histogram::FactoryGet(name, min, max, bucket_count,
163 base::Histogram::kUmaTargetedHistogramFlag); 164 base::Histogram::kUmaTargetedHistogramFlag);
164 DCHECK_EQ(name, counter->histogram_name()); 165 DCHECK_EQ(name, counter->histogram_name());
165 if (counter.get()) 166 if (counter.get())
166 counter->AddTime(base::TimeDelta::FromMilliseconds(sample)); 167 counter->AddTime(base::TimeDelta::FromMilliseconds(sample));
167 } 168 }
OLDNEW
« no previous file with comments | « ceee/ie/broker/broker_rpc_lib.idl ('k') | ceee/ie/broker/broker_rpc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698