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

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

Issue 1100223002: Update {virtual,override} to follow C++11 style in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
15 #include "chrome/common/safe_browsing/csd.pb.h" 15 #include "chrome/common/safe_browsing/csd.pb.h"
16 #include "net/cert/x509_cert_types.h" 16 #include "net/cert/x509_cert_types.h"
17 #include "net/cert/x509_certificate.h" 17 #include "net/cert/x509_certificate.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 namespace safe_browsing { 20 namespace safe_browsing {
21 21
22 class BinaryFeatureExtractorWinTest : public testing::Test { 22 class BinaryFeatureExtractorWinTest : public testing::Test {
23 protected: 23 protected:
24 virtual void SetUp() override { 24 void SetUp() override {
25 base::FilePath source_path; 25 base::FilePath source_path;
26 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_path)); 26 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_path));
27 testdata_path_ = source_path 27 testdata_path_ = source_path
28 .AppendASCII("safe_browsing") 28 .AppendASCII("safe_browsing")
29 .AppendASCII("download_protection"); 29 .AppendASCII("download_protection");
30 30
31 binary_feature_extractor_ = new BinaryFeatureExtractor(); 31 binary_feature_extractor_ = new BinaryFeatureExtractor();
32 } 32 }
33 33
34 // Given a certificate chain protobuf, parse it into X509Certificates. 34 // Given a certificate chain protobuf, parse it into X509Certificates.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ClientDownloadRequest_ImageHeaders image_headers; 198 ClientDownloadRequest_ImageHeaders image_headers;
199 google::protobuf::RepeatedPtrField<std::string> signed_data; 199 google::protobuf::RepeatedPtrField<std::string> signed_data;
200 ASSERT_TRUE(binary_feature_extractor_->ExtractImageFeatures( 200 ASSERT_TRUE(binary_feature_extractor_->ExtractImageFeatures(
201 testdata_path_.AppendASCII("wow_helper.exe"), 201 testdata_path_.AppendASCII("wow_helper.exe"),
202 BinaryFeatureExtractor::kDefaultOptions, &image_headers, &signed_data)); 202 BinaryFeatureExtractor::kDefaultOptions, &image_headers, &signed_data));
203 ASSERT_EQ(1, signed_data.size()); 203 ASSERT_EQ(1, signed_data.size());
204 ASSERT_LT(0U, signed_data.Get(0).size()); 204 ASSERT_LT(0U, signed_data.Get(0).size());
205 } 205 }
206 206
207 } // namespace safe_browsing 207 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/common/local_discovery/local_domain_resolver_unittest.cc ('k') | chrome/common/safe_browsing/pe_image_reader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698