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

Unified Diff: chrome/browser/extensions/fake_safe_browsing_database_manager.h

Issue 23591050: Delete the omahaproxy-backed extension blacklist and clear its entries from the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix memory leak in blacklist test Created 7 years, 3 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/extensions/fake_safe_browsing_database_manager.h
diff --git a/chrome/browser/extensions/fake_safe_browsing_database_manager.h b/chrome/browser/extensions/fake_safe_browsing_database_manager.h
index 2a91b73f9638dc1dd7b86069df56252fa3eb2330..d6b8e37bbf8c21ed65e48cd835b7f9ab8e79406b 100644
--- a/chrome/browser/extensions/fake_safe_browsing_database_manager.h
+++ b/chrome/browser/extensions/fake_safe_browsing_database_manager.h
@@ -18,7 +18,7 @@ namespace extensions {
// call set_enabled to enable it.
class FakeSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager {
public:
- FakeSafeBrowsingDatabaseManager();
+ explicit FakeSafeBrowsingDatabaseManager(bool enabled);
// Returns true if synchronously safe, false if not in which case the unsafe
// IDs taken from |unsafe_ids_| are passed to to |client| on the current
@@ -26,11 +26,18 @@ class FakeSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager {
virtual bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
Client* client) OVERRIDE;
- void set_enabled(bool enabled) { enabled_ = enabled; }
-
- void set_unsafe_ids(const std::set<std::string>& unsafe_ids) {
- unsafe_ids_ = unsafe_ids;
- }
+ // Return |this| to chain together SetUnsafe(...).NotifyUpdate() conveniently.
+ FakeSafeBrowsingDatabaseManager& Enable();
+ FakeSafeBrowsingDatabaseManager& ClearUnsafe();
+ FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a);
+ FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a,
+ const std::string& b);
+ FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a,
+ const std::string& b,
+ const std::string& c);
+
+ // Send the update notification.
+ void NotifyUpdate();
private:
virtual ~FakeSafeBrowsingDatabaseManager();

Powered by Google App Engine
This is Rietveld 408576698