| Index: components/safe_browsing_db/database_manager.h
|
| diff --git a/components/safe_browsing_db/database_manager.h b/components/safe_browsing_db/database_manager.h
|
| index a1fa63dda02a7867ba080d1b9a0f3be38cc76356..62809a79882deeffc0b8956e3b489f155edacdd2 100644
|
| --- a/components/safe_browsing_db/database_manager.h
|
| +++ b/components/safe_browsing_db/database_manager.h
|
| @@ -56,6 +56,7 @@ class SafeBrowsingDatabaseManager
|
| const std::set<std::string>& threats) {}
|
|
|
| // Called when the result of checking the API blacklist is known.
|
| + // TODO(kcarattini): Consider if we need |url| passed here, remove if not.
|
| virtual void OnCheckApiBlacklistUrlResult(const GURL& url,
|
| const ThreatMetadata& metadata) {}
|
|
|
| @@ -175,15 +176,6 @@ class SafeBrowsingDatabaseManager
|
| virtual void StopOnIOThread(bool shutdown);
|
|
|
| protected:
|
| - SafeBrowsingDatabaseManager();
|
| -
|
| - virtual ~SafeBrowsingDatabaseManager();
|
| -
|
| - friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
|
| -
|
| - FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest,
|
| - CheckApiBlacklistUrlPrefixes);
|
| -
|
| // Bundled client info for an API abuse hash prefix check.
|
| class SafeBrowsingApiCheck {
|
| public:
|
| @@ -192,6 +184,10 @@ class SafeBrowsingDatabaseManager
|
| Client* client);
|
| ~SafeBrowsingApiCheck();
|
|
|
| + const GURL& url() {return url_;}
|
| + std::vector<SBFullHash>& full_hashes() {return full_hashes_;}
|
| + SafeBrowsingDatabaseManager::Client* client() {return client_;}
|
| +
|
| private:
|
| GURL url_;
|
| std::vector<SBFullHash> full_hashes_;
|
| @@ -201,6 +197,21 @@ class SafeBrowsingDatabaseManager
|
| DISALLOW_COPY_AND_ASSIGN(SafeBrowsingApiCheck);
|
| };
|
|
|
| + SafeBrowsingDatabaseManager();
|
| +
|
| + virtual ~SafeBrowsingDatabaseManager();
|
| +
|
| + friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
|
| +
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest,
|
| + CheckApiBlacklistUrlPrefixes);
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest,
|
| + HandleGetHashesWithApisResults);
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest,
|
| + HandleGetHashesWithApisResultsNoMatch);
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseManagerTest,
|
| + HandleGetHashesWithApisResultsMatches);
|
| +
|
| // Called on the IO thread wheh the SafeBrowsingProtocolManager has received
|
| // the full hash and api results for prefixes of the |url| argument in
|
| // CheckApiBlacklistUrl.
|
|
|