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

Side by Side Diff: components/payments/content/payment_request_spec.cc

Issue 2757523002: [Payments] Use PaymentInstrument/AutofillPaymentInstrument throughout. (Closed)
Patch Set: addressed nits 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 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 "components/payments/content/payment_request_spec.h" 5 #include "components/payments/content/payment_request_spec.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 auto card_it = card_networks.find(networks[supported_network]); 117 auto card_it = card_networks.find(networks[supported_network]);
118 if (card_it != card_networks.end()) { 118 if (card_it != card_networks.end()) {
119 supported_card_networks_.push_back(networks[supported_network]); 119 supported_card_networks_.push_back(networks[supported_network]);
120 card_networks.erase(card_it); 120 card_networks.erase(card_it);
121 } 121 }
122 } 122 }
123 } 123 }
124 } 124 }
125 } 125 }
126 } 126 }
127
128 supported_card_networks_set_.insert(supported_card_networks_.begin(),
129 supported_card_networks_.end());
127 } 130 }
128 131
129 void PaymentRequestSpec::NotifyOnInvalidSpecProvided() { 132 void PaymentRequestSpec::NotifyOnInvalidSpecProvided() {
130 for (auto& observer : observers_) 133 for (auto& observer : observers_)
131 observer.OnInvalidSpecProvided(); 134 observer.OnInvalidSpecProvided();
132 } 135 }
133 136
134 CurrencyFormatter* PaymentRequestSpec::GetOrCreateCurrencyFormatter( 137 CurrencyFormatter* PaymentRequestSpec::GetOrCreateCurrencyFormatter(
135 const std::string& currency_code, 138 const std::string& currency_code,
136 const std::string& currency_system, 139 const std::string& currency_system,
137 const std::string& locale_name) { 140 const std::string& locale_name) {
138 if (!currency_formatter_) { 141 if (!currency_formatter_) {
139 currency_formatter_.reset( 142 currency_formatter_.reset(
140 new CurrencyFormatter(currency_code, currency_system, locale_name)); 143 new CurrencyFormatter(currency_code, currency_system, locale_name));
141 } 144 }
142 return currency_formatter_.get(); 145 return currency_formatter_.get();
143 } 146 }
144 147
145 } // namespace payments 148 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/content/payment_request_spec.h ('k') | components/payments/content/payment_request_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698