-
Notifications
You must be signed in to change notification settings - Fork 874
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
Fixed first-run dialog is not launched #9849
Conversation
8d7f919
to
d79bc49
Compare
chromium_src/chrome/browser/first_run/first_run_internal_posix.cc
Outdated
Show resolved
Hide resolved
fix brave/brave-browser#17667 With https://bugs.chromium.org/p/chromium/issues/detail?id=1243221, Local State file is created at the startup. When, "Local State" file is already existed ShouldShowFirstRunDialog(). Due to this, dialog is launched ramdomly only when this file is not stored in FS becfore calling ShouldShowFirstRunDialog(). Browser only tries to run this dialog when first_run::IsChromeFirstRun() is true. Checking "Local State" file again is redundant. Removed this checking.
d79bc49
to
6ef17f9
Compare
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
brave_chromium_src_chrome_browser_first_run_deps = [ "//brave/common" ] |
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 file is deleted.
chromium_src/chrome/browser/first_run/first_run_internal_posix.cc
Outdated
Show resolved
Hide resolved
common/brave_paths.h
Outdated
// Use for getting false from base::PathService::Get(). | ||
namespace chrome { | ||
|
||
enum { CHROME_PATH_INVALID = 20000 }; |
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.
deleted.
Merged because |
Fixed first-run dialog is not launched
This reverts commit 0b78f9e, reversing changes made to d260b6a. Reverting because upstream has fixed the first run regression via: https://chromium.googlesource.com/chromium/src.git/+/f9385e0d893916cbb16b477bdec127e56f9897da Cherry-picked into cr94 as https://chromium.googlesource.com/chromium/src/+/3f20e2edeb0adf78a6a9a6208e2e02ad3c7d8810 commit f9385e0d893916cbb16b477bdec127e56f9897da Author: Caitlin Fischer <caitlinfischer@google.com> Date: Mon Aug 30 13:31:02 2021 +0000 Ignore Local State when deciding whether to show the first run dialog. The bug was caused by an experiment that causes Local State to be written to disk during startup (before the first-run-dialog-showing logic is reached) on some clients. Since Local State existed on some clients, the dialog was not shown. However, the first-run-dialog-showing logic should not depend on the presence or absence of a Local State file. This change affects some POSIX platforms running Google Chrome for the first time. This logic being removed was originally added here: https://chromiumcodereview.appspot.com/14946003/. Bug: 1221483
This reverts commit 0b78f9e, reversing changes made to d260b6a. Reverting because upstream has fixed the first run regression via: https://chromium.googlesource.com/chromium/src.git/+/f9385e0d893916cbb16b477bdec127e56f9897da Cherry-picked into cr94 as https://chromium.googlesource.com/chromium/src/+/3f20e2edeb0adf78a6a9a6208e2e02ad3c7d8810 commit f9385e0d893916cbb16b477bdec127e56f9897da Author: Caitlin Fischer <caitlinfischer@google.com> Date: Mon Aug 30 13:31:02 2021 +0000 Ignore Local State when deciding whether to show the first run dialog. The bug was caused by an experiment that causes Local State to be written to disk during startup (before the first-run-dialog-showing logic is reached) on some clients. Since Local State existed on some clients, the dialog was not shown. However, the first-run-dialog-showing logic should not depend on the presence or absence of a Local State file. This change affects some POSIX platforms running Google Chrome for the first time. This logic being removed was originally added here: https://chromiumcodereview.appspot.com/14946003/. Bug: 1221483
This reverts commit 0b78f9e, reversing changes made to d260b6a. Reverting because upstream has fixed the first run regression via: https://chromium.googlesource.com/chromium/src.git/+/f9385e0d893916cbb16b477bdec127e56f9897da Cherry-picked into cr94 as https://chromium.googlesource.com/chromium/src/+/3f20e2edeb0adf78a6a9a6208e2e02ad3c7d8810 commit f9385e0d893916cbb16b477bdec127e56f9897da Author: Caitlin Fischer <caitlinfischer@google.com> Date: Mon Aug 30 13:31:02 2021 +0000 Ignore Local State when deciding whether to show the first run dialog. The bug was caused by an experiment that causes Local State to be written to disk during startup (before the first-run-dialog-showing logic is reached) on some clients. Since Local State existed on some clients, the dialog was not shown. However, the first-run-dialog-showing logic should not depend on the presence or absence of a Local State file. This change affects some POSIX platforms running Google Chrome for the first time. This logic being removed was originally added here: https://chromiumcodereview.appspot.com/14946003/. Bug: 1221483
fix brave/brave-browser#17667
With https://bugs.chromium.org/p/chromium/issues/detail?id=1243221,
Local State file is created at the startup.
When, "Local State" file is already existed ShouldShowFirstRunDialog().
Due to this, dialog is launched ramdomly only when this file is not
stored in FS becfore calling ShouldShowFirstRunDialog().
Browser only tries to run this dialog when first_run::IsChromeFirstRun()
is true. Checking "Local State" file again is redundant. Removed this
checking.
Resolves
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:
`npm run test brave_unit_tests -- --filter=BravePathsTest