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

Unified Diff: chrome/browser/safe_browsing/local_database_manager.h

Issue 2442953002: Remove stl_util's deletion function use from chrome/. (Closed)
Patch Set: fix Created 4 years, 2 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/local_database_manager.h
diff --git a/chrome/browser/safe_browsing/local_database_manager.h b/chrome/browser/safe_browsing/local_database_manager.h
index f9559b4b204edcd2db9acc63e871214884c434e1..e78abcf094f75944395834561fe5be5663d3600b 100644
--- a/chrome/browser/safe_browsing/local_database_manager.h
+++ b/chrome/browser/safe_browsing/local_database_manager.h
@@ -45,7 +45,7 @@ class ClientSideDetectionService;
class DownloadProtectionService;
struct V4ProtocolConfig;
-// Implemetation that manages a local database on disk.
+// Implementation that manages a local database on disk.
//
// Construction needs to happen on the main thread.
class LocalSafeBrowsingDatabaseManager
@@ -158,7 +158,6 @@ class LocalSafeBrowsingDatabaseManager
FRIEND_TEST_ALL_PREFIXES(LocalDatabaseManagerTest,
ServiceStopWithPendingChecks);
- typedef std::set<SafeBrowsingCheck*> CurrentChecks;
typedef std::vector<SafeBrowsingCheck*> GetHashRequestors;
typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests;
@@ -304,7 +303,7 @@ class LocalSafeBrowsingDatabaseManager
// browsing check with timeout of |timeout|. |task| will be called on
// success, otherwise TimeoutCallback will be called.
void StartSafeBrowsingCheck(
- SafeBrowsingCheck* check,
+ std::unique_ptr<SafeBrowsingCheck> check,
const base::Callback<std::vector<SBPrefix>(void)>& task);
// SafeBrowsingProtocolManageDelegate override
@@ -321,7 +320,7 @@ class LocalSafeBrowsingDatabaseManager
scoped_refptr<SafeBrowsingService> sb_service_;
- CurrentChecks checks_;
+ std::map<SafeBrowsingCheck*, std::unique_ptr<SafeBrowsingCheck>> checks_;
// Used for issuing only one GetHash request for a given prefix.
GetHashRequests gethash_requests_;
@@ -338,7 +337,7 @@ class LocalSafeBrowsingDatabaseManager
bool enabled_;
// Indicate if download_protection is enabled by command switch
- // so we allow this feature to be exersized.
+ // so we allow this feature to be exercised.
bool enable_download_protection_;
// Indicate if client-side phishing detection whitelist should be enabled

Powered by Google App Engine
This is Rietveld 408576698