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

Unified Diff: chrome/browser/safe_browsing/sandboxed_zip_analyzer.h

Issue 999003003: Include attributes of zipped binaries in ClientDownloadRequests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zip2
Patch Set: fix ordering of SandboxedZipAnalyzer methods Created 5 years, 9 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_zip_analyzer.h
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.h b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.h
index 7075b452f4dcde096130e0fc1a2e513bc53dc00c..bb08f3e9e4f76797020b13c19a273fe4ef1f4591 100644
--- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.h
+++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.h
@@ -42,6 +42,10 @@ class SandboxedZipAnalyzer : public content::UtilityProcessHostClient {
private:
~SandboxedZipAnalyzer() override;
+ // Posts a fire-and-forget task to close the temporary file in the blocking
+ // pool.
+ void CloseTemporaryFile();
+
// Creates the sandboxed utility process and tells it to start analysis.
// Runs on a worker thread.
void AnalyzeInSandbox();
@@ -50,6 +54,9 @@ class SandboxedZipAnalyzer : public content::UtilityProcessHostClient {
// These notifications run on the IO thread.
bool OnMessageReceived(const IPC::Message& message) override;
+ // Launches the utility process. Must run on the IO thread.
+ void StartProcessOnIOThread();
+
// Notification that the utility process is running, and we can now get its
// process handle.
void OnUtilityProcessStarted();
@@ -58,13 +65,14 @@ class SandboxedZipAnalyzer : public content::UtilityProcessHostClient {
// with the given results. Runs on the IO thread.
void OnAnalyzeZipFileFinished(const zip_analyzer::Results& results);
- // Launches the utility process. Must run on the IO thread.
- void StartProcessOnIOThread();
-
const base::FilePath zip_file_name_;
// Once we have opened the file, we store the handle so that we can use it
// once the utility process has launched.
base::File zip_file_;
+
+ // A temporary file to be used by the utility process for extracting files
+ // from the archive.
+ base::File temp_file_;
base::WeakPtr<content::UtilityProcessHost> utility_process_host_;
const ResultCallback callback_;
// Initialized on the UI thread, but only accessed on the IO thread.

Powered by Google App Engine
This is Rietveld 408576698