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

Unified Diff: components/safe_browsing_db/v4_local_database_manager.h

Issue 2225613002: V4LDM: Add check for HashPrefix match and some tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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: components/safe_browsing_db/v4_local_database_manager.h
diff --git a/components/safe_browsing_db/v4_local_database_manager.h b/components/safe_browsing_db/v4_local_database_manager.h
index 0bc033f0381e6152e830181729f56f87ac8cbbf8..a6506b15f2f975a9e82d27f9016f32afea639058 100644
--- a/components/safe_browsing_db/v4_local_database_manager.h
+++ b/components/safe_browsing_db/v4_local_database_manager.h
@@ -58,6 +58,29 @@ class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager {
bool IsCsdWhitelistKillSwitchOn() override;
private:
+ // Clients queued up for checking once the database is ready.
+ struct QueuedCheck {
Nathan Parker 2016/08/15 19:06:41 It'd be better to add queuing all at once in a sep
Scott Hess - ex-Googler 2016/08/15 20:57:39 I agree. The queued checks in the prior version f
vakh (use Gerrit instead) 2016/08/17 18:23:06 Done.
+ QueuedCheck(const ListType check_type,
+ Client* client,
+ const GURL& url,
+ const std::vector<UpdateListIdentifier>& expected_threats,
+ const base::TimeTicks& start);
+ QueuedCheck(const QueuedCheck& other);
+ ~QueuedCheck();
+ ListType check_type;
+ Client* client;
+ GURL url;
+ std::vector<UpdateListIdentifier> expected_threats;
+ base::TimeTicks start; // When check was queued.
+ };
+
+ private:
+ friend class V4LocalDatabaseManagerTest;
+ void SetTaskRunnerForTest(
+ const scoped_refptr<base::SequencedTaskRunner>& task_runner) {
+ task_runner_ = task_runner;
+ }
+
~V4LocalDatabaseManager() override;
// The callback called each time the protocol manager downloads updates

Powered by Google App Engine
This is Rietveld 408576698