summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/fake_safe_browsing_database_manager.cc
diff options
context:
space:
mode:
authornparker <nparker@chromium.org>2015-05-12 18:12:01 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-13 01:12:35 +0000
commitb2cd5eef530be7100274af882af3f5aff4d1c4be (patch)
treef75d8d67c24166da2ffe29f11db45ed104bea8aa /chrome/browser/extensions/fake_safe_browsing_database_manager.cc
parentb6b84f4691f44c62ec0ee5f82355ad3d283d4012 (diff)
downloadchromium_src-b2cd5eef530be7100274af882af3f5aff4d1c4be.zip
chromium_src-b2cd5eef530be7100274af882af3f5aff4d1c4be.tar.gz
chromium_src-b2cd5eef530be7100274af882af3f5aff4d1c4be.tar.bz2
Split to SafeBrowsingDatabaseManager into Local* and Remote*.
SafeBrowsingDatabaseManager: Pure interface TestSafeBrowsingDatabaseManager: Dummy impl for tests LocalSafeBrowsingDatabaseManager: Existing full impl. RemoteSafeBrowsingDatabaseManager: New for Android Wire up the safe_browsing=3 build-mode to switch Android to use Remote*. Move SafeBrowsingCheck into Local* and create the Test* impl that can't accidentally call a real implementation's methods. Adjust tests to use either Test* or Local*. The initial implementation of Remote* does the bookeeping of requests, but doesn't yet make calls to Java and isn't tested. BUG=474608 Review URL: https://codereview.chromium.org/1110723002 Cr-Commit-Position: refs/heads/master@{#329551}
Diffstat (limited to 'chrome/browser/extensions/fake_safe_browsing_database_manager.cc')
-rw-r--r--chrome/browser/extensions/fake_safe_browsing_database_manager.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/extensions/fake_safe_browsing_database_manager.cc b/chrome/browser/extensions/fake_safe_browsing_database_manager.cc
index 7a02e5c..0897401 100644
--- a/chrome/browser/extensions/fake_safe_browsing_database_manager.cc
+++ b/chrome/browser/extensions/fake_safe_browsing_database_manager.cc
@@ -18,7 +18,7 @@
namespace extensions {
FakeSafeBrowsingDatabaseManager::FakeSafeBrowsingDatabaseManager(bool enabled)
- : SafeBrowsingDatabaseManager(
+ : LocalSafeBrowsingDatabaseManager(
make_scoped_refptr(SafeBrowsingService::CreateSafeBrowsingService())),
enabled_(enabled) {
}
@@ -84,7 +84,7 @@ FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::RemoveUnsafe(
}
void FakeSafeBrowsingDatabaseManager::NotifyUpdate() {
- SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true);
+ LocalSafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true);
}
bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs(
@@ -118,17 +118,14 @@ bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs(
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult,
- this,
- base::Passed(&safe_browsing_check),
- client));
+ base::Bind(&FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult, this,
+ base::Passed(&safe_browsing_check)));
return false;
}
void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult(
- scoped_ptr<SafeBrowsingCheck> result,
- Client* client) {
- client->OnSafeBrowsingResult(*result);
+ scoped_ptr<SafeBrowsingCheck> result) {
+ result->OnSafeBrowsingResult();
}
} // namespace extensions