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

Unified Diff: chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc

Issue 1110723002: Split to SafeBrowsingDatabaseManager into Local* and Remote*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to review. Tweak comments and list initializer. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index 0cd880cb8962be4604e3b0974a971e142ac16ec1..32e3e691635ed4279fca8bb804e6f0caa897026c 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
#include "chrome/browser/safe_browsing/database_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "chrome/browser/safe_browsing/test_database_manager.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
@@ -47,11 +48,9 @@ namespace safe_browsing {
namespace {
-class MockSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager {
+class MockSafeBrowsingDatabaseManager : public TestSafeBrowsingDatabaseManager {
public:
- explicit MockSafeBrowsingDatabaseManager(
- const scoped_refptr<SafeBrowsingService>& service)
- : SafeBrowsingDatabaseManager(service) { }
+ MockSafeBrowsingDatabaseManager() {}
MOCK_METHOD1(MatchMalwareIP, bool(const std::string& ip_address));
@@ -84,8 +83,7 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
ASSERT_TRUE(profile()->CreateHistoryService(
true /* delete_file */, false /* no_db */));
- db_manager_ = new StrictMock<MockSafeBrowsingDatabaseManager>(
- SafeBrowsingService::CreateSafeBrowsingService());
+ db_manager_ = new StrictMock<MockSafeBrowsingDatabaseManager>();
host_.reset(new StrictMock<MockClientSideDetectionHost>(
web_contents(), db_manager_.get()));
extractor_.reset(

Powered by Google App Engine
This is Rietveld 408576698