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

Unified Diff: third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp

Issue 2617103002: Use a new Supplement constructor for Supplement<Document> (Part 1) (Closed)
Patch Set: temp Created 3 years, 11 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: third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp b/third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp
index 2e36ae4f009b7914a564a66e46dcb5088fa2523c..c372838aac87c05ec645de62658cb44f5437a0f4 100644
--- a/third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp
@@ -84,6 +84,9 @@ class ContextFeaturesCache final
DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<Document>::trace(visitor); }
private:
+ explicit ContextFeaturesCache(Document& document)
+ : Supplement<Document>(document) {}
+
String m_domain;
Entry m_entries[ContextFeatures::FeatureTypeSize];
};
@@ -96,7 +99,7 @@ ContextFeaturesCache& ContextFeaturesCache::from(Document& document) {
ContextFeaturesCache* cache = static_cast<ContextFeaturesCache*>(
Supplement<Document>::from(document, supplementName()));
if (!cache) {
- cache = new ContextFeaturesCache();
+ cache = new ContextFeaturesCache(document);
Supplement<Document>::provideTo(document, supplementName(), cache);
}

Powered by Google App Engine
This is Rietveld 408576698