| Index: remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| diff --git a/remoting/host/it2me/it2me_native_messaging_host_main.cc b/remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| index 129d7e1818afb2c8fd3d05e102d7cf7b75143418..8bf9a2883ccb10ab6a171e90516fcf6f2533f4ec 100644
|
| --- a/remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| +++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| @@ -40,11 +40,30 @@
|
| #include <commctrl.h>
|
|
|
| #include "remoting/host/switches.h"
|
| -#include "remoting/host/win/elevation_helpers.h"
|
| #endif // defined(OS_WIN)
|
|
|
| namespace remoting {
|
|
|
| +namespace {
|
| +
|
| +#if defined(OS_WIN) && defined(OFFICIAL_BUILD)
|
| +bool CurrentProcessHasUiAccess() {
|
| + HANDLE process_token;
|
| + OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &process_token);
|
| +
|
| + DWORD size;
|
| + DWORD uiaccess_value = 0;
|
| + if (!GetTokenInformation(process_token, TokenUIAccess, &uiaccess_value,
|
| + sizeof(uiaccess_value), &size)) {
|
| + PLOG(ERROR) << "GetTokenInformation() failed";
|
| + }
|
| + CloseHandle(process_token);
|
| + return uiaccess_value != 0;
|
| +}
|
| +#endif // defined(OS_WIN) && defined(OFFICIAL_BUILD)
|
| +
|
| +} // namespace
|
| +
|
| // Creates a It2MeNativeMessagingHost instance, attaches it to stdin/stdout and
|
| // runs the message loop until It2MeNativeMessagingHost signals shutdown.
|
| int It2MeNativeMessagingHostMain(int argc, char** argv) {
|
|
|