Commit-Queue | +1 |
actions::ActionManager::Get().FindAction(kActionShowChromeLabs, nullptr);
`nullptr` as a scope action here is probably not correct, but the pinned toolbar configuration is not scoped to a browser (nor should it be) so it's not obvious what should go here.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (ChromeLabsExists()) {
I think we should be doing this regardless of whether chrome labs exists. If the user resets to default in stable we should probably be changing everything (even chrome labs for canary/dev). What do you think?
const bool labs_is_default = !labs_exists || Contains(kActionShowChromeLabs);
I think this should be in the pref whether the action exists or not. We don't update the profile pref based on whether the action exists (since then we would be unpinning chrome labs when a user opens stable when it should still be pinned for canary)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I think we should be doing this regardless of whether chrome labs exists. If the user resets to default in stable we should probably be changing everything (even chrome labs for canary/dev). What do you think?
Oh yeah you're totally right, that makes sense and is also so much simpler!
Done
const bool labs_is_default = !labs_exists || Contains(kActionShowChromeLabs);
I think this should be in the pref whether the action exists or not. We don't update the profile pref based on whether the action exists (since then we would be unpinning chrome labs when a user opens stable when it should still be pinned for canary)
Done
actions::ActionManager::Get().FindAction(kActionShowChromeLabs, nullptr);
`nullptr` as a scope action here is probably not correct, but the pinned toolbar configuration is not scoped to a browser (nor should it be) so it's not obvious what should go here.
This is irrelevant now again, since we no longer care if labs currently exists or not.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Demetrios PTAL at the appearance page changes!
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
LGTM with couple nits.
private toolbarPinningStateChanged_(): void {
this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault().then(
isDefault => {
this.showResetPinnedActionsButton_ = !isDefault;
});
}
Nit: Leverage async/await
```suggestion
private toolbarPinningStateChanged_() {
this.showResetPinnedActionsButton_ = await !this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault();
}
```
});
Instead of relying on the default value harcoded in the test proxy, let's explicitly set the value here?
```
appearanceBrowserProxy.setPinnedToolbarActionsAreDefaultResponse(true);
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change meets the code coverage requirements.
Code-Coverage | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
private toolbarPinningStateChanged_(): void {
this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault().then(
isDefault => {
this.showResetPinnedActionsButton_ = !isDefault;
});
}
Nit: Leverage async/await
```suggestion
private toolbarPinningStateChanged_() {
this.showResetPinnedActionsButton_ = await !this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault();
}
```
Done
Instead of relying on the default value harcoded in the test proxy, let's explicitly set the value here?
```
appearanceBrowserProxy.setPinnedToolbarActionsAreDefaultResponse(true);
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/resources/settings/appearance_page/appearance_page.ts
Insertions: 3, Deletions: 5.
@@ -525,11 +525,9 @@
return !!this.getPref('autogenerated.theme.policy.color').controlledBy;
}
- private toolbarPinningStateChanged_(): void {
- this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault().then(
- isDefault => {
- this.showResetPinnedActionsButton_ = !isDefault;
- });
+ private async toolbarPinningStateChanged_(): Promise<void> {
+ this.showResetPinnedActionsButton_ =
+ !await this.appearanceBrowserProxy_.pinnedToolbarActionsAreDefault();
}
private isSelectedColorSchemeMode_(colorSchemeMode: ColorSchemeMode):
```
[Customize Toolbar] Pin Chrome Labs by default.
Moves the reset logic into PinnedToolbarActionsModel for reuse by the
AppearanceHandler and CustomizeToolbarHandler.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change meets the code coverage requirements.
Code-Coverage | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |