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

Side by Side Diff: components/payments/payment_request.cc

Issue 2711873003: [Web Payments] Re-add extra view in the footer. (Closed)
Patch Set: Change CreateExtraView to CreateExtraFooterView 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
« no previous file with comments | « components/payments/payment_request.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/payment_request.h" 5 #include "components/payments/payment_request.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "components/payments/payment_details_validation.h" 8 #include "components/payments/payment_details_validation.h"
9 #include "components/payments/payment_request_web_contents_manager.h" 9 #include "components/payments/payment_request_web_contents_manager.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const std::vector<autofill::AutofillProfile*>& 122 const std::vector<autofill::AutofillProfile*>&
123 PaymentRequest::shipping_profiles() { 123 PaymentRequest::shipping_profiles() {
124 return shipping_profiles_; 124 return shipping_profiles_;
125 } 125 }
126 126
127 const std::vector<autofill::AutofillProfile*>& 127 const std::vector<autofill::AutofillProfile*>&
128 PaymentRequest::contact_profiles() { 128 PaymentRequest::contact_profiles() {
129 return contact_profiles_; 129 return contact_profiles_;
130 } 130 }
131 131
132 const std::vector<autofill::CreditCard*>& PaymentRequest::credit_cards() {
133 return credit_cards_;
134 }
135
136 void PaymentRequest::PopulateProfileCache() { 132 void PaymentRequest::PopulateProfileCache() {
137 std::vector<autofill::AutofillProfile*> profiles = 133 std::vector<autofill::AutofillProfile*> profiles =
138 personal_data_manager()->GetProfilesToSuggest(); 134 personal_data_manager()->GetProfilesToSuggest();
139 135
140 // PaymentRequest may outlive the Profiles returned by the Data Manager. 136 // PaymentRequest may outlive the Profiles returned by the Data Manager.
141 // Thus, we store copies, and return a vector of pointers to these copies 137 // Thus, we store copies, and return a vector of pointers to these copies
142 // whenever Profiles are requested. The same is true for credit cards. 138 // whenever Profiles are requested. The same is true for credit cards.
143 for (size_t i = 0; i < profiles.size(); i++) { 139 for (size_t i = 0; i < profiles.size(); i++) {
144 profile_cache_.push_back( 140 profile_cache_.push_back(
145 base::MakeUnique<autofill::AutofillProfile>(*profiles[i])); 141 base::MakeUnique<autofill::AutofillProfile>(*profiles[i]));
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 card_networks.erase(card_it); 237 card_networks.erase(card_it);
242 } 238 }
243 } 239 }
244 } 240 }
245 } 241 }
246 } 242 }
247 } 243 }
248 } 244 }
249 245
250 } // namespace payments 246 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/payment_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698