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

Side by Side Diff: ios/chrome/browser/payments/payment_request.mm

Issue 2713033004: Layered component for web payments (Closed)
Patch Set: Rebase Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/chrome/browser/payments/payment_request.h" 5 #include "ios/chrome/browser/payments/payment_request.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/autofill/core/browser/autofill_data_util.h" 10 #include "components/autofill/core/browser/autofill_data_util.h"
11 #include "components/autofill/core/browser/autofill_profile.h" 11 #include "components/autofill/core/browser/autofill_profile.h"
12 #include "components/autofill/core/browser/credit_card.h" 12 #include "components/autofill/core/browser/credit_card.h"
13 #include "components/autofill/core/browser/personal_data_manager.h" 13 #include "components/autofill/core/browser/personal_data_manager.h"
14 #include "components/payments/currency_formatter.h" 14 #include "components/payments/core/currency_formatter.h"
15 #include "ios/chrome/browser/application_context.h" 15 #include "ios/chrome/browser/application_context.h"
16 #include "ios/web/public/payments/payment_request.h" 16 #include "ios/web/public/payments/payment_request.h"
17 17
18 #if !defined(__has_feature) || !__has_feature(objc_arc) 18 #if !defined(__has_feature) || !__has_feature(objc_arc)
19 #error "This file requires ARC support." 19 #error "This file requires ARC support."
20 #endif 20 #endif
21 21
22 PaymentRequest::PaymentRequest( 22 PaymentRequest::PaymentRequest(
23 std::unique_ptr<web::PaymentRequest> web_payment_request, 23 std::unique_ptr<web::PaymentRequest> web_payment_request,
24 autofill::PersonalDataManager* personal_data_manager) 24 autofill::PersonalDataManager* personal_data_manager)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 selected_shipping_option_ = nullptr; 103 selected_shipping_option_ = nullptr;
104 for (const auto& shipping_option : shipping_options_) { 104 for (const auto& shipping_option : shipping_options_) {
105 if (shipping_option->selected) { 105 if (shipping_option->selected) {
106 // If more than one option has |selected| set, the last one in the 106 // If more than one option has |selected| set, the last one in the
107 // sequence should be treated as the selected item. 107 // sequence should be treated as the selected item.
108 selected_shipping_option_ = shipping_option; 108 selected_shipping_option_ = shipping_option;
109 } 109 }
110 } 110 }
111 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698