summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/welcome/welcome_win10.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/welcome/welcome_win10.js')
-rw-r--r--chromium/chrome/browser/resources/welcome/welcome_win10.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/chromium/chrome/browser/resources/welcome/welcome_win10.js b/chromium/chrome/browser/resources/welcome/welcome_win10.js
index a961634a306..91a5bacbc42 100644
--- a/chromium/chrome/browser/resources/welcome/welcome_win10.js
+++ b/chromium/chrome/browser/resources/welcome/welcome_win10.js
@@ -31,18 +31,15 @@ Polymer({
ready: function() {
this.isCombined = false;
- this.isAccelerated = false;
+ this.isAccelerated = loadTimeData.getBoolean('accelerated_flow_enabled');
+ // The accelerated flow can be overridden with a query parameter.
const FLOWTYPE_KEY = 'flowtype';
const FLOW_TYPE_MAP = {'regular': false, 'accelerated': true};
var params = new URLSearchParams(location.search);
if (params.has(FLOWTYPE_KEY)) {
if (params.get(FLOWTYPE_KEY) in FLOW_TYPE_MAP) {
this.isAccelerated = FLOW_TYPE_MAP[params.get(FLOWTYPE_KEY)];
-
- // Adjust the height since the accelerated flow contains fewer steps.
- this.customStyle['--expandable-section-height'] = '26.375em';
- this.updateStyles();
} else {
console.log(
'Found invalid value for the \'flowtype\' parameter: %s',
@@ -50,6 +47,10 @@ Polymer({
}
}
+ // The accelerated flow contains fewer steps. To account for this, toggle
+ // the 'accelerated' class which reduces the height of the steps section.
+ this.classList.toggle('accelerated', this.isAccelerated);
+
// Asynchronously check if Chrome is pinned to the taskbar.
cr.sendWithPromise('getPinnedToTaskbarState')
.then(this.receivePinnedState_.bind(this));