| OLD | NEW |
| 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 #include "core/dom/URLSearchParams.h" | 5 #include "core/dom/URLSearchParams.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include "core/dom/DOMURL.h" | 8 #include "core/dom/DOMURL.h" |
| 9 #include "platform/network/FormDataEncoder.h" | 9 #include "platform/network/FormDataEncoder.h" |
| 10 #include "platform/weborigin/KURL.h" | 10 #include "platform/weborigin/KURL.h" |
| 11 #include "wtf/text/TextEncoding.h" | 11 #include "platform/wtf/text/TextEncoding.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 class URLSearchParamsIterationSource final | 17 class URLSearchParamsIterationSource final |
| 18 : public PairIterable<String, String>::IterationSource { | 18 : public PairIterable<String, String>::IterationSource { |
| 19 public: | 19 public: |
| 20 URLSearchParamsIterationSource(Vector<std::pair<String, String>> params) | 20 URLSearchParamsIterationSource(Vector<std::pair<String, String>> params) |
| 21 : params_(params), current_(0) {} | 21 : params_(params), current_(0) {} |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 return EncodedFormData::Create(encoded_data.Data(), encoded_data.size()); | 235 return EncodedFormData::Create(encoded_data.Data(), encoded_data.size()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 PairIterable<String, String>::IterationSource* URLSearchParams::StartIteration( | 238 PairIterable<String, String>::IterationSource* URLSearchParams::StartIteration( |
| 239 ScriptState*, | 239 ScriptState*, |
| 240 ExceptionState&) { | 240 ExceptionState&) { |
| 241 return new URLSearchParamsIterationSource(params_); | 241 return new URLSearchParamsIterationSource(params_); |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace blink | 244 } // namespace blink |
| OLD | NEW |