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

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: 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..5e6831a33faf3dc5801062582c0d6d3d50d51b7c 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) {
@@ -399,16 +388,13 @@ void AutofillDialogControllerAndroid::DialogContinue(
// Callback should be called as late as possible.
callback_.Run(&form_structure_, google_transaction_id);
- // This might delete us.
Ilya Sherman 2013/09/03 20:57:05 Please preserve this comment.
Raman Kakilate 2013/09/03 21:50:31 Done.
- 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())),
@@ -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