Index: third_party/WebKit/Source/platform/inspector_protocol/Values.h |
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Values.h b/third_party/WebKit/Source/platform/inspector_protocol/Values.h |
index e4a719286fb67d31c12567a787253fb8ac06f824..dc9afcf27aab1d6dc65e37874e05c2dd854aa73c 100644 |
--- a/third_party/WebKit/Source/platform/inspector_protocol/Values.h |
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Values.h |
@@ -10,6 +10,8 @@ |
#include "platform/inspector_protocol/Platform.h" |
#include "platform/inspector_protocol/String16.h" |
+#include <vector> |
+ |
namespace blink { |
namespace protocol { |
@@ -174,10 +176,20 @@ public: |
private: |
DictionaryValue(); |
+ template<typename T> |
+ void set(const String16& key, std::unique_ptr<T>& value) |
+ { |
+ DCHECK(value); |
+ bool isNew = m_data.find(key) == m_data.end(); |
+ m_data[key] = std::move(value); |
+ if (isNew) { |
dgozman
2016/06/24 17:01:12
style: redundant {}
eostroukhov-old
2016/06/24 22:24:25
Done.
|
+ m_order.push_back(key); |
+ } |
+ } |
using Dictionary = protocol::HashMap<String16, std::unique_ptr<Value>>; |
Dictionary m_data; |
- protocol::Vector<String16> m_order; |
+ std::vector<String16> m_order; |
}; |
class PLATFORM_EXPORT ListValue : public Value { |
@@ -211,7 +223,7 @@ public: |
private: |
ListValue(); |
- protocol::Vector<std::unique_ptr<Value>> m_data; |
+ std::vector<std::unique_ptr<Value>> m_data; |
}; |
} // namespace protocol |