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

Unified Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc

Issue 2742813004: [Payments] Refactor into PaymentRequestState and Spec (Closed)
Patch Set: don't stop rebasin' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
index a282deaf126ffb104905be81a165c7c1ae7fba4b..f3c9034e7e793ff989ccf9a9d3cfa7793e49f520 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -29,6 +29,7 @@
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/payments/content/payment_request.h"
+#include "components/payments/content/payment_request_spec.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/native_theme/native_theme.h"
@@ -123,7 +124,7 @@ CreditCardEditorViewController::CreateHeaderView() {
constexpr gfx::Size kCardIconSize = gfx::Size(30, 18);
for (const std::string& supported_network :
- request()->supported_card_networks()) {
+ request()->spec()->supported_card_networks()) {
const std::string autofill_card_type =
autofill::data_util::GetCardTypeForBasicCardPaymentType(
supported_network);
@@ -189,7 +190,7 @@ bool CreditCardEditorViewController::ValidateModelAndSave() {
return false;
// Add the card (will not add a duplicate).
- request()->personal_data_manager()->AddCreditCard(credit_card);
+ request()->GetPersonalDataManager()->AddCreditCard(credit_card);
return true;
}
@@ -203,7 +204,7 @@ CreditCardEditorViewController::CreateValidationDelegate(
CreditCardEditorViewController::CreditCardValidationDelegate>(
field, this,
field.type == autofill::CREDIT_CARD_NUMBER
- ? request()->supported_card_networks()
+ ? request()->spec()->supported_card_networks()
: std::vector<std::string>());
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698