-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
personalization: consolidate loadTimeData.getBoolean
Add new file load_time_booleans.ts and move all loadTimeData.getBoolean accesses into that file. Make all loadTimeData boolean properties consistent as properties on polymer elements. BUG=none TEST=browser_tests --gtest_filter=*PersonalizationApp* Change-Id: If296106f5e1b4269a96dd93041e03141258169c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4211454 Commit-Queue: Jeffrey Young <cowmoo@google.com> Reviewed-by: Jerry Liu <pzliu@chromium.org> Reviewed-by: Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/main@{#1100515}
- Loading branch information
Showing
21 changed files
with
124 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
ash/webui/personalization_app/resources/js/load_time_booleans.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview Getters for all of the loadTimeData booleans used throughout | ||
* personalization app. | ||
* @see //ash/webui/personalization_app/personalization_app_ui.cc | ||
* Export them as functions so they reload the values when overridden in test. | ||
*/ | ||
|
||
import {loadTimeData} from 'chrome://resources/ash/common/load_time_data.m.js'; | ||
|
||
export function isFullScreenPreviewEnabled() { | ||
return loadTimeData.getBoolean('fullScreenPreviewEnabled'); | ||
} | ||
|
||
export function isGooglePhotosIntegrationEnabled() { | ||
return loadTimeData.getBoolean('isGooglePhotosIntegrationEnabled'); | ||
} | ||
|
||
export function isGooglePhotosSharedAlbumsEnabled() { | ||
return loadTimeData.getBoolean('isGooglePhotosSharedAlbumsEnabled'); | ||
} | ||
|
||
export function isDarkLightModeEnabled() { | ||
return loadTimeData.getBoolean('isDarkLightModeEnabled'); | ||
} | ||
|
||
export function isAmbientModeAllowed() { | ||
return loadTimeData.getBoolean('isAmbientModeAllowed'); | ||
} | ||
|
||
export function isRgbKeyboardSupported() { | ||
return loadTimeData.getBoolean('isRgbKeyboardSupported'); | ||
} | ||
|
||
export function isJellyEnabled() { | ||
return loadTimeData.getBoolean('isJellyEnabled'); | ||
} | ||
|
||
export function isScreenSaverPreviewEnabled() { | ||
return loadTimeData.getBoolean('isScreenSaverPreviewEnabled'); | ||
} | ||
|
||
export function isPersonalizationJellyEnabled() { | ||
return loadTimeData.getBoolean('isPersonalizationJellyEnabled'); | ||
} | ||
|
||
export function isAmbientModeManaged() { | ||
return loadTimeData.getBoolean('isAmbientModeManaged'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.