Index: content/utility/utility_thread_impl.cc |
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc |
index ca03da4098122c1486967ddd8aa3882f35016dae..2b33871baa161cc7c4384bdab1daf21c7c8e5299 100644 |
--- a/content/utility/utility_thread_impl.cc |
+++ b/content/utility/utility_thread_impl.cc |
@@ -25,6 +25,10 @@ |
#include "ui/gfx/gtk_util.h" |
#endif |
+#if defined(OS_WIN) |
+#include <Shlobj.h> |
+#endif |
+ |
namespace content { |
namespace { |
@@ -114,6 +118,7 @@ bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { |
#if defined(OS_POSIX) |
IPC_MESSAGE_HANDLER(UtilityMsg_LoadPlugins, OnLoadPlugins) |
#endif // OS_POSIX |
+ IPC_MESSAGE_HANDLER(UtilityMsg_IsElevated, OnIsElevated) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -162,4 +167,12 @@ void UtilityThreadImpl::OnLoadPlugins( |
} |
#endif |
+void UtilityThreadImpl::OnIsElevated() { |
+ if (IsUserAnAdmin()) { |
+ Send(new UtilityHostMsg_IsElevated(true)); |
+ } else { |
+ Send(new UtilityHostMsg_IsElevated(false)); |
+ } |
+} |
+ |
} // namespace content |