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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc

Issue 212873003: Store the language code for the address in autofill profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixups Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/android/autofill/autofill_dialog_controller_android. h" 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_controller_android. h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 get_info, 84 get_info,
85 g_browser_process->GetApplicationLocale()); 85 g_browser_process->GetApplicationLocale());
86 } 86 }
87 87
88 void FillOutputForSection( 88 void FillOutputForSection(
89 DialogSection section, 89 DialogSection section,
90 FormStructure& form_structure, 90 FormStructure& form_structure,
91 FullWallet* full_wallet, 91 FullWallet* full_wallet,
92 const base::string16& email_address) { 92 const base::string16& email_address) {
93 DetailInputs inputs; 93 DetailInputs inputs;
94 common::BuildInputsForSection(section, "US", &inputs); 94 common::BuildInputsForSection(section, "US", &inputs, NULL);
95 95
96 FillOutputForSectionWithComparator( 96 FillOutputForSectionWithComparator(
97 section, inputs, 97 section, inputs,
98 base::Bind(common::ServerTypeMatchesField, section), 98 base::Bind(common::ServerTypeMatchesField, section),
99 form_structure, full_wallet, email_address); 99 form_structure, full_wallet, email_address);
100 100
101 if (section == SECTION_CC_BILLING) { 101 if (section == SECTION_CC_BILLING) {
102 // Email is hidden while using Wallet, special case it. 102 // Email is hidden while using Wallet, special case it.
103 for (size_t i = 0; i < form_structure.field_count(); ++i) { 103 for (size_t i = 0; i < form_structure.field_count(); ++i) {
104 AutofillField* field = form_structure.field(i); 104 AutofillField* field = form_structure.field(i);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 PHONE_BILLING_WHOLE_NUMBER, 241 PHONE_BILLING_WHOLE_NUMBER,
242 form_structure_) || 242 form_structure_) ||
243 IsSectionInputUsedInFormStructure( 243 IsSectionInputUsedInFormStructure(
244 SECTION_SHIPPING, 244 SECTION_SHIPPING,
245 PHONE_HOME_WHOLE_NUMBER, 245 PHONE_HOME_WHOLE_NUMBER,
246 form_structure_); 246 form_structure_);
247 247
248 bool request_shipping_address = false; 248 bool request_shipping_address = false;
249 { 249 {
250 DetailInputs inputs; 250 DetailInputs inputs;
251 common::BuildInputsForSection(SECTION_SHIPPING, "US", &inputs); 251 common::BuildInputsForSection(SECTION_SHIPPING, "US", &inputs, NULL);
252 request_shipping_address = form_structure_.FillFields( 252 request_shipping_address = form_structure_.FillFields(
253 common::TypesFromInputs(inputs), 253 common::TypesFromInputs(inputs),
254 base::Bind(common::ServerTypeMatchesField, SECTION_SHIPPING), 254 base::Bind(common::ServerTypeMatchesField, SECTION_SHIPPING),
255 base::Bind(NullGetInfo), 255 base::Bind(NullGetInfo),
256 g_browser_process->GetApplicationLocale()); 256 g_browser_process->GetApplicationLocale());
257 } 257 }
258 258
259 const bool incognito_mode = profile_->IsOffTheRecord(); 259 const bool incognito_mode = profile_->IsOffTheRecord();
260 260
261 bool last_used_choice_is_autofill = false; 261 bool last_used_choice_is_autofill = false;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { 415 void AutofillDialogControllerAndroid::LogOnCancelMetrics() {
416 GetMetricLogger().LogDialogUiDuration( 416 GetMetricLogger().LogDialogUiDuration(
417 base::Time::Now() - dialog_shown_timestamp_, 417 base::Time::Now() - dialog_shown_timestamp_,
418 AutofillMetrics::DIALOG_CANCELED); 418 AutofillMetrics::DIALOG_CANCELED);
419 419
420 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); 420 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED);
421 } 421 }
422 422
423 } // namespace autofill 423 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698