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

Side by Side Diff: chrome/common/safe_browsing/binary_feature_extractor_unittest.cc

Issue 1015363003: Move BinaryFeatureExtractor and PEImageReader to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zip2
Patch Set: sync to position 321353 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698