| 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 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3016 cards[i]->guid(), | 3016 cards[i]->guid(), |
| 3017 cards[i]->Label(), | 3017 cards[i]->Label(), |
| 3018 rb.GetImageNamed(CreditCard::IconResourceId(cards[i]->type()))); | 3018 rb.GetImageNamed(CreditCard::IconResourceId(cards[i]->type()))); |
| 3019 suggested_cc_.SetEnabled( | 3019 suggested_cc_.SetEnabled( |
| 3020 cards[i]->guid(), | 3020 cards[i]->guid(), |
| 3021 !ShouldDisallowCcType(cards[i]->TypeForDisplay())); | 3021 !ShouldDisallowCcType(cards[i]->TypeForDisplay())); |
| 3022 } | 3022 } |
| 3023 | 3023 |
| 3024 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); | 3024 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); |
| 3025 std::vector<base::string16> labels; | 3025 std::vector<base::string16> labels; |
| 3026 AutofillProfile::CreateDifferentiatingLabels(profiles, &labels); | 3026 AutofillProfile::CreateDifferentiatingLabels( |
| 3027 profiles, |
| 3028 g_browser_process->GetApplicationLocale(), |
| 3029 &labels); |
| 3027 DCHECK_EQ(labels.size(), profiles.size()); | 3030 DCHECK_EQ(labels.size(), profiles.size()); |
| 3028 for (size_t i = 0; i < profiles.size(); ++i) { | 3031 for (size_t i = 0; i < profiles.size(); ++i) { |
| 3029 const AutofillProfile& profile = *profiles[i]; | 3032 const AutofillProfile& profile = *profiles[i]; |
| 3030 if (!i18ninput::AddressHasCompleteAndVerifiedData( | 3033 if (!i18ninput::AddressHasCompleteAndVerifiedData( |
| 3031 profile, g_browser_process->GetApplicationLocale())) { | 3034 profile, g_browser_process->GetApplicationLocale())) { |
| 3032 continue; | 3035 continue; |
| 3033 } | 3036 } |
| 3034 | 3037 |
| 3035 // Don't add variants for addresses: name is part of credit card and | 3038 // Don't add variants for addresses: name is part of credit card and |
| 3036 // we'll just ignore email and phone number variants. | 3039 // we'll just ignore email and phone number variants. |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4090 view_->UpdateButtonStrip(); | 4093 view_->UpdateButtonStrip(); |
| 4091 } | 4094 } |
| 4092 | 4095 |
| 4093 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4096 void AutofillDialogControllerImpl::FetchWalletCookie() { |
| 4094 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4097 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
| 4095 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4098 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
| 4096 signin_helper_->StartWalletCookieValueFetch(); | 4099 signin_helper_->StartWalletCookieValueFetch(); |
| 4097 } | 4100 } |
| 4098 | 4101 |
| 4099 } // namespace autofill | 4102 } // namespace autofill |
| OLD | NEW |