OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 3601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3612 if (!IsManuallyEditingSection(section)) | 3612 if (!IsManuallyEditingSection(section)) |
3613 return true; | 3613 return true; |
3614 | 3614 |
3615 FieldValueMap detail_outputs; | 3615 FieldValueMap detail_outputs; |
3616 view_->GetUserInput(section, &detail_outputs); | 3616 view_->GetUserInput(section, &detail_outputs); |
3617 return !InputsAreValid(section, detail_outputs).HasSureErrors(); | 3617 return !InputsAreValid(section, detail_outputs).HasSureErrors(); |
3618 } | 3618 } |
3619 | 3619 |
3620 bool AutofillDialogControllerImpl::RulesAreLoaded(DialogSection section) { | 3620 bool AutofillDialogControllerImpl::RulesAreLoaded(DialogSection section) { |
3621 AddressData address_data; | 3621 AddressData address_data; |
3622 address_data.country_code = CountryCodeForSection(section); | 3622 address_data.region_code = CountryCodeForSection(section); |
3623 AddressValidator::Status status = GetValidator()->ValidateAddress( | 3623 AddressValidator::Status status = GetValidator()->ValidateAddress( |
3624 address_data, AddressProblemFilter(), NULL); | 3624 address_data, AddressProblemFilter(), NULL); |
3625 return status == AddressValidator::SUCCESS; | 3625 return status == AddressValidator::SUCCESS; |
3626 } | 3626 } |
3627 | 3627 |
3628 bool AutofillDialogControllerImpl::IsCreditCardExpirationValid( | 3628 bool AutofillDialogControllerImpl::IsCreditCardExpirationValid( |
3629 const base::string16& year, | 3629 const base::string16& year, |
3630 const base::string16& month) const { | 3630 const base::string16& month) const { |
3631 // If the expiration is in the past as per the local clock, it's invalid. | 3631 // If the expiration is in the past as per the local clock, it's invalid. |
3632 base::Time now = base::Time::Now(); | 3632 base::Time now = base::Time::Now(); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4168 view_->UpdateButtonStrip(); | 4168 view_->UpdateButtonStrip(); |
4169 } | 4169 } |
4170 | 4170 |
4171 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4171 void AutofillDialogControllerImpl::FetchWalletCookie() { |
4172 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4172 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
4173 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4173 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
4174 signin_helper_->StartWalletCookieValueFetch(); | 4174 signin_helper_->StartWalletCookieValueFetch(); |
4175 } | 4175 } |
4176 | 4176 |
4177 } // namespace autofill | 4177 } // namespace autofill |
OLD | NEW |