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

Unified Diff: content/utility/utility_thread_impl.cc

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually works now. Removes unnecessary logging. Created 7 years 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: 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
« content/utility/utility_thread_impl.h ('K') | « content/utility/utility_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698