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

Unified Diff: chrome/browser/safe_browsing/threat_details.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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/threat_details.cc
diff --git a/chrome/browser/safe_browsing/threat_details.cc b/chrome/browser/safe_browsing/threat_details.cc
index 9e8559fcf3d07ddbe119e407a648c46cd57c62ec..861c6700177cddcd1852637b188dc45be6d011f0 100644
--- a/chrome/browser/safe_browsing/threat_details.cc
+++ b/chrome/browser/safe_browsing/threat_details.cc
@@ -48,11 +48,9 @@ typedef std::unordered_set<std::string> StringSet;
// A set of HTTPS headers that are allowed to be collected. Contains both
// request and response headers. All entries in this list should be lower-case
// to support case-insensitive comparison.
-struct WhitelistedHttpsHeadersTraits :
- base::DefaultLazyInstanceTraits<StringSet> {
+struct WhitelistedHttpsHeadersTraits : base::LazyInstanceTraitsBase<StringSet> {
Nico 2017/03/07 21:43:02 Wait, how does this compile? This derives from Bas
scottmg 2017/03/07 21:56:30 Ahem, it probably doesn't. Fixed.
static StringSet* New(void* instance) {
- StringSet* headers = base::DefaultLazyInstanceTraits<StringSet>::New(
- instance);
+ StringSet* headers = base::LazyInstanceTraitsBase<StringSet>::New(instance);
headers->insert({"google-creative-id", "google-lineitem-id", "referer",
"content-type", "content-length", "date", "server", "cache-control",
"pragma", "expires"});
@@ -144,7 +142,7 @@ class ThreatDetailsFactoryImpl : public ThreatDetailsFactory {
}
private:
- friend struct base::DefaultLazyInstanceTraits<ThreatDetailsFactoryImpl>;
+ friend struct base::LazyInstanceTraitsBase<ThreatDetailsFactoryImpl>;
ThreatDetailsFactoryImpl() {}

Powered by Google App Engine
This is Rietveld 408576698