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

Unified Diff: third_party/WebKit/Source/core/dom/URLSearchParams.h

Issue 2725593003: Construct URLSearchParams from sequence initializer. (Closed)
Patch Set: style update Created 3 years, 10 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
Index: third_party/WebKit/Source/core/dom/URLSearchParams.h
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParams.h b/third_party/WebKit/Source/core/dom/URLSearchParams.h
index b6afb63f27f61aa97c202d5902e9b57bd666a421..0813f5a93ccd5b040c3d11ad1a9cb4a5bc6be903 100644
--- a/third_party/WebKit/Source/core/dom/URLSearchParams.h
+++ b/third_party/WebKit/Source/core/dom/URLSearchParams.h
@@ -5,22 +5,23 @@
#ifndef URLSearchParams_h
#define URLSearchParams_h
+#include <base/gtest_prod_util.h>
+#include <utility>
#include "bindings/core/v8/Iterable.h"
#include "bindings/core/v8/ScriptWrappable.h"
-#include "bindings/core/v8/USVStringOrURLSearchParams.h"
+#include "bindings/core/v8/USVStringSequenceSequenceOrUSVStringOrURLSearchParams.h"
#include "platform/heap/Handle.h"
#include "platform/network/EncodedFormData.h"
#include "wtf/Forward.h"
#include "wtf/text/WTFString.h"
-#include <base/gtest_prod_util.h>
-#include <utility>
namespace blink {
class ExceptionState;
class DOMURL;
-typedef USVStringOrURLSearchParams URLSearchParamsInit;
+typedef USVStringSequenceSequenceOrUSVStringOrURLSearchParams
+ URLSearchParamsInit;
class CORE_EXPORT URLSearchParams final
: public GarbageCollectedFinalized<URLSearchParams>,
@@ -29,7 +30,9 @@ class CORE_EXPORT URLSearchParams final
DEFINE_WRAPPERTYPEINFO();
public:
- static URLSearchParams* create(const URLSearchParamsInit&);
+ static URLSearchParams* create(const URLSearchParamsInit&, ExceptionState&);
+ static URLSearchParams* create(const Vector<Vector<String>>&,
+ ExceptionState&);
static URLSearchParams* create(const String& queryString,
DOMURL* urlObject = nullptr) {
@@ -68,6 +71,8 @@ class CORE_EXPORT URLSearchParams final
IterationSource* startIteration(ScriptState*, ExceptionState&) override;
void encodeAsFormData(Vector<char>&) const;
+ void appendWithoutUpdate(const String& name, const String& value);
+
Vector<std::pair<String, String>> m_params;
WeakMember<DOMURL> m_urlObject;

Powered by Google App Engine
This is Rietveld 408576698