diff options
Diffstat (limited to 'chrome/utility/chrome_content_utility_client.cc')
-rw-r--r-- | chrome/utility/chrome_content_utility_client.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 440ff96..3d09c61 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc @@ -59,6 +59,10 @@ #include "chrome/utility/local_discovery/service_discovery_message_handler.h" #endif +#if defined(OS_MACOSX) && defined(FULL_SAFE_BROWSING) +#include "chrome/utility/safe_browsing/mac/dmg_analyzer.h" +#endif + namespace { bool Send(IPC::Message* message) { @@ -192,6 +196,10 @@ bool ChromeContentUtilityClient::OnMessageReceived( #if defined(FULL_SAFE_BROWSING) IPC_MESSAGE_HANDLER(ChromeUtilityMsg_AnalyzeZipFileForDownloadProtection, OnAnalyzeZipFileForDownloadProtection) +#if defined(OS_MACOSX) + IPC_MESSAGE_HANDLER(ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection, + OnAnalyzeDmgFileForDownloadProtection) +#endif #endif #if defined(ENABLE_EXTENSIONS) IPC_MESSAGE_HANDLER(ChromeUtilityMsg_ParseMediaMetadata, @@ -396,6 +404,19 @@ void ChromeContentUtilityClient::OnAnalyzeZipFileForDownloadProtection( results)); ReleaseProcessIfNeeded(); } + +#if defined(OS_MACOSX) +void ChromeContentUtilityClient::OnAnalyzeDmgFileForDownloadProtection( + const IPC::PlatformFileForTransit& dmg_file) { + safe_browsing::zip_analyzer::Results results; + safe_browsing::dmg::AnalyzeDMGFile( + IPC::PlatformFileForTransitToFile(dmg_file), &results); + Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( + results)); + ReleaseProcessIfNeeded(); +} +#endif + #endif #if defined(ENABLE_EXTENSIONS) |