| 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 "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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 const GURL& source_url, | 507 const GURL& source_url, |
| 508 const AutofillClient::ResultCallback& callback) | 508 const AutofillClient::ResultCallback& callback) |
| 509 : profile_(Profile::FromBrowserContext(contents->GetBrowserContext())), | 509 : profile_(Profile::FromBrowserContext(contents->GetBrowserContext())), |
| 510 contents_(contents), | 510 contents_(contents), |
| 511 initial_user_state_(AutofillMetrics::DIALOG_USER_STATE_UNKNOWN), | 511 initial_user_state_(AutofillMetrics::DIALOG_USER_STATE_UNKNOWN), |
| 512 form_structure_(form_structure), | 512 form_structure_(form_structure), |
| 513 invoked_from_same_origin_(true), | 513 invoked_from_same_origin_(true), |
| 514 source_url_(source_url), | 514 source_url_(source_url), |
| 515 callback_(callback), | 515 callback_(callback), |
| 516 cares_about_shipping_(true), | 516 cares_about_shipping_(true), |
| 517 weak_ptr_factory_(this), | 517 was_ui_latency_logged_(false), |
| 518 was_ui_latency_logged_(false) { | 518 weak_ptr_factory_(this) { |
| 519 DCHECK(!callback_.is_null()); | 519 DCHECK(!callback_.is_null()); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void AutofillDialogControllerAndroid::LogOnFinishSubmitMetrics() { | 522 void AutofillDialogControllerAndroid::LogOnFinishSubmitMetrics() { |
| 523 GetMetricLogger().LogDialogUiDuration( | 523 GetMetricLogger().LogDialogUiDuration( |
| 524 base::Time::Now() - dialog_shown_timestamp_, | 524 base::Time::Now() - dialog_shown_timestamp_, |
| 525 AutofillMetrics::DIALOG_ACCEPTED); | 525 AutofillMetrics::DIALOG_ACCEPTED); |
| 526 | 526 |
| 527 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_ACCEPTED); | 527 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_ACCEPTED); |
| 528 } | 528 } |
| 529 | 529 |
| 530 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { | 530 void AutofillDialogControllerAndroid::LogOnCancelMetrics() { |
| 531 GetMetricLogger().LogDialogUiDuration( | 531 GetMetricLogger().LogDialogUiDuration( |
| 532 base::Time::Now() - dialog_shown_timestamp_, | 532 base::Time::Now() - dialog_shown_timestamp_, |
| 533 AutofillMetrics::DIALOG_CANCELED); | 533 AutofillMetrics::DIALOG_CANCELED); |
| 534 | 534 |
| 535 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); | 535 GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED); |
| 536 } | 536 } |
| 537 | 537 |
| 538 } // namespace autofill | 538 } // namespace autofill |
| OLD | NEW |