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 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3316 view_->GetUserInput(section, &output); | 3316 view_->GetUserInput(section, &output); |
3317 return output[type]; | 3317 return output[type]; |
3318 } | 3318 } |
3319 | 3319 |
3320 bool AutofillDialogControllerImpl::CanAcceptCountry( | 3320 bool AutofillDialogControllerImpl::CanAcceptCountry( |
3321 DialogSection section, | 3321 DialogSection section, |
3322 const std::string& country_code) { | 3322 const std::string& country_code) { |
3323 DCHECK_EQ(2U, country_code.size()); | 3323 DCHECK_EQ(2U, country_code.size()); |
3324 | 3324 |
3325 if (section == SECTION_CC_BILLING) | 3325 if (section == SECTION_CC_BILLING) |
3326 return LowerCaseEqualsASCII(country_code, "us"); | 3326 return base::LowerCaseEqualsASCII(country_code, "us"); |
3327 | 3327 |
3328 CountryComboboxModel* model = CountryComboboxModelForSection(section); | 3328 CountryComboboxModel* model = CountryComboboxModelForSection(section); |
3329 const std::vector<AutofillCountry*>& countries = model->countries(); | 3329 const std::vector<AutofillCountry*>& countries = model->countries(); |
3330 for (size_t i = 0; i < countries.size(); ++i) { | 3330 for (size_t i = 0; i < countries.size(); ++i) { |
3331 if (countries[i] && countries[i]->country_code() == country_code) | 3331 if (countries[i] && countries[i]->country_code() == country_code) |
3332 return true; | 3332 return true; |
3333 } | 3333 } |
3334 | 3334 |
3335 return false; | 3335 return false; |
3336 } | 3336 } |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4157 view_->UpdateButtonStrip(); | 4157 view_->UpdateButtonStrip(); |
4158 } | 4158 } |
4159 | 4159 |
4160 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4160 void AutofillDialogControllerImpl::FetchWalletCookie() { |
4161 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4161 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
4162 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4162 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
4163 signin_helper_->StartWalletCookieValueFetch(); | 4163 signin_helper_->StartWalletCookieValueFetch(); |
4164 } | 4164 } |
4165 | 4165 |
4166 } // namespace autofill | 4166 } // namespace autofill |
OLD | NEW |