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

Unified Diff: chrome/browser/password_manager/auto_signin_first_run_dialog_android.cc

Issue 1952723002: [Smart Lock] Stop showing auto signin first run only after user decision received. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/auto_signin_first_run_dialog_android_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {}
« no previous file with comments | « no previous file | chrome/browser/password_manager/auto_signin_first_run_dialog_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698