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

Unified Diff: third_party/WebKit/Source/core/style/CounterDirectives.h

Issue 2907063002: Make CounterDirectiveMap a class and implement a Clone() method. (Closed)
Patch Set: Rebase Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/style/CounterDirectives.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/CounterDirectives.h
diff --git a/third_party/WebKit/Source/core/style/CounterDirectives.h b/third_party/WebKit/Source/core/style/CounterDirectives.h
index fecde4c5a0e1b4b3a51a90f56084f8f47f7db3ef..e4ecc2fc3cbd16e203493e2aa02e475110fa831b 100644
--- a/third_party/WebKit/Source/core/style/CounterDirectives.h
+++ b/third_party/WebKit/Source/core/style/CounterDirectives.h
@@ -99,9 +99,13 @@ inline bool operator!=(const CounterDirectives& a, const CounterDirectives& b) {
return !(a == b);
}
-typedef HashMap<AtomicString, CounterDirectives> CounterDirectiveMap;
-
-std::unique_ptr<CounterDirectiveMap> Clone(const CounterDirectiveMap&);
+// Not to be deleted through a pointer to HashMap.
+class CounterDirectiveMap : public HashMap<AtomicString, CounterDirectives> {
+ public:
+ std::unique_ptr<CounterDirectiveMap> Clone() const {
+ return WTF::WrapUnique(new CounterDirectiveMap(*this));
+ }
+};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/CounterDirectives.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698