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

Side by Side Diff: Source/core/frame/OriginsUsingFeatures.h

Issue 1163423004: Componentization: make OriginsUsingFeatures::Value visible for OriginsUsingFeaturesTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef OriginsUsingFeatures_h 5 #ifndef OriginsUsingFeatures_h
6 #define OriginsUsingFeatures_h 6 #define OriginsUsingFeatures_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
(...skipping 19 matching lines...) Expand all
30 30
31 NumberOfFeatures // This must be the last item. 31 NumberOfFeatures // This must be the last item.
32 }; 32 };
33 33
34 static void count(const ScriptState*, Document&, Feature); 34 static void count(const ScriptState*, Document&, Feature);
35 static void countOriginOrIsolatedWorldHumanReadableName(const ScriptState*, EventTarget&, Feature); 35 static void countOriginOrIsolatedWorldHumanReadableName(const ScriptState*, EventTarget&, Feature);
36 36
37 void documentDetached(Document&); 37 void documentDetached(Document&);
38 void updateMeasurementsAndClear(); 38 void updateMeasurementsAndClear();
39 39
40 class Value { 40 class CORE_EXPORT Value {
41 public: 41 public:
42 Value(); 42 Value();
43 43
44 bool isEmpty() const { return !m_countBits; } 44 bool isEmpty() const { return !m_countBits; }
45 void clear() { m_countBits = 0; } 45 void clear() { m_countBits = 0; }
46 46
47 void count(Feature); 47 void count(Feature);
48 bool get(Feature feature) const { return m_countBits & (1 << static_cast <unsigned>(feature)); } 48 bool get(Feature feature) const { return m_countBits & (1 << static_cast <unsigned>(feature)); }
49 49
50 void aggregate(Value); 50 void aggregate(Value);
(...skipping 12 matching lines...) Expand all
63 void recordOriginsToRappor(); 63 void recordOriginsToRappor();
64 void recordNamesToRappor(); 64 void recordNamesToRappor();
65 65
66 Vector<std::pair<String, OriginsUsingFeatures::Value>, 1> m_originAndValues; 66 Vector<std::pair<String, OriginsUsingFeatures::Value>, 1> m_originAndValues;
67 HashMap<String, OriginsUsingFeatures::Value> m_valueByName; 67 HashMap<String, OriginsUsingFeatures::Value> m_valueByName;
68 }; 68 };
69 69
70 } // namespace blink 70 } // namespace blink
71 71
72 #endif // OriginsUsingFeatures_h 72 #endif // OriginsUsingFeatures_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698