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

Unified Diff: chrome/browser/ui/webui/welcome_ui.cc

Issue 2487553002: Moving new First Run to use per-profile value, rather than simply checking IsChromeFirstRun. (Closed)
Patch Set: Lint Created 4 years, 1 month 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/webui/welcome_ui.cc
diff --git a/chrome/browser/ui/webui/welcome_ui.cc b/chrome/browser/ui/webui/welcome_ui.cc
index 84ef157da419252e08e71cc4a52083bf2cd60fd8..ed48b6da32f8735ad4553f4d30ede90a94413d44 100644
--- a/chrome/browser/ui/webui/welcome_ui.cc
+++ b/chrome/browser/ui/webui/welcome_ui.cc
@@ -6,10 +6,12 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/welcome_handler.h"
+#include "chrome/common/pref_names.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
+#include "components/prefs/pref_service.h"
#include "content/public/browser/web_ui_data_source.h"
#include "net/base/url_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -26,6 +28,9 @@ WelcomeUI::WelcomeUI(content::WebUI* web_ui, const GURL& url)
return;
}
+ // Store that this profile has been shown the Welcome screen.
+ profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomeUI, true);
+
web_ui->AddMessageHandler(new WelcomeHandler(web_ui));
content::WebUIDataSource* html_source =

Powered by Google App Engine
This is Rietveld 408576698