summaryrefslogtreecommitdiffstats
path: root/chrome/utility
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 17:48:50 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 17:50:26 +0000
commitb62c08cace68650fe8bb8ac398fa17535c17c55e (patch)
treecaa53ec8bc32105e5e89a1b9cbeddc9714da5bb6 /chrome/utility
parent2bb3ea82ec57a7e44cddb3b596d23aa934920df2 (diff)
downloadchromium_src-b62c08cace68650fe8bb8ac398fa17535c17c55e.zip
chromium_src-b62c08cace68650fe8bb8ac398fa17535c17c55e.tar.gz
chromium_src-b62c08cace68650fe8bb8ac398fa17535c17c55e.tar.bz2
Experimentally isolate OpenItemViaShell in a utility process.
Shell operations may cause 3rd-party shell extensions to be loaded into the calling process. Isolating them in a utility process protects the browser process from potential instability. BUG=73098 Review URL: https://codereview.chromium.org/431343002 Cr-Commit-Position: refs/heads/master@{#291128} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r--chrome/utility/shell_handler_win.cc7
-rw-r--r--chrome/utility/shell_handler_win.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/utility/shell_handler_win.cc b/chrome/utility/shell_handler_win.cc
index 7337f9a..9edd042 100644
--- a/chrome/utility/shell_handler_win.cc
+++ b/chrome/utility/shell_handler_win.cc
@@ -11,6 +11,7 @@
#include "chrome/common/chrome_utility_messages.h"
#include "content/public/utility/utility_thread.h"
#include "ui/base/win/open_file_name_win.h"
+#include "ui/base/win/shell.h"
ShellHandler::ShellHandler() {}
ShellHandler::~ShellHandler() {}
@@ -18,6 +19,8 @@ ShellHandler::~ShellHandler() {}
bool ShellHandler::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ShellHandler, message)
+ IPC_MESSAGE_HANDLER(ChromeUtilityMsg_OpenItemViaShell,
+ OnOpenItemViaShell)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_GetOpenFileName,
OnGetOpenFileName)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -25,6 +28,10 @@ bool ShellHandler::OnMessageReceived(const IPC::Message& message) {
return handled;
}
+void ShellHandler::OnOpenItemViaShell(const base::FilePath& full_path) {
+ ui::win::OpenItemViaShell(full_path);
+}
+
void ShellHandler::OnGetOpenFileName(
HWND owner,
DWORD flags,
diff --git a/chrome/utility/shell_handler_win.h b/chrome/utility/shell_handler_win.h
index f91124c..10ffe72 100644
--- a/chrome/utility/shell_handler_win.h
+++ b/chrome/utility/shell_handler_win.h
@@ -34,6 +34,7 @@ class ShellHandler : public UtilityMessageHandler {
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
+ void OnOpenItemViaShell(const base::FilePath& full_path);
void OnGetOpenFileName(
HWND owner,
DWORD flags,