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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_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/incident_reporting/off_domain_inclusion_detector_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
index 6f3a68f42a8444cf8b78c9d3cad44012e3c4c607..22d7cf89e39caaf91e4c1797d0121d5757a4c4ac 100644
--- a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/safe_browsing/database_manager.h"
#include "chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "chrome/browser/safe_browsing/test_database_manager.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
@@ -127,11 +128,9 @@ enum class TestCase {
UNKNOWN,
};
-class MockSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager {
+class MockSafeBrowsingDatabaseManager : public TestSafeBrowsingDatabaseManager {
public:
- explicit MockSafeBrowsingDatabaseManager(
- const scoped_refptr<SafeBrowsingService>& service)
- : SafeBrowsingDatabaseManager(service) {}
+ MockSafeBrowsingDatabaseManager() {}
MOCK_METHOD1(MatchInclusionWhitelistUrl, bool(const GURL& url));
@@ -345,13 +344,9 @@ class OffDomainInclusionDetectorTest : public testing::TestWithParam<TestCase> {
ASSERT_TRUE(testing_profile_);
ASSERT_FALSE(off_domain_inclusion_detector_);
- // Only used for initializing MockSafeBrowsingDatabaseManager.
- scoped_refptr<SafeBrowsingService> sb_service =
- SafeBrowsingService::CreateSafeBrowsingService();
-
scoped_refptr<MockSafeBrowsingDatabaseManager>
mock_safe_browsing_database_manager =
- new NiceMock<MockSafeBrowsingDatabaseManager>(sb_service);
+ new NiceMock<MockSafeBrowsingDatabaseManager>();
ON_CALL(*mock_safe_browsing_database_manager, MatchInclusionWhitelistUrl(_))
.WillByDefault(Return(ShouldWhitelistEverything()));

Powered by Google App Engine
This is Rietveld 408576698