Skip to content

Chrome OS Full Restore Feature

DennisL edited this page Nov 14, 2020 · 1 revision

CL: 2525462 - Add the On Startup page in OS settings for the full restore feature.

This CL implements the On Startup page hidden by the FullRestore flag per the ui review deck: go/cros-full-restore (page 28)

Design doc: go/chrome-os-full-restore-dd


Enabling

  • Set the 'Restore on Startup' option to:

    • OS_SETTINGS_ON_STARTUP_ALWAYS ................... - checkbox which allows the user to configure the restore apps and pages options on startup.
    • OS_SETTINGS_ON_STARTUP_ASK_EVERY_TIME . - checkbox which enables the always restore apps and pages option on startup.
    • OS_SETTINGS_ON_STARTUP_DO_NOT_RESTORE - checkbox which enables the do not restore option, which means not restore apps or pages on startup.

  <!-- On Startup section. -->
  <message name="IDS_OS_SETTINGS_TAG_ON_STARTUP" desc="Text for search result item which, when clicked, navigates the user to On Startup settings, with a radio group to configure the restore apps and pages options">
    On Startup
  </message>
  <message name="IDS_OS_SETTINGS_TAG_RESTORE_APPS_AND_PAGES" desc="Text for search result item which, when clicked, navigates the user to On Startup settings, with a radio group to configure the restore apps and pages options">
    Restore apps and pages
  </message>

p/o: chrome/app/os_settings_strings.grdp

  <!-- On Startup (OS settings) -->
  <message name="IDS_OS_SETTINGS_ON_STARTUP" desc="Name of the settings page which displays On Startup preferences, with a radio group to configure the restore apps and pages options">
    On Startup
  </message>
  <message name="IDS_OS_SETTINGS_ON_STARTUP_RADIO_GROUP_TITLE" desc="The title of the radio group that allows the user to configure the restore apps and pages options on startup.">
    Restore apps and pages
  </message>
  <message name="IDS_OS_SETTINGS_ON_STARTUP_ALWAYS" desc="Label for the checkbox which enables the always restore apps and pages option on startup.">
    Always
  </message>
  <message name="IDS_OS_SETTINGS_ON_STARTUP_ASK_EVERY_TIME" desc="Label for the checkbox which enables the ask every time option to show a notification on startup to give the user a choice for the restoration.">
    Ask every time
  </message>
  <message name="IDS_OS_SETTINGS_ON_STARTUP_DO_NOT_RESTORE" desc="Label for the checkbox which enables the do not restore option, which means not restore apps or pages on startup.">
    Do not restore
  </message>

p/o: chrome/browser/resources/settings/chromeos/on_startup_page/on_startup_page.html

<dom-module id="settings-on-startup-page">
  <template>
    <style include="settings-shared"></style>
    <settings-animated-pages id="pages" section="onstartup"
        focus-config="[[focusConfig_]]">
      <div route-path="default">
        <div class="settings-box" aria-hidden="true">
            $i18n{onStartupRadioGroundTitle}
        </div>
        <div class="settings-box continuation embedded">
          <settings-radio-group id="onStartupRadioGroup"
              pref="{{prefs.settings.restore_apps_and_pages}}"
              group-aria-label="$i18n{onStartupRadioGroundTitle}"
              deep-link-focus-id$="[[Setting.kRestoreAppsAndPages]]">
            <controlled-radio-button
                id="onStartupAlways"
                name="[[getName_(prefValues_.ALWAYS)]]"
                pref="[[prefs.settings.restore_apps_and_pages]]"
                label="$i18n{onStartupAlways}">
            </controlled-radio-button>
            <controlled-radio-button
                id="onStartupAskEveryTime"
                name="[[getName_(prefValues_.ASK_EVERY_TIME)]]"
                pref="[[prefs.settings.restore_apps_and_pages]]"
                label="$i18n{onStartupAskEveryTime}">
            </controlled-radio-button>
            <controlled-radio-button
                id="onStartupDoNotRestore"
                name="[[getName_(prefValues_.DO_NOT_RESTORE)]]"
                pref="[[prefs.settings.restore_apps_and_pages]]"
                label="$i18n{onStartupDoNotRestore}">
            </controlled-radio-button>
          </settings-radio-group>
        </div>
      </div>
    </settings-animated-pages>
  </template>
  <script src="on_startup_page.js"></script>
</dom-module>

Targetted version: 89.0.4325.0 by enabling flag chrome://os-settings#FullRestore