| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Safe archive file analyzer provided by the utility process and exposed |
| // by mojo policy control to the chrome browser process when build flag |
| // FULL_SAFE_BROWSING is enabled. |
| |
| module chrome.mojom; |
| |
| import "mojo/public/mojom/base/file.mojom"; |
| |
| interface SafeArchiveAnalyzer { |
| // Build flag FULL_SAFE_BROWSING: Analyze the |zip_file| for malicious |
| // download protection, given a |temporary_file| used to extract files |
| // from the |zip_file| archive. |
| AnalyzeZipFile(mojo_base.mojom.File zip_file, |
| mojo_base.mojom.File temporary_file) |
| => (SafeArchiveAnalyzerResults results); |
| |
| // Build flag FULL_SAFE_BROWSING, on OS_MACOSX: Analyze the |dmg_file| |
| // for malicious download protection. |
| AnalyzeDmgFile(mojo_base.mojom.File dmg_file) |
| => (SafeArchiveAnalyzerResults results); |
| |
| // Build flag FULL_SAFE_BROWSING: Analyze the |rar_file| for malicious |
| // download protection. Uses the |temporary_file| to extract files from the |
| // |rar_file| archive. |
| AnalyzeRarFile(mojo_base.mojom.File rar_file, |
| mojo_base.mojom.File temporary_file) |
| => (SafeArchiveAnalyzerResults results); |
| }; |
| |
| [Native] |
| struct SafeArchiveAnalyzerResults; |