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

Unified Diff: chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc

Issue 23537014: rAc: Get rid of dialog type in rAc, there is only one type left now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
index ef1051084b293d6abd57b863ace0780d60607d69..b406bf6d7ef1ca0b8e805ac0b2219b8a0d12cda6 100644
--- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
@@ -145,7 +145,6 @@ base::WeakPtr<AutofillDialogController> AutofillDialogControllerAndroid::Create(
content::WebContents* contents,
const FormData& form_structure,
const GURL& source_url,
- const DialogType dialog_type,
const base::Callback<void(const FormStructure*,
const std::string&)>& callback) {
// AutofillDialogControllerAndroid owns itself.
@@ -153,7 +152,6 @@ base::WeakPtr<AutofillDialogController> AutofillDialogControllerAndroid::Create(
new AutofillDialogControllerAndroid(contents,
form_structure,
source_url,
- dialog_type,
callback);
return autofill_dialog_controller->weak_ptr_factory_.GetWeakPtr();
}
@@ -172,13 +170,11 @@ AutofillDialogController::Create(
content::WebContents* contents,
const FormData& form_structure,
const GURL& source_url,
- const DialogType dialog_type,
const base::Callback<void(const FormStructure*,
const std::string&)>& callback) {
return AutofillDialogControllerAndroid::Create(contents,
form_structure,
source_url,
- dialog_type,
callback);
}
@@ -201,21 +197,18 @@ void AutofillDialogControllerAndroid::Show() {
invoked_from_same_origin_ = active_url.GetOrigin() == source_url_.GetOrigin();
// Log any relevant UI metrics and security exceptions.
- GetMetricLogger().LogDialogUiEvent(
- GetDialogType(), AutofillMetrics::DIALOG_UI_SHOWN);
+ GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_SHOWN);
GetMetricLogger().LogDialogSecurityMetric(
- GetDialogType(), AutofillMetrics::SECURITY_METRIC_DIALOG_SHOWN);
+ AutofillMetrics::SECURITY_METRIC_DIALOG_SHOWN);
if (RequestingCreditCardInfo() && !TransmissionWillBeSecure()) {
GetMetricLogger().LogDialogSecurityMetric(
- GetDialogType(),
AutofillMetrics::SECURITY_METRIC_CREDIT_CARD_OVER_HTTP);
}
if (!invoked_from_same_origin_) {
GetMetricLogger().LogDialogSecurityMetric(
- GetDialogType(),
AutofillMetrics::SECURITY_METRIC_CROSS_ORIGIN_FRAME);
}
@@ -327,10 +320,6 @@ void AutofillDialogControllerAndroid::Hide() {
void AutofillDialogControllerAndroid::TabActivated() {}
-DialogType AutofillDialogControllerAndroid::GetDialogType() const {
- return dialog_type_;
-}
-
// static
bool AutofillDialogControllerAndroid::
RegisterAutofillDialogControllerAndroid(JNIEnv* env) {
@@ -400,21 +389,18 @@ void AutofillDialogControllerAndroid::DialogContinue(
callback_.Run(&form_structure_, google_transaction_id);
// This might delete us.
- if (GetDialogType() == DIALOG_TYPE_REQUEST_AUTOCOMPLETE)
- Hide();
+ Hide();
}
AutofillDialogControllerAndroid::AutofillDialogControllerAndroid(
content::WebContents* contents,
const FormData& form_structure,
const GURL& source_url,
- const DialogType dialog_type,
const base::Callback<void(const FormStructure*,
const std::string&)>& callback)
: profile_(Profile::FromBrowserContext(contents->GetBrowserContext())),
contents_(contents),
initial_user_state_(AutofillMetrics::DIALOG_USER_STATE_UNKNOWN),
- dialog_type_(dialog_type),
form_structure_(form_structure),
invoked_from_same_origin_(true),
source_url_(source_url),
@@ -444,21 +430,17 @@ bool AutofillDialogControllerAndroid::TransmissionWillBeSecure() const {
void AutofillDialogControllerAndroid::LogOnFinishSubmitMetrics() {
GetMetricLogger().LogDialogUiDuration(
base::Time::Now() - dialog_shown_timestamp_,
- GetDialogType(),
AutofillMetrics::DIALOG_ACCEPTED);
- GetMetricLogger().LogDialogUiEvent(
- GetDialogType(), AutofillMetrics::DIALOG_UI_ACCEPTED);
+ GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_ACCEPTED);
}
void AutofillDialogControllerAndroid::LogOnCancelMetrics() {
GetMetricLogger().LogDialogUiDuration(
base::Time::Now() - dialog_shown_timestamp_,
- GetDialogType(),
AutofillMetrics::DIALOG_CANCELED);
- GetMetricLogger().LogDialogUiEvent(
- GetDialogType(), AutofillMetrics::DIALOG_UI_CANCELED);
+ GetMetricLogger().LogDialogUiEvent(AutofillMetrics::DIALOG_UI_CANCELED);
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698