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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolverStats.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef StyleResolverStats_h 31 #ifndef StyleResolverStats_h
32 #define StyleResolverStats_h 32 #define StyleResolverStats_h
33 33
34 #include "platform/TraceEvent.h" 34 #include "platform/TraceEvent.h"
35 #include "platform/TracedValue.h" 35 #include "platform/TracedValue.h"
36 #include "wtf/PtrUtil.h" 36 #include "wtf/PassOwnPtr.h"
37 #include <memory>
38 37
39 namespace blink { 38 namespace blink {
40 39
41 class StyleResolverStats { 40 class StyleResolverStats {
42 USING_FAST_MALLOC(StyleResolverStats); 41 USING_FAST_MALLOC(StyleResolverStats);
43 public: 42 public:
44 static std::unique_ptr<StyleResolverStats> create() 43 static PassOwnPtr<StyleResolverStats> create()
45 { 44 {
46 return wrapUnique(new StyleResolverStats); 45 return adoptPtr(new StyleResolverStats);
47 } 46 }
48 47
49 void reset(); 48 void reset();
50 bool allCountersEnabled() const; 49 bool allCountersEnabled() const;
51 std::unique_ptr<TracedValue> toTracedValue() const; 50 PassOwnPtr<TracedValue> toTracedValue() const;
52 51
53 unsigned sharedStyleLookups; 52 unsigned sharedStyleLookups;
54 unsigned sharedStyleCandidates; 53 unsigned sharedStyleCandidates;
55 unsigned sharedStyleFound; 54 unsigned sharedStyleFound;
56 unsigned sharedStyleMissed; 55 unsigned sharedStyleMissed;
57 unsigned sharedStyleRejectedByUncommonAttributeRules; 56 unsigned sharedStyleRejectedByUncommonAttributeRules;
58 unsigned sharedStyleRejectedBySiblingRules; 57 unsigned sharedStyleRejectedBySiblingRules;
59 unsigned sharedStyleRejectedByParent; 58 unsigned sharedStyleRejectedByParent;
60 unsigned matchedPropertyApply; 59 unsigned matchedPropertyApply;
61 unsigned matchedPropertyCacheHit; 60 unsigned matchedPropertyCacheHit;
(...skipping 14 matching lines...) Expand all
76 { 75 {
77 reset(); 76 reset();
78 } 77 }
79 }; 78 };
80 79
81 #define INCREMENT_STYLE_STATS_COUNTER(styleEngine, counter, n) ((styleEngine).st ats() && ((styleEngine).stats()-> counter += n)); 80 #define INCREMENT_STYLE_STATS_COUNTER(styleEngine, counter, n) ((styleEngine).st ats() && ((styleEngine).stats()-> counter += n));
82 81
83 } // namespace blink 82 } // namespace blink
84 83
85 #endif // StyleResolverStats_h 84 #endif // StyleResolverStats_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698