Chromium Code Reviews| Index: chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc |
| diff --git a/chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc b/chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc |
| index 56f0cb26855f800bf8edd35fec9992ba8422a48d..f2eff091d47009b5ad9826025e9d9b41f6316262 100644 |
| --- a/chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc |
| +++ b/chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc |
| @@ -22,17 +22,23 @@ |
| using base::android::AttachCurrentThread; |
| using base::android::ConvertUTF16ToJavaString; |
| -AutoSigninFirstRunDialogAndroid::AutoSigninFirstRunDialogAndroid( |
| - content::WebContents* web_contents) |
| - : web_contents_(web_contents) {} |
| +namespace { |
| -AutoSigninFirstRunDialogAndroid::~AutoSigninFirstRunDialogAndroid() { |
| +void MarkAutoSignInFirstRunExperiemceShown(content::WebContents* web_contents) { |
|
Mike West
2016/05/04 17:25:24
Nit: s/Experiemce/Experience/ <-- 'n', not 'm'
|
| Profile* profile = |
| - Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| + Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| password_bubble_experiment::RecordAutoSignInPromptFirstRunExperienceWasShown( |
| profile->GetPrefs()); |
| } |
| +} // namespace |
| + |
| +AutoSigninFirstRunDialogAndroid::AutoSigninFirstRunDialogAndroid( |
| + content::WebContents* web_contents) |
| + : web_contents_(web_contents) {} |
| + |
| +AutoSigninFirstRunDialogAndroid::~AutoSigninFirstRunDialogAndroid() {} |
| + |
| void AutoSigninFirstRunDialogAndroid::ShowDialog() { |
| JNIEnv* env = AttachCurrentThread(); |
| Profile* profile = |
| @@ -73,13 +79,16 @@ void AutoSigninFirstRunDialogAndroid::Destroy(JNIEnv* env, jobject obj) { |
| delete this; |
| } |
| -void AutoSigninFirstRunDialogAndroid::OnOkClicked(JNIEnv* env, jobject obj) {} |
| +void AutoSigninFirstRunDialogAndroid::OnOkClicked(JNIEnv* env, jobject obj) { |
| + MarkAutoSignInFirstRunExperiemceShown(web_contents_); |
| +} |
| void AutoSigninFirstRunDialogAndroid::OnTurnOffClicked(JNIEnv* env, |
| jobject obj) { |
| Profile* profile = |
| Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| password_bubble_experiment::TurnOffAutoSignin(profile->GetPrefs()); |
| + MarkAutoSignInFirstRunExperiemceShown(web_contents_); |
| } |
| void AutoSigninFirstRunDialogAndroid::CancelDialog(JNIEnv* env, jobject obj) {} |