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/android/autofill/autofill_dialog_controller_android.
h" | 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_controller_android.
h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 458 |
459 const base::string16 last_used_account_name = | 459 const base::string16 last_used_account_name = |
460 base::android::ConvertJavaStringToUTF16(env, jlast_used_account_name); | 460 base::android::ConvertJavaStringToUTF16(env, jlast_used_account_name); |
461 const std::string last_used_billing = | 461 const std::string last_used_billing = |
462 base::android::ConvertJavaStringToUTF8(env, jlast_used_billing); | 462 base::android::ConvertJavaStringToUTF8(env, jlast_used_billing); |
463 const std::string last_used_shipping = | 463 const std::string last_used_shipping = |
464 base::android::ConvertJavaStringToUTF8(env, jlast_used_shipping); | 464 base::android::ConvertJavaStringToUTF8(env, jlast_used_shipping); |
465 const std::string last_used_card = | 465 const std::string last_used_card = |
466 base::android::ConvertJavaStringToUTF8(env, jlast_used_card); | 466 base::android::ConvertJavaStringToUTF8(env, jlast_used_card); |
467 | 467 |
468 scoped_ptr<FullWallet> full_wallet = | 468 std::unique_ptr<FullWallet> full_wallet = |
469 AutofillDialogResult::ConvertFromJava(env, wallet); | 469 AutofillDialogResult::ConvertFromJava(env, wallet); |
470 FillOutputForSection(SECTION_BILLING, form_structure_, full_wallet.get(), | 470 FillOutputForSection(SECTION_BILLING, form_structure_, full_wallet.get(), |
471 email); | 471 email); |
472 FillOutputForSection( | 472 FillOutputForSection( |
473 SECTION_SHIPPING, form_structure_, full_wallet.get(), email); | 473 SECTION_SHIPPING, form_structure_, full_wallet.get(), email); |
474 | 474 |
475 { | 475 { |
476 DictionaryPrefUpdate updater(profile_->GetPrefs(), | 476 DictionaryPrefUpdate updater(profile_->GetPrefs(), |
477 ::prefs::kAutofillDialogDefaults); | 477 ::prefs::kAutofillDialogDefaults); |
478 base::DictionaryValue* defaults = updater.Get(); | 478 base::DictionaryValue* defaults = updater.Get(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 531 |
532 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { | 532 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { |
533 AutofillMetrics::LogDialogUiDuration( | 533 AutofillMetrics::LogDialogUiDuration( |
534 base::Time::Now() - dialog_shown_timestamp_, | 534 base::Time::Now() - dialog_shown_timestamp_, |
535 AutofillMetrics::DIALOG_CANCELED); | 535 AutofillMetrics::DIALOG_CANCELED); |
536 | 536 |
537 AutofillMetrics::LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); | 537 AutofillMetrics::LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); |
538 } | 538 } |
539 | 539 |
540 } // namespace autofill | 540 } // namespace autofill |
OLD | NEW |