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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/payments/PaymentRequest.h" 5 #include "modules/payments/PaymentRequest.h"
6 6
7 #include "bindings/core/v8/ConditionalFeatures.h" 7 #include "bindings/core/v8/ConditionalFeatures.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 exceptionState.throwTypeError("ShippingOption id required"); 189 exceptionState.throwTypeError("ShippingOption id required");
190 return; 190 return;
191 } 191 }
192 192
193 if (uniqueIds.contains(option.id())) { 193 if (uniqueIds.contains(option.id())) {
194 // Clear |output| instead of throwing an exception. 194 // Clear |output| instead of throwing an exception.
195 output.clear(); 195 output.clear();
196 return; 196 return;
197 } 197 }
198 198
199 uniqueIds.add(option.id()); 199 uniqueIds.insert(option.id());
200 200
201 validateShippingOptionOrPaymentItem(option, exceptionState); 201 validateShippingOptionOrPaymentItem(option, exceptionState);
202 if (exceptionState.hadException()) 202 if (exceptionState.hadException())
203 return; 203 return;
204 204
205 output.push_back( 205 output.push_back(
206 payments::mojom::blink::PaymentShippingOption::From(option)); 206 payments::mojom::blink::PaymentShippingOption::From(option));
207 } 207 }
208 } 208 }
209 209
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 m_completeResolver.clear(); 1036 m_completeResolver.clear();
1037 m_showResolver.clear(); 1037 m_showResolver.clear();
1038 m_abortResolver.clear(); 1038 m_abortResolver.clear();
1039 m_canMakePaymentResolver.clear(); 1039 m_canMakePaymentResolver.clear();
1040 if (m_clientBinding.is_bound()) 1040 if (m_clientBinding.is_bound())
1041 m_clientBinding.Close(); 1041 m_clientBinding.Close();
1042 m_paymentProvider.reset(); 1042 m_paymentProvider.reset();
1043 } 1043 }
1044 1044
1045 } // namespace blink 1045 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698