| OLD | NEW |
| 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 "ios/web/public/payments/payment_request.h" | 5 #include "ios/web/public/payments/payment_request.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 bool PaymentOptions::operator!=(const PaymentOptions& other) const { | 284 bool PaymentOptions::operator!=(const PaymentOptions& other) const { |
| 285 return !(*this == other); | 285 return !(*this == other); |
| 286 } | 286 } |
| 287 | 287 |
| 288 PaymentRequest::PaymentRequest() {} | 288 PaymentRequest::PaymentRequest() {} |
| 289 PaymentRequest::PaymentRequest(const PaymentRequest& other) = default; | 289 PaymentRequest::PaymentRequest(const PaymentRequest& other) = default; |
| 290 PaymentRequest::~PaymentRequest() = default; | 290 PaymentRequest::~PaymentRequest() = default; |
| 291 | 291 |
| 292 bool PaymentRequest::operator==(const PaymentRequest& other) const { | 292 bool PaymentRequest::operator==(const PaymentRequest& other) const { |
| 293 return this->payment_address == other.payment_address && | 293 return this->shipping_address == other.shipping_address && |
| 294 this->shipping_option == other.shipping_option && | 294 this->shipping_option == other.shipping_option && |
| 295 this->method_data == other.method_data && | 295 this->method_data == other.method_data && |
| 296 this->details == other.details && this->options == other.options; | 296 this->details == other.details && this->options == other.options; |
| 297 } | 297 } |
| 298 | 298 |
| 299 bool PaymentRequest::operator!=(const PaymentRequest& other) const { | 299 bool PaymentRequest::operator!=(const PaymentRequest& other) const { |
| 300 return !(*this == other); | 300 return !(*this == other); |
| 301 } | 301 } |
| 302 | 302 |
| 303 bool PaymentRequest::FromDictionaryValue(const base::DictionaryValue& value) { | 303 bool PaymentRequest::FromDictionaryValue(const base::DictionaryValue& value) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); | 386 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); |
| 387 | 387 |
| 388 if (!this->method_name.empty()) | 388 if (!this->method_name.empty()) |
| 389 result->SetString(kMethodName, this->method_name); | 389 result->SetString(kMethodName, this->method_name); |
| 390 result->Set(kPaymentDetails, this->details.ToDictionaryValue()); | 390 result->Set(kPaymentDetails, this->details.ToDictionaryValue()); |
| 391 | 391 |
| 392 return result; | 392 return result; |
| 393 } | 393 } |
| 394 | 394 |
| 395 } // namespace web | 395 } // namespace web |
| OLD | NEW |