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

Unified Diff: chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc

Issue 1885813002: Delete the utility process startup ping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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
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..48abce9ce3a27151e9220156701baac5ad760324 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 =
content::UtilityProcessHost::Create(this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))
- ->AsWeakPtr();
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
- utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ 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);
« no previous file with comments | « chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h ('k') | chrome/browser/safe_browsing/sandboxed_zip_analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698