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

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

Issue 2240083004: Remove stl_util's STLDeleteContainerPairPointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mattm 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
« no previous file with comments | « base/stl_util.h ('k') | chrome/browser/safe_browsing/client_side_detection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/client_side_detection_service.h
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index c3c15d72976161496667089c37edfaa0fabb3a24..0b0ee63722c79ec49c55eaa349935cd81a3ab728 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -24,7 +24,6 @@
#include "base/callback_forward.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
@@ -163,7 +162,6 @@ class ClientSideDetectionService : public net::URLFetcherDelegate,
CacheState(bool phish, base::Time time);
};
- typedef std::map<GURL, linked_ptr<CacheState> > PhishingCache;
static const char kClientReportMalwareUrl[];
static const char kClientReportPhishingUrl[];
@@ -230,13 +228,13 @@ class ClientSideDetectionService : public net::URLFetcherDelegate,
// Map of client report phishing request to the corresponding callback that
// has to be invoked when the request is done.
- struct ClientReportInfo;
- std::map<const net::URLFetcher*, ClientReportInfo*>
+ struct ClientPhishingReportInfo;
+ std::map<const net::URLFetcher*, std::unique_ptr<ClientPhishingReportInfo>>
client_phishing_reports_;
// Map of client malware ip request to the corresponding callback that
// has to be invoked when the request is done.
struct ClientMalwareReportInfo;
- std::map<const net::URLFetcher*, ClientMalwareReportInfo*>
+ std::map<const net::URLFetcher*, std::unique_ptr<ClientMalwareReportInfo>>
client_malware_reports_;
// Cache of completed requests. Used to satisfy requests for the same urls
@@ -245,7 +243,7 @@ class ClientSideDetectionService : public net::URLFetcherDelegate,
// size of this cache is limited by kMaxReportsPerDay *
// ceil(InDays(max(kNegativeCacheInterval, kPositiveCacheInterval))).
// TODO(gcasto): Serialize this so that it doesn't reset on browser restart.
- PhishingCache cache_;
+ std::map<GURL, std::unique_ptr<CacheState>> cache_;
// Timestamp of when we sent a phishing request. Used to limit the number
// of phishing requests that we send in a day.
« no previous file with comments | « base/stl_util.h ('k') | chrome/browser/safe_browsing/client_side_detection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698