Chromium Code Reviews| Index: chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc |
| diff --git a/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc b/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc |
| index cfc709f8ae6837775ea0649560f6e2ac2e1b10a4..8825299433305eee6f18fbdbf960da29552ce592 100644 |
| --- a/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc |
| +++ b/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc |
| @@ -58,14 +58,15 @@ void SandboxedDMGAnalyzer::OpenDMGFile() { |
| void SandboxedDMGAnalyzer::StartAnalysis() { |
| DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| - utility_process_host_ = |
| + content::UtilityProcessHost* utility_process_host_ = |
|
Scott Hess - ex-Googler
2016/04/13 23:50:41
Also here.
Anand Mistry (off Chromium)
2016/04/14 00:00:07
Done.
|
| content::UtilityProcessHost::Create(this, |
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)) |
| - ->AsWeakPtr(); |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| utility_process_host_->SetName(l10n_util::GetStringUTF16( |
| IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME)); |
| - utility_process_host_->Send(new ChromeUtilityMsg_StartupPing); |
| + utility_process_host_->Send( |
| + new ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection( |
| + IPC::TakePlatformFileForTransit(std::move(file_)))); |
| } |
| void SandboxedDMGAnalyzer::OnProcessCrashed(int exit_code) { |
| @@ -79,8 +80,6 @@ void SandboxedDMGAnalyzer::OnProcessLaunchFailed() { |
| bool SandboxedDMGAnalyzer::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(SandboxedDMGAnalyzer, message) |
| - IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted, |
| - OnUtilityProcessStarted) |
| IPC_MESSAGE_HANDLER( |
| ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished, |
| OnAnalysisFinished) |
| @@ -89,13 +88,6 @@ bool SandboxedDMGAnalyzer::OnMessageReceived(const IPC::Message& message) { |
| return handled; |
| } |
| -void SandboxedDMGAnalyzer::OnUtilityProcessStarted() { |
| - DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| - utility_process_host_->Send( |
| - new ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection( |
| - IPC::TakePlatformFileForTransit(std::move(file_)))); |
| -} |
| - |
| void SandboxedDMGAnalyzer::OnAnalysisFinished( |
| const zip_analyzer::Results& results) { |
| DCHECK_CURRENTLY_ON(BrowserThread::IO); |