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

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

Issue 401103004: Revert of Use language-specific street address line separators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_controller_impl.cc » ('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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 (section == SECTION_SHIPPING && !full_wallet->shipping_address())) { 108 (section == SECTION_SHIPPING && !full_wallet->shipping_address())) {
109 return; 109 return;
110 } 110 }
111 111
112 base::Callback<base::string16(const AutofillType&)> get_info = 112 base::Callback<base::string16(const AutofillType&)> get_info =
113 base::Bind(&FullWallet::GetInfo, 113 base::Bind(&FullWallet::GetInfo,
114 base::Unretained(full_wallet), 114 base::Unretained(full_wallet),
115 g_browser_process->GetApplicationLocale()); 115 g_browser_process->GetApplicationLocale());
116 116
117 std::vector<ServerFieldType> types = common::TypesFromInputs(inputs); 117 std::vector<ServerFieldType> types = common::TypesFromInputs(inputs);
118 form_structure.FillFields( 118 form_structure.FillFields(types,
119 types, 119 compare,
120 compare, 120 get_info,
121 get_info, 121 g_browser_process->GetApplicationLocale());
122 section == SECTION_CC_BILLING
123 ? full_wallet->billing_address()->language_code()
124 : full_wallet->shipping_address()->language_code(),
125 g_browser_process->GetApplicationLocale());
126 } 122 }
127 123
128 void FillOutputForSection( 124 void FillOutputForSection(
129 DialogSection section, 125 DialogSection section,
130 FormStructure& form_structure, 126 FormStructure& form_structure,
131 FullWallet* full_wallet, 127 FullWallet* full_wallet,
132 const base::string16& email_address) { 128 const base::string16& email_address) {
133 DCHECK(section == SECTION_CC_BILLING || section == SECTION_SHIPPING); 129 DCHECK(section == SECTION_CC_BILLING || section == SECTION_SHIPPING);
134 DetailInputs inputs; 130 DetailInputs inputs;
135 if (section == SECTION_CC_BILLING) 131 if (section == SECTION_CC_BILLING)
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 form_structure_); 338 form_structure_);
343 339
344 bool request_shipping_address = false; 340 bool request_shipping_address = false;
345 { 341 {
346 DetailInputs inputs; 342 DetailInputs inputs;
347 BuildShippingInputs(&inputs); 343 BuildShippingInputs(&inputs);
348 request_shipping_address = form_structure_.FillFields( 344 request_shipping_address = form_structure_.FillFields(
349 common::TypesFromInputs(inputs), 345 common::TypesFromInputs(inputs),
350 base::Bind(common::ServerTypeMatchesField, SECTION_SHIPPING), 346 base::Bind(common::ServerTypeMatchesField, SECTION_SHIPPING),
351 base::Bind(NullGetInfo), 347 base::Bind(NullGetInfo),
352 std::string(),
353 g_browser_process->GetApplicationLocale()); 348 g_browser_process->GetApplicationLocale());
354 } 349 }
355 350
356 bool last_used_choice_is_autofill = false; 351 bool last_used_choice_is_autofill = false;
357 base::string16 last_used_account_name; 352 base::string16 last_used_account_name;
358 std::string last_used_billing; 353 std::string last_used_billing;
359 std::string last_used_shipping; 354 std::string last_used_shipping;
360 std::string last_used_credit_card; 355 std::string last_used_credit_card;
361 { 356 {
362 const base::DictionaryValue* defaults = 357 const base::DictionaryValue* defaults =
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 526
532 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { 527 void AutofillDialogControllerAndroid::LogOnCancelMetrics() {
533 GetMetricLogger().LogDialogUiDuration( 528 GetMetricLogger().LogDialogUiDuration(
534 base::Time::Now() - dialog_shown_timestamp_, 529 base::Time::Now() - dialog_shown_timestamp_,
535 AutofillMetrics::DIALOG_CANCELED); 530 AutofillMetrics::DIALOG_CANCELED);
536 531
537 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); 532 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED);
538 } 533 }
539 534
540 } // namespace autofill 535 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698