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

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

Issue 2659643003: Set kHasSeenWin10PromoPage in local_state instead of in profile prefs. (Closed)
Patch Set: Merge Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d5cc294b2cbe0674e763ee19a2a99fef3d8d9b86..8628e5b9ddecee192e4b66e068fe84d450760de6 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"
@@ -94,10 +95,9 @@ WelcomeWin10UI::WelcomeWin10UI(content::WebUI* web_ui, const GURL& url)
static const char kDefaultFilePath[] = "default.webp";
static const char kPinFilePath[] = "pin.webp";
- 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");
@@ -132,7 +132,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);
- content::WebUIDataSource::Add(profile, html_source);
+ content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
}
WelcomeWin10UI::~WelcomeWin10UI() = default;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698