| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/safe_browsing/binary_feature_extractor.h" | 5 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "chrome/common/safe_browsing/csd.pb.h" | 11 #include "chrome/common/safe_browsing/csd.pb.h" |
| 12 #include "crypto/sha2.h" | 12 #include "crypto/sha2.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace safe_browsing { | 15 namespace safe_browsing { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 0x33, 0xa7, 0x70, 0xf3, 0x6b, 0x85, 0xbf, 0xce, 0x9d, 0x5c}; | 92 0x33, 0xa7, 0x70, 0xf3, 0x6b, 0x85, 0xbf, 0xce, 0x9d, 0x5c}; |
| 93 | 93 |
| 94 const int kDataLen = kBlockSize + 1; | 94 const int kDataLen = kBlockSize + 1; |
| 95 scoped_ptr<char[]> data(new char[kDataLen]); | 95 scoped_ptr<char[]> data(new char[kDataLen]); |
| 96 memset(data.get(), 71, kDataLen); | 96 memset(data.get(), 71, kDataLen); |
| 97 WriteFileToHash(data.get(), kDataLen); | 97 WriteFileToHash(data.get(), kDataLen); |
| 98 ExpectFileDigestEq(kDigest); | 98 ExpectFileDigestEq(kDigest); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace safe_browsing | 101 } // namespace safe_browsing |
| OLD | NEW |