tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 1 | // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 5 | #include "chrome/browser/ui/webui/welcome/welcome_ui.h" |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 6 | |
Jinho Bang | 7ab7a4e | 2018-01-15 14:36:07 | [diff] [blame] | 7 | #include <memory> |
Hector Carmona | 8f2c3cb | 2018-07-12 21:07:58 | [diff] [blame] | 8 | #include <string> |
Jinho Bang | 7ab7a4e | 2018-01-15 14:36:07 | [diff] [blame] | 9 | |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 10 | #include "base/metrics/histogram_macros.h" |
Hector Carmona | c98557a99 | 2018-06-27 17:51:43 | [diff] [blame] | 11 | #include "build/build_config.h" |
Hector Carmona | 82ae5869 | 2018-08-09 22:43:00 | [diff] [blame] | 12 | #include "chrome/browser/favicon/favicon_service_factory.h" |
David Roger | f53a075 | 2018-06-18 14:46:48 | [diff] [blame] | 13 | #include "chrome/browser/signin/account_consistency_mode_manager.h" |
Hector Carmona | 207744f | 2018-10-25 23:49:54 | [diff] [blame] | 14 | #include "chrome/browser/ui/webui/welcome/nux/bookmark_handler.h" |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 15 | #include "chrome/browser/ui/webui/welcome/nux/constants.h" |
| 16 | #include "chrome/browser/ui/webui/welcome/nux/email_handler.h" |
| 17 | #include "chrome/browser/ui/webui/welcome/nux/google_apps_handler.h" |
| 18 | #include "chrome/browser/ui/webui/welcome/nux/set_as_default_handler.h" |
Scott Chen | c74ed76 | 2018-09-21 00:23:16 | [diff] [blame] | 19 | #include "chrome/browser/ui/webui/welcome/nux_helper.h" |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 20 | #include "chrome/browser/ui/webui/welcome/welcome_handler.h" |
tmartino | 6254f47 | 2016-11-21 01:22:56 | [diff] [blame] | 21 | #include "chrome/common/pref_names.h" |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 22 | #include "chrome/grit/browser_resources.h" |
| 23 | #include "chrome/grit/chrome_unscaled_resources.h" |
| 24 | #include "chrome/grit/chromium_strings.h" |
| 25 | #include "chrome/grit/generated_resources.h" |
dpapad | b1f8e9a | 2018-10-18 21:36:08 | [diff] [blame] | 26 | #include "chrome/grit/onboarding_welcome_resources.h" |
| 27 | #include "chrome/grit/onboarding_welcome_resources_map.h" |
tmartino | 6254f47 | 2016-11-21 01:22:56 | [diff] [blame] | 28 | #include "components/prefs/pref_service.h" |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 29 | #include "components/strings/grit/components_strings.h" |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 30 | #include "content/public/browser/web_contents.h" |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 31 | #include "content/public/browser/web_ui_data_source.h" |
tmartino | 7f0818b | 2016-09-27 23:39:07 | [diff] [blame] | 32 | #include "net/base/url_util.h" |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 33 | #include "ui/base/l10n/l10n_util.h" |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 34 | |
Scott Chen | e841488 | 2018-10-30 03:14:35 | [diff] [blame^] | 35 | #if defined(OS_WIN) |
| 36 | #include "base/win/windows_version.h" |
| 37 | #endif |
| 38 | |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 39 | namespace { |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 40 | const bool kIsBranded = |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 41 | #if defined(GOOGLE_CHROME_BUILD) |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 42 | true; |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 43 | #else |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 44 | false; |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 45 | #endif |
Scott Chen | 532ec2c | 2018-09-26 21:50:05 | [diff] [blame] | 46 | } // namespace |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 47 | |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 48 | // TODO(scottchen): reuse instead of copy from |
| 49 | // md_settings_localized_strings_provider.cc. |
| 50 | struct LocalizedString { |
| 51 | const char* name; |
| 52 | int id; |
| 53 | }; |
| 54 | |
| 55 | void AddOnboardingStrings(content::WebUIDataSource* html_source) { |
| 56 | static constexpr LocalizedString kLocalizedStrings[] = { |
| 57 | // Shared strings. |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 58 | {"acceptText", IDS_WELCOME_ACCEPT_BUTTON}, |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 59 | {"bookmarkAdded", IDS_ONBOARDING_WELCOME_BOOKMARK_ADDED}, |
| 60 | {"bookmarkRemoved", IDS_ONBOARDING_WELCOME_BOOKMARK_REMOVED}, |
| 61 | {"bookmarkReplaced", IDS_ONBOARDING_WELCOME_BOOKMARK_REPLACED}, |
Scott Chen | ebfdce73 | 2018-10-26 02:34:26 | [diff] [blame] | 62 | {"getStarted", IDS_ONBOARDING_WELCOME_GET_STARTED}, |
| 63 | {"headerText", IDS_WELCOME_HEADER}, |
| 64 | {"next", IDS_ONBOARDING_WELCOME_NEXT}, |
| 65 | {"noThanks", IDS_NO_THANKS}, |
| 66 | {"skip", IDS_ONBOARDING_WELCOME_SKIP}, |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 67 | |
| 68 | // Sign-in view strings. |
| 69 | {"signInHeader", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_HEADER}, |
| 70 | {"signInSubHeader", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SUB_HEADER}, |
| 71 | {"signIn", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SIGNIN}, |
| 72 | |
| 73 | // Email provider module strings. |
Scott Chen | ebfdce73 | 2018-10-26 02:34:26 | [diff] [blame] | 74 | {"emailProviderTitle", IDS_ONBOARDING_WELCOME_NUX_EMAIL_TITLE}, |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 75 | |
| 76 | // Google apps module strings. |
| 77 | {"googleAppsDescription", |
| 78 | IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_DESCRIPTION}, |
| 79 | |
| 80 | // Set as default module strings. |
| 81 | {"setDefaultHeader", IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_HEADER}, |
| 82 | {"setDefaultSubHeader", |
| 83 | IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SUB_HEADER}, |
| 84 | {"setDefaultSkip", IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SKIP}, |
| 85 | {"setDefaultConfirm", |
| 86 | IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SET_AS_DEFAULT}, |
Scott Chen | 618035d | 2018-10-24 00:48:15 | [diff] [blame] | 87 | |
| 88 | // Landing view strings. |
| 89 | {"landingTitle", IDS_ONBOARDING_WELCOME_LANDING_TITLE}, |
| 90 | {"landingDescription", IDS_ONBOARDING_WELCOME_LANDING_DESCRIPTION}, |
| 91 | {"landingNewUser", IDS_ONBOARDING_WELCOME_LANDING_NEW_USER}, |
| 92 | {"landingExistingUser", IDS_ONBOARDING_WELCOME_LANDING_EXISTING_USER}, |
| 93 | |
| 94 | // Email interstitial strings. |
| 95 | {"emailInterstitialTitle", |
| 96 | IDS_ONBOARDING_WELCOME_EMAIL_INTERSTITIAL_TITLE}, |
| 97 | {"emailInterstitialContinue", |
| 98 | IDS_ONBOARDING_WELCOME_EMAIL_INTERSTITIAL_CONTINUE}, |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | // TODO(scottchen): reuse instead of copy from |
| 102 | // md_settings_localized_strings_provider.cc. |
| 103 | for (size_t i = 0; i < base::size(kLocalizedStrings); i++) { |
| 104 | html_source->AddLocalizedString(kLocalizedStrings[i].name, |
| 105 | kLocalizedStrings[i].id); |
| 106 | } |
| 107 | } |
| 108 | |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 109 | WelcomeUI::WelcomeUI(content::WebUI* web_ui, const GURL& url) |
| 110 | : content::WebUIController(web_ui) { |
tmartino | 7f0818b | 2016-09-27 23:39:07 | [diff] [blame] | 111 | Profile* profile = Profile::FromWebUI(web_ui); |
| 112 | |
| 113 | // This page is not shown to incognito or guest profiles. If one should end up |
| 114 | // here, we return, causing a 404-like page. |
| 115 | if (!profile || |
| 116 | profile->GetProfileType() != Profile::ProfileType::REGULAR_PROFILE) { |
| 117 | return; |
| 118 | } |
| 119 | |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 120 | StorePageSeen(profile); |
tmartino | 6254f47 | 2016-11-21 01:22:56 | [diff] [blame] | 121 | |
Jinho Bang | 7ab7a4e | 2018-01-15 14:36:07 | [diff] [blame] | 122 | web_ui->AddMessageHandler(std::make_unique<WelcomeHandler>(web_ui)); |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 123 | |
| 124 | content::WebUIDataSource* html_source = |
| 125 | content::WebUIDataSource::Create(url.host()); |
| 126 | |
David Roger | f53a075 | 2018-06-18 14:46:48 | [diff] [blame] | 127 | bool is_dice = |
| 128 | AccountConsistencyModeManager::IsDiceEnabledForProfile(profile); |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 129 | |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 130 | // There are multiple possible configurations that affects the layout, but |
| 131 | // first add resources that are shared across all layouts. |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 132 | html_source->AddResourcePath("logo.png", IDR_PRODUCT_LOGO_128); |
| 133 | html_source->AddResourcePath("logo2x.png", IDR_PRODUCT_LOGO_256); |
Scott Chen | a126445 | 2017-11-14 13:32:08 | [diff] [blame] | 134 | |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 135 | if (nux::IsNuxOnboardingEnabled(profile)) { |
Scott Chen | c74ed76 | 2018-09-21 00:23:16 | [diff] [blame] | 136 | // Add Onboarding welcome strings. |
Scott Chen | 395516b | 2018-10-23 00:05:48 | [diff] [blame] | 137 | AddOnboardingStrings(html_source); |
Scott Chen | c74ed76 | 2018-09-21 00:23:16 | [diff] [blame] | 138 | |
dpapad | b1f8e9a | 2018-10-18 21:36:08 | [diff] [blame] | 139 | // Add all Onboarding resources. |
| 140 | for (size_t i = 0; i < kOnboardingWelcomeResourcesSize; ++i) { |
| 141 | html_source->AddResourcePath(kOnboardingWelcomeResources[i].name, |
| 142 | kOnboardingWelcomeResources[i].value); |
| 143 | } |
Scott Chen | aac2e18 | 2018-10-23 01:49:44 | [diff] [blame] | 144 | |
| 145 | // chrome://welcome |
Scott Chen | c74ed76 | 2018-09-21 00:23:16 | [diff] [blame] | 146 | html_source->SetDefaultResource( |
| 147 | IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_HTML); |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 148 | |
Scott Chen | aac2e18 | 2018-10-23 01:49:44 | [diff] [blame] | 149 | // chrome://welcome/email-interstitial |
| 150 | html_source->AddResourcePath( |
| 151 | "email-interstitial", |
| 152 | IDR_WELCOME_ONBOARDING_WELCOME_EMAIL_INTERSTITIAL_HTML); |
| 153 | |
Scott Chen | d92e6ff | 2018-10-16 23:54:39 | [diff] [blame] | 154 | html_source->AddResourcePath( |
| 155 | "images/background_svgs/blue_circle.svg", |
| 156 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_BLUE_CIRCLE_SVG); |
| 157 | html_source->AddResourcePath( |
| 158 | "images/background_svgs/green_rectangle.svg", |
| 159 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREEN_RECTANGLE_SVG); |
| 160 | html_source->AddResourcePath( |
| 161 | "images/background_svgs/grey_oval.svg", |
| 162 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_OVAL_SVG); |
| 163 | html_source->AddResourcePath( |
| 164 | "images/background_svgs/grey_rounded_rectangle.svg", |
| 165 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_ROUNDED_RECTANGLE_SVG); |
| 166 | html_source->AddResourcePath( |
| 167 | "images/background_svgs/red_triangle.svg", |
| 168 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_RED_TRIANGLE_SVG); |
| 169 | html_source->AddResourcePath( |
| 170 | "images/background_svgs/yellow_dots.svg", |
| 171 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_DOTS_SVG); |
| 172 | html_source->AddResourcePath( |
| 173 | "images/background_svgs/yellow_semicircle.svg", |
| 174 | IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_SEMICIRCLE_SVG); |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 175 | |
Scott Chen | ebfdce73 | 2018-10-26 02:34:26 | [diff] [blame] | 176 | html_source->AddResourcePath("images/email_provider_1x.png", |
| 177 | IDR_NUX_EMAIL_PROVIDER_LOGO_1X); |
| 178 | html_source->AddResourcePath("images/email_provider_2x.png", |
| 179 | IDR_NUX_EMAIL_PROVIDER_LOGO_2X); |
| 180 | html_source->AddResourcePath("images/set_as_default_1x.png", |
| 181 | IDR_NUX_SET_AS_DEFAULT_LOGO_1X); |
| 182 | html_source->AddResourcePath("images/set_as_default_2x.png", |
| 183 | IDR_NUX_SET_AS_DEFAULT_LOGO_2X); |
| 184 | html_source->AddResourcePath("images/set_as_default_illustration_1x.png", |
| 185 | IDR_NUX_SET_AS_DEFAULT_ILLUSTRATION_1X); |
| 186 | html_source->AddResourcePath("images/set_as_default_illustration_2x.png", |
| 187 | IDR_NUX_SET_AS_DEFAULT_ILLUSTRATION_2X); |
| 188 | |
Scott Chen | e841488 | 2018-10-30 03:14:35 | [diff] [blame^] | 189 | #if defined(OS_WIN) |
| 190 | html_source->AddBoolean( |
| 191 | "is_win10", base::win::GetVersion() >= base::win::VERSION_WIN10); |
| 192 | #endif |
| 193 | |
Hector Carmona | 207744f | 2018-10-25 23:49:54 | [diff] [blame] | 194 | // Add the shared bookmark handler for onboarding modules. |
| 195 | web_ui->AddMessageHandler( |
| 196 | std::make_unique<nux::BookmarkHandler>(profile->GetPrefs())); |
Hector Carmona | 207744f | 2018-10-25 23:49:54 | [diff] [blame] | 197 | |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 198 | // Add email provider bookmarking onboarding module. |
| 199 | web_ui->AddMessageHandler(std::make_unique<nux::EmailHandler>( |
Hector Carmona | 207744f | 2018-10-25 23:49:54 | [diff] [blame] | 200 | FaviconServiceFactory::GetForProfile( |
| 201 | profile, ServiceAccessType::EXPLICIT_ACCESS))); |
| 202 | nux::EmailHandler::AddSources(html_source); |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 203 | |
| 204 | // Add google apps bookmarking onboarding module. |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 205 | web_ui->AddMessageHandler(std::make_unique<nux::GoogleAppsHandler>( |
Hector Carmona | 207744f | 2018-10-25 23:49:54 | [diff] [blame] | 206 | FaviconServiceFactory::GetForProfile( |
| 207 | profile, ServiceAccessType::EXPLICIT_ACCESS))); |
| 208 | nux::GoogleAppsHandler::AddSources(html_source); |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 209 | |
| 210 | // Add set-as-default onboarding module. |
| 211 | web_ui->AddMessageHandler(std::make_unique<nux::SetAsDefaultHandler>()); |
Scott Chen | c74ed76 | 2018-09-21 00:23:16 | [diff] [blame] | 212 | } else if (kIsBranded && is_dice) { |
| 213 | // Use special layout if the application is branded and DICE is enabled. |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 214 | html_source->AddLocalizedString("headerText", IDS_WELCOME_HEADER); |
Thomas Tangl | 441b0678 | 2018-09-27 19:37:07 | [diff] [blame] | 215 | html_source->AddLocalizedString("acceptText", |
| 216 | IDS_PROFILES_DICE_SIGNIN_BUTTON); |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 217 | html_source->AddLocalizedString("secondHeaderText", |
| 218 | IDS_DICE_WELCOME_SECOND_HEADER); |
| 219 | html_source->AddLocalizedString("descriptionText", |
| 220 | IDS_DICE_WELCOME_DESCRIPTION); |
| 221 | html_source->AddLocalizedString("declineText", |
| 222 | IDS_DICE_WELCOME_DECLINE_BUTTON); |
Mihai Sardarescu | 631f3b47 | 2018-05-04 15:08:15 | [diff] [blame] | 223 | html_source->AddResourcePath("welcome_browser_proxy.html", |
| 224 | IDR_DICE_WELCOME_BROWSER_PROXY_HTML); |
| 225 | html_source->AddResourcePath("welcome_browser_proxy.js", |
| 226 | IDR_DICE_WELCOME_BROWSER_PROXY_JS); |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 227 | html_source->AddResourcePath("welcome_app.html", IDR_DICE_WELCOME_APP_HTML); |
| 228 | html_source->AddResourcePath("welcome_app.js", IDR_DICE_WELCOME_APP_JS); |
Scott Chen | a126445 | 2017-11-14 13:32:08 | [diff] [blame] | 229 | html_source->AddResourcePath("welcome.css", IDR_DICE_WELCOME_CSS); |
| 230 | html_source->SetDefaultResource(IDR_DICE_WELCOME_HTML); |
| 231 | } else { |
Mihai Sardarescu | 631f3b47 | 2018-05-04 15:08:15 | [diff] [blame] | 232 | // Use default layout for non-DICE or unbranded build. |
| 233 | std::string value; |
| 234 | bool is_everywhere_variant = |
| 235 | (net::GetValueForKeyInQuery(url, "variant", &value) && |
| 236 | value == "everywhere"); |
| 237 | |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 238 | if (kIsBranded) { |
| 239 | base::string16 subheader = |
| 240 | is_everywhere_variant |
| 241 | ? base::string16() |
| 242 | : l10n_util::GetStringUTF16(IDS_WELCOME_SUBHEADER); |
| 243 | html_source->AddString("subheaderText", subheader); |
| 244 | } |
| 245 | |
| 246 | int header_id = is_everywhere_variant ? IDS_WELCOME_HEADER_AFTER_FIRST_RUN |
| 247 | : IDS_WELCOME_HEADER; |
| 248 | html_source->AddString("headerText", l10n_util::GetStringUTF16(header_id)); |
Thomas Tangl | 441b0678 | 2018-09-27 19:37:07 | [diff] [blame] | 249 | html_source->AddLocalizedString("acceptText", IDS_WELCOME_ACCEPT_BUTTON); |
Scott Chen | c670667 | 2017-11-17 17:40:27 | [diff] [blame] | 250 | html_source->AddLocalizedString("descriptionText", IDS_WELCOME_DESCRIPTION); |
| 251 | html_source->AddLocalizedString("declineText", IDS_WELCOME_DECLINE_BUTTON); |
Scott Chen | a126445 | 2017-11-14 13:32:08 | [diff] [blame] | 252 | html_source->AddResourcePath("welcome.js", IDR_WELCOME_JS); |
| 253 | html_source->AddResourcePath("welcome.css", IDR_WELCOME_CSS); |
| 254 | html_source->SetDefaultResource(IDR_WELCOME_HTML); |
| 255 | } |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 256 | |
tmartino | e3f9c38e | 2016-09-13 14:05:32 | [diff] [blame] | 257 | content::WebUIDataSource::Add(profile, html_source); |
| 258 | } |
| 259 | |
| 260 | WelcomeUI::~WelcomeUI() {} |
Hector Carmona | 8f2c3cb | 2018-07-12 21:07:58 | [diff] [blame] | 261 | |
Scott Chen | f68c9b2 | 2018-10-12 02:15:25 | [diff] [blame] | 262 | void WelcomeUI::StorePageSeen(Profile* profile) { |
Hector Carmona | 8f2c3cb | 2018-07-12 21:07:58 | [diff] [blame] | 263 | // Store that this profile has been shown the Welcome page. |
| 264 | profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, true); |
| 265 | } |