| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/safe_browsing/zip_analyzer.h" | 5 #include "chrome/common/safe_browsing/zip_analyzer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/i18n/streaming_utf8_validator.h" | 13 #include "base/i18n/streaming_utf8_validator.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 16 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
| 17 #include "chrome/common/safe_browsing/download_protection_util.h" | 17 #include "chrome/common/safe_browsing/download_protection_util.h" |
| 18 #include "chrome/common/safe_browsing/file_type_policies.h" | 18 #include "chrome/common/safe_browsing/file_type_policies.h" |
| 19 #include "chrome/common/safe_browsing/zip_analyzer_results.h" | 19 #include "chrome/common/safe_browsing/zip_analyzer_results.h" |
| 20 #include "components/safe_browsing/csd.pb.h" | 20 #include "components/safe_browsing/common/csd.pb.h" |
| 21 #include "crypto/secure_hash.h" | 21 #include "crypto/secure_hash.h" |
| 22 #include "crypto/sha2.h" | 22 #include "crypto/sha2.h" |
| 23 #include "third_party/zlib/google/zip_reader.h" | 23 #include "third_party/zlib/google/zip_reader.h" |
| 24 | 24 |
| 25 namespace safe_browsing { | 25 namespace safe_browsing { |
| 26 namespace zip_analyzer { | 26 namespace zip_analyzer { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // A writer delegate that computes a SHA-256 hash digest over the data while | 30 // A writer delegate that computes a SHA-256 hash digest over the data while |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 DVLOG(3) << "Ignoring non-binary file: " << file.value(); | 130 DVLOG(3) << "Ignoring non-binary file: " << file.value(); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 results->archived_archive_filenames.assign(archived_archive_filenames.begin(), | 133 results->archived_archive_filenames.assign(archived_archive_filenames.begin(), |
| 134 archived_archive_filenames.end()); | 134 archived_archive_filenames.end()); |
| 135 results->success = true; | 135 results->success = true; |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace zip_analyzer | 138 } // namespace zip_analyzer |
| 139 } // namespace safe_browsing | 139 } // namespace safe_browsing |
| OLD | NEW |