# Copyright 2014 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. import("//chrome/common/features.gni") import("//third_party/protobuf/proto_library.gni") proto_library("proto") { sources = [ "client_model.proto", "crx_info.proto", "download_file_types.proto", ] } source_set("file_type_policies") { sources = [ "file_type_policies.cc", "file_type_policies.h", ] deps = [ ":proto", "//base", "//chrome/browser:resources", "//ui/base", ] } if (safe_browsing_mode == 1) { source_set("archive_analyzer_results") { sources = [ "archive_analyzer_results.cc", "archive_analyzer_results.h", ] deps = [ "//base", ] public_deps = [ "//components/safe_browsing:csd_proto", ] } source_set("download_protection_util") { sources = [ "download_protection_util.cc", "download_protection_util.h", ] deps = [ ":file_type_policies", "//base", "//components/safe_browsing:features", ] public_deps = [ "//components/safe_browsing:csd_proto", ] } source_set("rar_analyzer") { sources = [ "rar_analyzer.cc", "rar_analyzer.h", ] deps = [ ":archive_analyzer_results", ":download_protection_util", ":file_type_policies", "//base", "//base:i18n", "//third_party/unrar:unrar", ] defines = [ "_FILE_OFFSET_BITS=64", "LARGEFILE_SOURCE", "RAR_SMP", "SILENT", # The following is set to disable certain macro definitions in the unrar # source code. "CHROMIUM_UNRAR", # Disables exceptions in unrar, replaces them with process termination. "UNRAR_NO_EXCEPTIONS", ] public_deps = [ "//components/safe_browsing:csd_proto", ] } } source_set("safe_browsing") { deps = [ ":file_type_policies", ] if (safe_browsing_mode == 1) { sources = [ "binary_feature_extractor.cc", "binary_feature_extractor.h", "binary_feature_extractor_mac.cc", "binary_feature_extractor_win.cc", "ipc_protobuf_message_macros.h", "ipc_protobuf_message_null_macros.h", "mach_o_image_reader_mac.cc", "mach_o_image_reader_mac.h", "pe_image_reader_win.cc", "pe_image_reader_win.h", "protobuf_message_log_macros.h", "protobuf_message_read_macros.h", "protobuf_message_write_macros.h", "zip_analyzer.cc", "zip_analyzer.h", ] if (is_posix) { sources += [ "binary_feature_extractor_posix.cc" ] } deps += [ ":archive_analyzer_results", ":download_protection_util", ":rar_analyzer", "//components/safe_browsing:features", ] public_deps = [ ":proto", "//base:i18n", "//chrome/common:mojo_bindings", "//components/safe_browsing:csd_proto", "//crypto", "//ipc", "//third_party/zlib/google:zip", ] } }