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

Side by Side Diff: chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc

Issue 313073002: Clean-up coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase the branch Created 6 years, 6 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
« no previous file with comments | « AUTHORS ('k') | chrome/browser/safe_browsing/client_side_detection_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/safe_browsing/browser_feature_extractor.h" 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 class MockClientSideDetectionHost : public ClientSideDetectionHost { 63 class MockClientSideDetectionHost : public ClientSideDetectionHost {
64 public: 64 public:
65 MockClientSideDetectionHost( 65 MockClientSideDetectionHost(
66 content::WebContents* tab, 66 content::WebContents* tab,
67 SafeBrowsingDatabaseManager* database_manager) 67 SafeBrowsingDatabaseManager* database_manager)
68 : ClientSideDetectionHost(tab) { 68 : ClientSideDetectionHost(tab) {
69 set_safe_browsing_managers(NULL, database_manager); 69 set_safe_browsing_managers(NULL, database_manager);
70 } 70 }
71 71
72 virtual ~MockClientSideDetectionHost() {}; 72 virtual ~MockClientSideDetectionHost() {}
73 73
74 MOCK_METHOD1(IsBadIpAddress, bool(const std::string&)); 74 MOCK_METHOD1(IsBadIpAddress, bool(const std::string&));
75 }; 75 };
76 } // namespace 76 } // namespace
77 77
78 class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness { 78 class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
79 protected: 79 protected:
80 virtual void SetUp() { 80 virtual void SetUp() {
81 ChromeRenderViewHostTestHarness::SetUp(); 81 ChromeRenderViewHostTestHarness::SetUp();
82 ASSERT_TRUE(profile()->CreateHistoryService( 82 ASSERT_TRUE(profile()->CreateHistoryService(
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // First ip is good but all the others are bad. 645 // First ip is good but all the others are bad.
646 EXPECT_CALL(*db_manager_, MatchMalwareIP(ip)).WillOnce(Return(i > 0)); 646 EXPECT_CALL(*db_manager_, MatchMalwareIP(ip)).WillOnce(Return(i > 0));
647 } 647 }
648 648
649 ExtractMalwareFeatures(&request); 649 ExtractMalwareFeatures(&request);
650 // The number of IP matched url we store is capped at 5 IPs per request. 650 // The number of IP matched url we store is capped at 5 IPs per request.
651 EXPECT_EQ(5, request.bad_ip_url_info_size()); 651 EXPECT_EQ(5, request.bad_ip_url_info_size());
652 } 652 }
653 653
654 } // namespace safe_browsing 654 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « AUTHORS ('k') | chrome/browser/safe_browsing/client_side_detection_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698