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..2604cec705e796cb1462c26a4da593f76d50974f 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_EffectiveUser, OnEffectiveUser) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -162,4 +167,12 @@ void UtilityThreadImpl::OnLoadPlugins( |
} |
#endif |
+void UtilityThreadImpl::OnEffectiveUser() { |
+ if (IsUserAnAdmin()) { |
+ Send(new UtilityHostMsg_EffectiveUser(0)); |
+ } else { |
+ Send(new UtilityHostMsg_EffectiveUser(1337)); |
+ } |
+} |
+ |
} // namespace content |