Chromium Code Reviews| Index: chrome/browser/ui/webui/welcome_win10_ui.cc |
| diff --git a/chrome/browser/ui/webui/welcome_win10_ui.cc b/chrome/browser/ui/webui/welcome_win10_ui.cc |
| index cf416e30e2e22d7db852d3c33e6e5510d548bf74..9482848097dcba6bee0b2f84a72644dc9131e81e 100644 |
| --- a/chrome/browser/ui/webui/welcome_win10_ui.cc |
| +++ b/chrome/browser/ui/webui/welcome_win10_ui.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/feature_list.h" |
| #include "base/memory/ptr_util.h" |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/startup/startup_features.h" |
| #include "chrome/browser/ui/webui/welcome_win10_handler.h" |
| @@ -92,10 +93,9 @@ WelcomeWin10UI::WelcomeWin10UI(content::WebUI* web_ui, const GURL& url) |
| static const char kCssFilePath[] = "welcome.css"; |
| static const char kJsFilePath[] = "welcome.js"; |
| - Profile* profile = Profile::FromWebUI(web_ui); |
| - |
| - // Store that this profile has been shown the Win10 promo page. |
| - profile->GetPrefs()->SetBoolean(prefs::kHasSeenWin10PromoPage, true); |
| + // Remember that the Win10 promo page has been shown. |
| + g_browser_process->local_state()->SetBoolean(prefs::kHasSeenWin10PromoPage, |
| + true); |
| // Determine which variation to show. |
| bool is_first_run = !UrlContainsKeyValueInQuery(url, "text", "faster"); |
| @@ -122,6 +122,7 @@ WelcomeWin10UI::WelcomeWin10UI(content::WebUI* web_ui, const GURL& url) |
| html_source->AddResourcePath("logo-small.png", IDR_PRODUCT_LOGO_64); |
| html_source->AddResourcePath("logo-large.png", IDR_PRODUCT_LOGO_128); |
| + Profile* profile = Profile::FromWebUI(web_ui); |
|
Peter Kasting
2017/01/26 21:14:32
Nit: Or just inline this
Patrick Monette
2017/01/26 22:09:13
Done.
|
| content::WebUIDataSource::Add(profile, html_source); |
| } |