-
Notifications
You must be signed in to change notification settings - Fork 904
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 default browser dialog instead of infobar #7716
Conversation
2298e28
to
6e5d73c
Compare
6e5d73c
to
525b234
Compare
@rebron @karenkliu Can you check above test scenario? |
c700f3b
to
bbe22ee
Compare
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.
Looks great!
bbe22ee
to
878366c
Compare
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.
chromium_src
changes ++
585ad58
to
f79544f
Compare
#include <utility> | ||
|
||
#include "base/bind.h" | ||
#include "base/logging.h" |
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.
is it needed? pls double-check for unused headers
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.
Fixed.
class Label; | ||
} // namespace views | ||
|
||
class BraveDefaultBrowserDialogView : public views::DialogDelegateView { |
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.
since recently, I'm pretty paranoid re accessibility properties of views :) It looks good here, but maybe you also could double-check
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 think it's fine because this dialog doesn't introduce new view class.
and did test many times with virtual keyboard on. :)
|
||
PrefService* prefs = profile->GetPrefs(); | ||
// Reset preferences if kResetCheckDefaultBrowser is true. | ||
if (prefs->GetBoolean(prefs::kResetCheckDefaultBrowser)) { |
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.
That's interesting how this is initialized
#if defined(OS_WIN)
reset_check_default = base::win::GetVersion() >= base::win::Version::WIN10;
#endif
registry->RegisterBooleanPref(prefs::kResetCheckDefaultBrowser,
reset_check_default);
not sure whether we need this behavior
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.
This would be helpful when win version is updated and default browser setting is changed.
Then, we want to make Brave as a default again.
Browser will launch window modal dialog at 2nd, 3rd, 4th, 8th and 20th launching if browser is not a default. If browser is changed from default to non-default, browser will launch dialog again with same frequency. fix brave/brave-browser#12203
20ac4f9
to
bdac367
Compare
|
This could bother developers. F/U PR for #7716. fix brave/brave-browser#12203
fix brave/brave-browser#12203
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed).Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on.
Test Plan:
Note If active tab is welcome page, dialog is not visible even if it's 2nd, 3rd, 4th, 8th or 20th launching.