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

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: Addressing pkasting feedback 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
« no previous file with comments | « chrome/browser/ui/startup/startup_tab_provider_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..389485cf6b793b511178e068314205e0b80bfc14 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 page.
+ profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, true);
+
web_ui->AddMessageHandler(new WelcomeHandler(web_ui));
content::WebUIDataSource* html_source =
« no previous file with comments | « chrome/browser/ui/startup/startup_tab_provider_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698