| 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..edd9b7b84b2c3a2cb57a87f4bb7fbfa1b4d282c8 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 MarkAutoSignInFirstRunExperienceShown(content::WebContents* web_contents) {
|
| 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) {
|
| + MarkAutoSignInFirstRunExperienceShown(web_contents_);
|
| +}
|
|
|
| void AutoSigninFirstRunDialogAndroid::OnTurnOffClicked(JNIEnv* env,
|
| jobject obj) {
|
| Profile* profile =
|
| Profile::FromBrowserContext(web_contents_->GetBrowserContext());
|
| password_bubble_experiment::TurnOffAutoSignin(profile->GetPrefs());
|
| + MarkAutoSignInFirstRunExperienceShown(web_contents_);
|
| }
|
|
|
| void AutoSigninFirstRunDialogAndroid::CancelDialog(JNIEnv* env, jobject obj) {}
|
|
|