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

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

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 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/common/safe_browsing/binary_feature_extractor.h" 5 #include "chrome/common/safe_browsing/binary_feature_extractor.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/memory_mapped_file.h" 12 #include "base/files/memory_mapped_file.h"
13 #include "chrome/common/safe_browsing/csd.pb.h" 13 #include "components/safe_browsing/csd.pb.h"
14 #include "crypto/secure_hash.h" 14 #include "crypto/secure_hash.h"
15 #include "crypto/sha2.h" 15 #include "crypto/sha2.h"
16 16
17 namespace safe_browsing { 17 namespace safe_browsing {
18 18
19 BinaryFeatureExtractor::BinaryFeatureExtractor() {} 19 BinaryFeatureExtractor::BinaryFeatureExtractor() {}
20 20
21 BinaryFeatureExtractor::~BinaryFeatureExtractor() {} 21 BinaryFeatureExtractor::~BinaryFeatureExtractor() {}
22 22
23 bool BinaryFeatureExtractor::ExtractImageFeatures( 23 bool BinaryFeatureExtractor::ExtractImageFeatures(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 if (!len) { 63 if (!len) {
64 uint8_t hash[crypto::kSHA256Length]; 64 uint8_t hash[crypto::kSHA256Length];
65 ctx->Finish(hash, sizeof(hash)); 65 ctx->Finish(hash, sizeof(hash));
66 digests->set_sha256(hash, sizeof(hash)); 66 digests->set_sha256(hash, sizeof(hash));
67 } 67 }
68 } 68 }
69 } 69 }
70 70
71 } // namespace safe_browsing 71 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/common/safe_browsing/BUILD.gn ('k') | chrome/common/safe_browsing/binary_feature_extractor_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698