OLD | NEW |
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 Client implementation. | 5 // Broker RPC Client implementation. |
6 | 6 |
7 #include "ceee/ie/broker/broker_rpc_client.h" | 7 #include "ceee/ie/broker/broker_rpc_client.h" |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include "base/lock.h" | 10 #include "base/lock.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (binding_handle_ != NULL) { | 121 if (binding_handle_ != NULL) { |
122 RPC_STATUS status = ::RpcBindingFree(&binding_handle_); | 122 RPC_STATUS status = ::RpcBindingFree(&binding_handle_); |
123 LOG_IF(WARNING, RPC_S_OK != status) << | 123 LOG_IF(WARNING, RPC_S_OK != status) << |
124 "Failed to unbind. RPC_STATUS=0x" << com::LogWe(status); | 124 "Failed to unbind. RPC_STATUS=0x" << com::LogWe(status); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 HRESULT BrokerRpcClient::FireEvent(const char* event_name, | 128 HRESULT BrokerRpcClient::FireEvent(const char* event_name, |
129 const char* event_args) { | 129 const char* event_args) { |
130 RpcTryExcept { | 130 RpcTryExcept { |
131 BrokerRpcClient_FireEvent(binding_handle_, event_name, event_args); | 131 BrokerRpcClient_FireEvent(binding_handle_, context_, event_name, |
| 132 event_args); |
132 return S_OK; | 133 return S_OK; |
133 } RpcExcept(HandleRpcException(RpcExceptionCode())) { | 134 } RpcExcept(HandleRpcException(RpcExceptionCode())) { |
134 LogRpcException("RPC error in FireEvent", RpcExceptionCode()); | 135 LogRpcException("RPC error in FireEvent", RpcExceptionCode()); |
135 return RPC_E_FAULT; | 136 return RPC_E_FAULT; |
136 } RpcEndExcept | 137 } RpcEndExcept |
137 } | 138 } |
138 | 139 |
139 HRESULT BrokerRpcClient::SendUmaHistogramTimes(const char* name, int sample) { | 140 HRESULT BrokerRpcClient::SendUmaHistogramTimes(const char* name, int sample) { |
140 RpcTryExcept { | 141 RpcTryExcept { |
141 BrokerRpcClient_SendUmaHistogramTimes(binding_handle_, name, sample); | 142 BrokerRpcClient_SendUmaHistogramTimes(binding_handle_, name, sample); |
(...skipping 11 matching lines...) Expand all Loading... |
153 int bucket_count) { | 154 int bucket_count) { |
154 RpcTryExcept { | 155 RpcTryExcept { |
155 BrokerRpcClient_SendUmaHistogramData( | 156 BrokerRpcClient_SendUmaHistogramData( |
156 binding_handle_, name, sample, min, max, bucket_count); | 157 binding_handle_, name, sample, min, max, bucket_count); |
157 return S_OK; | 158 return S_OK; |
158 } RpcExcept(HandleRpcException(RpcExceptionCode())) { | 159 } RpcExcept(HandleRpcException(RpcExceptionCode())) { |
159 LogRpcException("RPC error in SendUmaHistogramData", RpcExceptionCode()); | 160 LogRpcException("RPC error in SendUmaHistogramData", RpcExceptionCode()); |
160 return RPC_E_FAULT; | 161 return RPC_E_FAULT; |
161 } RpcEndExcept | 162 } RpcEndExcept |
162 } | 163 } |
OLD | NEW |