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

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

Issue 63053003: Ask libaddressinput for address components to use in requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 11 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/DEPS » ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (wrapper) 85 if (wrapper)
86 wrapper->FillFormStructure(inputs, compare, &form_structure); 86 wrapper->FillFormStructure(inputs, compare, &form_structure);
87 } 87 }
88 88
89 void FillOutputForSection( 89 void FillOutputForSection(
90 DialogSection section, 90 DialogSection section,
91 FormStructure& form_structure, 91 FormStructure& form_structure,
92 wallet::FullWallet* full_wallet, 92 wallet::FullWallet* full_wallet,
93 const base::string16& email_address) { 93 const base::string16& email_address) {
94 DetailInputs inputs; 94 DetailInputs inputs;
95 common::BuildInputsForSection(section, &inputs); 95 common::BuildInputsForSection(section, "US", &inputs);
96 96
97 FillOutputForSectionWithComparator( 97 FillOutputForSectionWithComparator(
98 section, inputs, 98 section, inputs,
99 base::Bind(common::DetailInputMatchesField, section), 99 base::Bind(common::DetailInputMatchesField, section),
100 form_structure, full_wallet, email_address); 100 form_structure, full_wallet, email_address);
101 101
102 if (section == SECTION_CC_BILLING) { 102 if (section == SECTION_CC_BILLING) {
103 // Email is hidden while using Wallet, special case it. 103 // Email is hidden while using Wallet, special case it.
104 for (size_t i = 0; i < form_structure.field_count(); ++i) { 104 for (size_t i = 0; i < form_structure.field_count(); ++i) {
105 AutofillField* field = form_structure.field(i); 105 AutofillField* field = form_structure.field(i);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 PHONE_BILLING_WHOLE_NUMBER, 243 PHONE_BILLING_WHOLE_NUMBER,
244 form_structure_) || 244 form_structure_) ||
245 IsSectionInputUsedInFormStructure( 245 IsSectionInputUsedInFormStructure(
246 SECTION_SHIPPING, 246 SECTION_SHIPPING,
247 PHONE_HOME_WHOLE_NUMBER, 247 PHONE_HOME_WHOLE_NUMBER,
248 form_structure_); 248 form_structure_);
249 249
250 bool request_shipping_address = false; 250 bool request_shipping_address = false;
251 { 251 {
252 DetailInputs inputs; 252 DetailInputs inputs;
253 common::BuildInputsForSection(SECTION_SHIPPING, &inputs); 253 common::BuildInputsForSection(SECTION_SHIPPING, "US", &inputs);
254 EmptyDataModelWrapper empty_wrapper; 254 EmptyDataModelWrapper empty_wrapper;
255 request_shipping_address = empty_wrapper.FillFormStructure( 255 request_shipping_address = empty_wrapper.FillFormStructure(
256 inputs, 256 inputs,
257 base::Bind(common::DetailInputMatchesField, SECTION_SHIPPING), 257 base::Bind(common::DetailInputMatchesField, SECTION_SHIPPING),
258 &form_structure_); 258 &form_structure_);
259 } 259 }
260 260
261 const bool incognito_mode = profile_->IsOffTheRecord(); 261 const bool incognito_mode = profile_->IsOffTheRecord();
262 262
263 bool last_used_choice_is_autofill = false; 263 bool last_used_choice_is_autofill = false;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { 417 void AutofillDialogControllerAndroid::LogOnCancelMetrics() {
418 GetMetricLogger().LogDialogUiDuration( 418 GetMetricLogger().LogDialogUiDuration(
419 base::Time::Now() - dialog_shown_timestamp_, 419 base::Time::Now() - dialog_shown_timestamp_,
420 AutofillMetrics::DIALOG_CANCELED); 420 AutofillMetrics::DIALOG_CANCELED);
421 421
422 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); 422 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED);
423 } 423 }
424 424
425 } // namespace autofill 425 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698