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

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

Issue 2876663002: [Web Payments] Add data attribution string to dialog (Closed)
Patch Set: Address comments, fix tests compile Created 3 years, 7 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_state.h" 5 #include "components/payments/content/payment_request_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return true; 81 return true;
82 } 82 }
83 } 83 }
84 return false; 84 return false;
85 } 85 }
86 86
87 bool PaymentRequestState::AreRequestedMethodsSupported() const { 87 bool PaymentRequestState::AreRequestedMethodsSupported() const {
88 return !spec_->supported_card_networks().empty(); 88 return !spec_->supported_card_networks().empty();
89 } 89 }
90 90
91 std::string PaymentRequestState::GetAuthenticatedEmail() const {
92 return payment_request_delegate_->GetAuthenticatedEmail();
93 }
94
91 void PaymentRequestState::AddObserver(Observer* observer) { 95 void PaymentRequestState::AddObserver(Observer* observer) {
92 CHECK(observer); 96 CHECK(observer);
93 observers_.AddObserver(observer); 97 observers_.AddObserver(observer);
94 } 98 }
95 99
96 void PaymentRequestState::RemoveObserver(Observer* observer) { 100 void PaymentRequestState::RemoveObserver(Observer* observer) {
97 observers_.RemoveObserver(observer); 101 observers_.RemoveObserver(observer);
98 } 102 }
99 103
100 void PaymentRequestState::GeneratePaymentResponse() { 104 void PaymentRequestState::GeneratePaymentResponse() {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 if (is_waiting_for_merchant_validation_) 278 if (is_waiting_for_merchant_validation_)
275 return false; 279 return false;
276 280
277 if (!profile_comparator()->IsShippingComplete(selected_shipping_profile_)) 281 if (!profile_comparator()->IsShippingComplete(selected_shipping_profile_))
278 return false; 282 return false;
279 283
280 return profile_comparator()->IsContactInfoComplete(selected_contact_profile_); 284 return profile_comparator()->IsContactInfoComplete(selected_contact_profile_);
281 } 285 }
282 286
283 } // namespace payments 287 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/content/payment_request_state.h ('k') | components/payments/content/payment_response_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698