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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 431343002: Experimentally isolate OpenItemViaShell in a utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 months 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
« no previous file with comments | « chrome/utility/shell_handler_win.cc ('k') | content/public/browser/utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/utility_process_host_impl.cc
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 1a1b94273cb309f56f6c0af690232ed2cc07410d..16a42d6a30dd14d3fa81835af23ca3e75b287e51 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -268,15 +268,23 @@ bool UtilityProcessHostImpl::StartProcess() {
}
bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
+ if (!client_)
+ return true;
+
client_task_runner_->PostTask(
FROM_HERE,
- base::Bind(base::IgnoreResult(
- &UtilityProcessHostClient::OnMessageReceived), client_.get(),
+ base::Bind(
+ base::IgnoreResult(&UtilityProcessHostClient::OnMessageReceived),
+ client_.get(),
message));
+
return true;
}
void UtilityProcessHostImpl::OnProcessLaunchFailed() {
+ if (!client_)
+ return;
+
client_task_runner_->PostTask(
FROM_HERE,
base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
@@ -284,6 +292,9 @@ void UtilityProcessHostImpl::OnProcessLaunchFailed() {
}
void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
+ if (!client_)
+ return;
+
client_task_runner_->PostTask(
FROM_HERE,
base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(),
« no previous file with comments | « chrome/utility/shell_handler_win.cc ('k') | content/public/browser/utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698