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

Unified Diff: ceee/ie/broker/broker_rpc_client.cc

Issue 6295006: Merge 68951 - Added refreshing of elevation policy on first run of new versio... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ceee/ie/broker/broker_rpc_client.h ('k') | ceee/ie/common/ceee_module_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/broker/broker_rpc_client.cc
===================================================================
--- ceee/ie/broker/broker_rpc_client.cc (revision 71509)
+++ ceee/ie/broker/broker_rpc_client.cc (working copy)
@@ -7,15 +7,22 @@
#include "ceee/ie/broker/broker_rpc_client.h"
#include <atlbase.h>
+
#include "base/lock.h"
#include "base/logging.h"
#include "base/win/scoped_comptr.h"
-#include "broker_lib.h" // NOLINT
-#include "broker_rpc_lib.h" // NOLINT
#include "ceee/common/com_utils.h"
#include "ceee/ie/broker/broker_rpc_utils.h"
+#include "ceee/ie/common/ceee_module_util.h"
-BrokerRpcClient::BrokerRpcClient() : context_(0), binding_handle_(NULL) {
+#include "broker_lib.h" // NOLINT
+#include "broker_rpc_lib.h" // NOLINT
+
+namespace {
+
+// Avoid using objects requiring unwind in functions that use __try.
+void LogRpcException(const char* str, unsigned int exception_code) {
+ LOG(ERROR) << str << com::LogWe(exception_code);
}
BrokerRpcClient::~BrokerRpcClient() {
@@ -58,6 +65,10 @@
} RpcEndExcept
}
+HRESULT BrokerRpcClient::StartServer(ICeeeBrokerRegistrar** server) {
+ return StartCeeeBroker(server);
+}
+
HRESULT BrokerRpcClient::Connect(bool start_server) {
if (is_connected())
return S_OK;
@@ -161,3 +172,17 @@
return RPC_E_FAULT;
} RpcEndExcept
}
+
+HRESULT StartCeeeBroker(ICeeeBrokerRegistrar** broker) {
+ ceee_module_util::RefreshElevationPolicyIfNeeded();
+ base::win::ScopedComPtr<ICeeeBrokerRegistrar> broker_tmp;
+ // TODO(vitalybuka@google.com): Start broker without COM after the last
+ // COM interface is removed.
+ HRESULT hr = broker_tmp.CreateInstance(CLSID_CeeeBroker);
+ if (FAILED(hr)) {
+ LOG(ERROR) << "Failed to create broker. " << com::LogHr(hr);
+ return hr;
+ }
+ *broker = broker_tmp.Detach();
+ return S_OK;
+}
« no previous file with comments | « ceee/ie/broker/broker_rpc_client.h ('k') | ceee/ie/common/ceee_module_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698