-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show welcome page only at first run #130
Conversation
To add test case for this, brave/brave-browser#264 should be resolved first. |
Just curious if you know why code to remember no welcome page is needed, I'd think this would already be handled by chromium code somewhere. You probably already know but you can test spanning restarts of the app with:
from: https://www.chromium.org/developers/testing/running-tests |
You're right. chromium handles it in each webui controller(WelcomeUI and WelcomeWin10UI) for their URL. After we changed the chromium url to our welcome url from
Yep, I tried to check the tab list state between first run and second run by using spanning test technique. I realized that our browser test should use |
That makes sense, thanks. |
profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, true); | ||
#if defined(OS_WIN) | ||
g_brave_browser_process->local_state()->SetBoolean( | ||
prefs::kHasSeenWin10PromoPage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to set this pref even know we don't want a win10 promo page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that chrome shows this promo page at first run. Then, it shows welcome page at next run.
So, if we doesn't set, we will show our welcome ui at first run and second run.
ok thanks, looks good. Looks like you need to rebase |
Thanks for fast review. |
When welcome page is requested at the first run, store that this profile has been shown the welcome page.
So far, ChromeMainDelegate is used.
welcome ui only should be added at first run.
@bbondy After rebasing on C68, your approving was disappeared :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@emerick Thank you! |
@@ -47,6 +53,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, | |||
if (url.host_piece() == kPaymentsHost || | |||
url.host_piece() == chrome::kChromeUINewTabHost) { | |||
return &NewWebUI<BasicUI>; | |||
} else if (url.spec() == kWelcomeRemoteURL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diracdeltas @bbondy - this isn't directly related to this PR, but I think a remote welcome url is a privacy issue. Is there any reason why it can't be an internal page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed changing to local welcome page but no one has had time to do that yet. Note that browser-laptop is remote too so we have at least baseline parity with that. But we did talk about wanting to move to a local one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like it should be pretty easy to do now that we have a webui for it. Is there a ticket or should I create one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there was but I couldn't find one, so I posted it here:
brave/brave-browser#276
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's the original issue by @flamsmark brave/browser-laptop#12691. i also feel strongly that this should be baked into brave for privacy reasons.
This seems the regression from #130. In that CL, BraveWelcomeUI WebUIController is introduced. Because of this, current welcome ui page treated as webui. This CL could be reverted when our local welcome ui is implemented.
Favicon URL for youtube publishers should now be retrieved properly.
When welcome page is requested at the first run, store that this profile
has been shown the welcome page.
close brave/brave-browser#221
close brave/brave-browser#264
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
--filter BraveWelcomeUIBrowserTest*
Reviewer Checklist: