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

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

Issue 4508002: COM replaced with RPC for firing events in broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
Index: ceee/ie/broker/broker_rpc_utils.cc
===================================================================
--- ceee/ie/broker/broker_rpc_utils.cc (revision 0)
+++ ceee/ie/broker/broker_rpc_utils.cc (revision 0)
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Utilities shared by both Broker RPC client and server.
+
+#include "ceee/ie/broker/broker_rpc_utils.h"
+
+#include "base/win_util.h"
+#include "ceee/common/process_utils_win.h"
+
+const wchar_t kRpcProtocol[] = L"ncalrpc";
Sigurður Ásgeirsson 2010/11/11 19:30:35 a quick one-line comment on ncalrpc (this is machi
Vitaly Buka corp 2010/11/11 23:12:10 Done.
Vitaly Buka corp 2010/11/11 23:12:10 Done.
+
+std::wstring GetRpcEndPointAddress() {
+ std::wstring end_point;
+ bool running_as_admin = false;
+ process_utils_win::IsCurrentProcessUacElevated(&running_as_admin);
Sigurður Ásgeirsson 2010/11/11 19:30:35 a quick comment on how and maybe why we construct
Vitaly Buka corp 2010/11/11 23:12:10 Done.
+ if (running_as_admin)
+ end_point += L"ADMIN";
+ std::wstring sid;
+ win_util::GetUserSidString(&sid);
+ end_point += sid;
+ end_point += L"B4630D08-4621-41A1-A8D0-F1E98DA460D6";
+
+ // TODO(vitalybuka@google.com): Find proof link why endpoint size is limited.
+ end_point.resize(std::min(52u, end_point.size()));
+ return end_point;
+}
+
+void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) {
+ return malloc(len);
+}
+
+void __RPC_USER midl_user_free(void __RPC_FAR * ptr) {
+ free(ptr);
+}
Property changes on: ceee\ie\broker\broker_rpc_utils.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698