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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h

Issue 1880833002: Move to protocol::Vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved hash to a String16STL.h (not yet in this repo) Created 4 years, 8 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/platform/inspector_protocol/CollectionsWTF.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h b/third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h
index d141f30e7023896d9bb6590f2758e7e9f5ac69c9..0ac816b56766a4c3f353c692f1451d62be1ae145 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/CollectionsSTL.h
@@ -5,20 +5,14 @@
#ifndef CollectionsSTL_h
#define CollectionsSTL_h
-#include "wtf/Allocator.h"
-#include "wtf/HashMap.h"
+#include "platform/inspector_protocol/String16.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include <algorithm>
#include <unordered_map>
#include <vector>
-namespace std {
-template<>
-struct hash<String> {
- std::size_t operator()(const String& k) const { return StringHash::hash(k); }
-};
-}
namespace blink {
namespace protocol {
@@ -62,6 +56,7 @@ class Vector<OwnPtr<T>> {
public:
Vector() { }
Vector(size_t capacity) : m_impl(capacity) { }
+ Vector(Vector&& other) : m_impl(std::move(other.m_impl)) { }
~Vector() { }
typedef typename std::vector<OwnPtr<T>>::iterator iterator;
@@ -86,6 +81,7 @@ public:
void remove(size_t i) { m_impl.erase(m_impl.begin() + i); }
void clear() { m_impl.clear(); }
void swap(Vector& other) { m_impl.swap(other.m_impl); }
+ void swap(Vector&& other) { m_impl.swap(other.m_impl); }
void removeLast() { m_impl.pop_back(); }
private:
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698