|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by msw Modified:
3 years, 11 months ago Reviewers:
James Cook CC:
chromium-reviews, kalyank, sadrul, varkha Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionLoad shelf preferences from ChromeLauncherController::AttachProfile.
Load prefs on AttachProfile for initialization and user changes.
( the previous ActiveUserChanged call only addressed user changes )
BUG=679208
TEST=Shelf preferences are respected on login/startup.
R=jamescook@chromium.org
Review-Url: https://codereview.chromium.org/2640023005
Cr-Commit-Position: refs/heads/master@{#444625}
Committed: https://chromium.googlesource.com/chromium/src/+/185ea388249bc19676a7f44a12d6fe0881fb0957
Patch Set 1 #Patch Set 2 : Cleanup; Avoid no-op DictionaryPrefUpdate notifications. #
Total comments: 2
Patch Set 3 : Revert SetPerDisplayPref change. #
Messages
Total messages: 23 (15 generated)
Description was changed from ========== Load shelf preferences from ChromeLauncherController::AttachProfile. BUG=679208 ========== to ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) Also avoid DictionaryPrefUpdate's notifications for unchanged prefs. ( may relate to infinite SetAutoHideBehavior updates http://crbug.com/665093 ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ==========
msw@chromium.org changed reviewers: + jamescook@chromium.org
The CQ bit was checked by msw@chromium.org to run a CQ dry run
Description was changed from ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) Also avoid DictionaryPrefUpdate's notifications for unchanged prefs. ( may relate to infinite SetAutoHideBehavior updates http://crbug.com/665093 ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ========== to ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) Also avoid DictionaryPrefUpdate's notifications for unchanged prefs. ( may relate to infinite SetAutoHideBehavior http://crbug.com/665093 ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ==========
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Hey James, please take a look; thanks! I'm working on a test, but that may come in a followup.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Do you have any idea why this regressed? I'm a little surprised the old code worked (just updating on active user change). https://codereview.chromium.org/2640023005/diff/20001/chrome/browser/ui/ash/c... File chrome/browser/ui/ash/chrome_launcher_prefs.cc (right): https://codereview.chromium.org/2640023005/diff/20001/chrome/browser/ui/ash/c... chrome/browser/ui/ash/chrome_launcher_prefs.cc:127: shelf_prefs->Set(key, pref_dictionary); Do we rely on this side-effect to create the new prefs dictionary for a new display? It looks like maybe if there's a pref with the same name on the primary display, if you early-exit on GetPerDisplayPref then it might not create the new dictionary.
On 2017/01/19 01:54:25, James Cook wrote: > Do you have any idea why this regressed? I'm a little surprised the old code > worked (just updating on active user change). I don't know for sure, but this might have regressed with my change three months ago! https://codereview.chromium.org/2391253004 I'll have to do some investigation before merging the fix... https://codereview.chromium.org/2640023005/diff/20001/chrome/browser/ui/ash/c... File chrome/browser/ui/ash/chrome_launcher_prefs.cc (right): https://codereview.chromium.org/2640023005/diff/20001/chrome/browser/ui/ash/c... chrome/browser/ui/ash/chrome_launcher_prefs.cc:127: shelf_prefs->Set(key, pref_dictionary); On 2017/01/19 01:54:25, James Cook wrote: > Do we rely on this side-effect to create the new prefs dictionary for a new > display? > > It looks like maybe if there's a pref with the same name on the primary display, > if you early-exit on GetPerDisplayPref then it might not create the new > dictionary. Hmm, good question... it would probably be more prudent to only bail if the specific per-display preference is already set to the supplied value... I'll try to work on this tonight or tomorrow, but I'll be on the road to Tahoe and probably taking off a day or two.
Friendly reminder: M57 branch is tomorrow and this seems like a fix we definitely want in M57. You might want to keep things small so you can backport it.
I reverted the SetPerDisplayPref change; please take another look.
The CQ bit was checked by msw@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM. You might want to update the CL description. Thanks for jumping on this!
Description was changed from ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) Also avoid DictionaryPrefUpdate's notifications for unchanged prefs. ( may relate to infinite SetAutoHideBehavior http://crbug.com/665093 ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ========== to ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by msw@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484796768259610,
"parent_rev": "453979e27c501fba94dc3156b753235f1ba8c57e", "commit_rev":
"185ea388249bc19676a7f44a12d6fe0881fb0957"}
Message was sent while issue was closed.
Description was changed from ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org ========== to ========== Load shelf preferences from ChromeLauncherController::AttachProfile. Load prefs on AttachProfile for initialization and user changes. ( the previous ActiveUserChanged call only addressed user changes ) BUG=679208 TEST=Shelf preferences are respected on login/startup. R=jamescook@chromium.org Review-Url: https://codereview.chromium.org/2640023005 Cr-Commit-Position: refs/heads/master@{#444625} Committed: https://chromium.googlesource.com/chromium/src/+/185ea388249bc19676a7f44a12d6... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/185ea388249bc19676a7f44a12d6... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
