summaryrefslogtreecommitdiffstats
path: root/chrome/common/safe_browsing/zip_analyzer.h
blob: 58166abf9e3070f197c3ea7e55893b935b3d7ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2012 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.
//
// This file contains the zip file analysis implementation for download
// protection, which runs in a sandboxed utility process.

#ifndef CHROME_COMMON_SAFE_BROWSING_ZIP_ANALYZER_H_
#define CHROME_COMMON_SAFE_BROWSING_ZIP_ANALYZER_H_

#include "base/platform_file.h"

namespace safe_browsing {
namespace zip_analyzer {

struct Results {
  bool success;
  bool has_executable;
  bool has_archive;

  Results() : success(false), has_executable(false), has_archive(false) {}
};

void AnalyzeZipFile(base::PlatformFile zip_file, Results* results);

}  // namespace zip_analyzer
}  // namespace safe_browsing

#endif  // CHROME_COMMON_SAFE_BROWSING_ZIP_ANALYZER_H_