Commit 3d2d8991 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[unified-consent] Update sync confirmation dialog

The layout and the strings of the sync confirmation
dialog and the consent bump are updated to match the
mocks under:
https://gallery.googleplex.com/projects/MCHbtQVoQ2HCZWnUS9sdsb0Q/files/MCHtA7U1iMGr6xZArjQ0C0km5svyrm3ZWaI

Main changes:
 - Add new illustration on top of the dialog.
 - Add account picture.
 - Add settings button.
 - Update/add strings.

Screenshot of sync confirmation dialog:
https://drive.google.com/file/d/1hLL7JijPMqId63Emst_-Neap5YzksjDU/view?usp=sharing
Screenshots of consent bump:
https://drive.google.com/file/d/1YIUwtY421r5kCeowUIWXmurHKoO4-J0r/view?usp=sharing
https://drive.google.com/file/d/1DbNOb9TJsrnkvZLsRHNiP2xZH-BCGYwi/view?usp=sharing

Bug: 823967, 819909, 801342
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ic3da556e78b9d22ac1eececed599da8743fd2f17
Reviewed-on: https://chromium-review.googlesource.com/1021812Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561425}
parent 4024aad3
......@@ -7217,7 +7217,10 @@ I don't think this site should be blocked!
You've turned on Sync
</message>
<message name="IDS_SYNC_CONFIRMATION_UNITY_TITLE" desc="Title of the sync confirmation dialog in the tab modal signin flow when Unity is enabled">
Get even more from Chrome
Get Google smarts in Chrome
</message>
<message name="IDS_SYNC_CONFIRMATION_UNITY_CONSENT_BUMP_TITLE" desc="Title of the sync consent bump in the tab modal signin flow when Unity is enabled">
Get more Google smarts
</message>
<message name="IDS_SYNC_CONFIRMATION_UNITY_MORE_OPTIONS_BUTTON_LABEL" desc="Label of the sync confirmation button to show more options">
More options
......@@ -7258,7 +7261,7 @@ I don't think this site should be blocked!
Your bookmarks, history, passwords, and other settings will be synced to your Google Account so you can use them on all your devices
</message>
<message name="IDS_SYNC_CONFIRMATION_DICE_CHROME_SYNC_MESSAGE" desc="Body of the chrome sync section of the sync confirmation dialog in the tab modal signin flow">
Sync your bookmarks, passwords, and history on all your devices
Your bookmarks, passwords, history, and more on all your devices
</message>
<message name="IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_TITLE" desc="Title of the personalize services section of the sync confirmation dialog in the tab modal signin flow" formatter_data="android_java">
Personalize Google services
......@@ -7267,13 +7270,13 @@ I don't think this site should be blocked!
Google may use your browsing history to personalize Search, ads, and other Google services
</message>
<message name="IDS_SYNC_CONFIRMATION_DICE_PERSONALIZE_SERVICES_BODY" desc="Body of the personalize services section of the sync confirmation dialog in the tab modal signin flow">
Get more personalized experiences, such as better content suggestions and smarter Translate
Personalized Google services like Google Pay
</message>
<message name="IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_BODY_CHILD_ACCOUNT" desc="Body of the personalize services section of the sync confirmation dialog in the tab modal signin flow for child accounts" formatter_data="android_java">
Google may use your browsing history to personalize Search and other Google services
</message>
<message name="IDS_SYNC_CONFIRMATION_DICE_GOOGLE_SERVICES_BODY" desc="Body of the google services section of the sync confirmation dialog in the tab modal signin flow">
Bring powerful Google services like spell check and tap to search to Chrome
Improve Chrome and its security by sending system and usage information to Google
</message>
<message name="IDS_SYNC_CONFIRMATION_SYNC_SETTINGS_LINK_BODY" desc="Label of the section containing the link to go to the sync setting page.">
Want to manage sync and personalization before they’re turned on? Visit <ph name="BEGIN_LINK">&lt;a id="settingsLink" href="chrome://settings"&gt;</ph>Settings<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>.
......@@ -7282,7 +7285,7 @@ I don't think this site should be blocked!
You can customize what information Google collects in <ph name="BEGIN_LINK">&lt;a id="settingsLink" href="chrome://settings"&gt;</ph>Settings<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph> anytime.
</message>
<message name="IDS_SYNC_CONFIRMATION_DICE_SYNC_SETTINGS_DESCRIPTION" desc="Body of the personalize services section of the sync confirmation dialog in the tab modal signin flow for child accounts">
Google may use your browsing activity, content on some sites you visit, and other browser interactions to personalize Chrome and other Google services like Translate, Search, and ads.
Google may use content on sites you visit and browsing activity and interactions to personalize Chrome and other Google services like Translate, Search, and ads. You can customize this in Settings.
</message>
<message name="IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL" desc="Label of the confirmation button in the sync confirmation dialog of the tab modal signin flow">
Ok, got it
......@@ -7293,8 +7296,8 @@ I don't think this site should be blocked!
<message name="IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL" desc="Label of the undo button in the sync confirmation dialog of the tab modal signin flow">
Undo
</message>
<message name="IDS_SYNC_CONFIRMATION_DICE_UNDO_BUTTON_LABEL" desc="Label of the undo button in the sync confirmation dialog of the tab modal signin flow">
No thanks
<message name="IDS_SYNC_CONFIRMATION_DICE_SETTINGS_BUTTON_LABEL" desc="Label of the button in the sync confirmation dialog of the tab modal signin flow to open settings">
Settings
</message>
<!--- Sync Confirmation section of the tab modal signin flow when sync is disabled by policy -->
......
......@@ -23,6 +23,7 @@ js_library("sync_confirmation_app") {
deps = [
":sync_confirmation_browser_proxy",
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js:load_time_data",
]
}
......
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 168"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#4285f4;}.cls-3{fill:#e8e9eb;}.cls-4{fill:#f4f4f4;}.cls-5{fill:#bdc0c5;}.cls-6{fill:#34a751;}.cls-7{fill:#f7bb2a;}</style></defs><title>confirmation@1x</title><path class="cls-1" d="M256,89a41,41,0,0,0-41,39.13H297A41,41,0,0,0,256,89Z"/><path class="cls-2" d="M97.76,72H103c0-10.83,2.9-19.34,8.63-25.3,9-9.37,22.15-9.41,22.28-9.41L134,32c-.62,0-15.32,0-25.84,10.91C101.37,49.9,97.76,59.69,97.76,72Z"/><path class="cls-3" d="M82.41,102.42A35.27,35.27,0,0,1,67,106.75V112a40.36,40.36,0,0,0,18-5c8.23-4.61,18-14.42,18-35H97.76C97.76,86.48,92.6,96.71,82.41,102.42Z"/><path class="cls-3" d="M143.78,33.27v5.33h7.41a6.35,6.35,0,0,1-2.77,4.15,8.28,8.28,0,0,1-12.36-4.35h0a8.29,8.29,0,0,1,7.71-10.91A7.52,7.52,0,0,1,149,29.54L153,25.59A13.22,13.22,0,0,0,143.78,22a13.75,13.75,0,0,0-12.3,7.6,13.64,13.64,0,0,0,0,12.35h0a13.76,13.76,0,0,0,12.3,7.59,13.15,13.15,0,0,0,9.12-3.33A13.46,13.46,0,0,0,157,36.09a15.82,15.82,0,0,0-.25-2.82Z"/><path class="cls-3" d="M433,109h18v-8.48A11,11,0,0,0,433,109Z"/><path class="cls-3" d="M491,59.49H460.8a5.6,5.6,0,0,0-5.59,5.59v72.36A5.6,5.6,0,0,0,460.8,143H491a5.6,5.6,0,0,0,5.59-5.59V65.08A5.6,5.6,0,0,0,491,59.49Zm4.89,77.95a4.89,4.89,0,0,1-4.89,4.89H460.8a4.89,4.89,0,0,1-4.89-4.89V65.08a4.89,4.89,0,0,1,4.89-4.89H491a4.89,4.89,0,0,1,4.89,4.89Z"/><path class="cls-3" d="M418.43,92.8c6.1-10.92,17.06-16.46,32.56-16.46V70.72c-22,0-32.53,10.52-37.46,19.34a43.35,43.35,0,0,0-5.36,19.27h5.62A37.88,37.88,0,0,1,418.43,92.8Z"/><path class="cls-3" d="M342,50.45a9.28,9.28,0,0,1-8.17-4.86l-9.38-16.21A21.84,21.84,0,0,0,321,40.92a21,21,0,0,0,17.56,20.86l7-11.94A10.66,10.66,0,0,1,342,50.45Z"/><path class="cls-3" d="M347.91,33.67A9.58,9.58,0,0,1,351.45,41a8.47,8.47,0,0,1-1.28,4.61L340.66,62h1.26a20.93,20.93,0,0,0,15.21-6.49h-2.81a8.64,8.64,0,0,1,7.82-8.6,20.8,20.8,0,0,0,.87-5.82,21.63,21.63,0,0,0-1.23-7.35Z"/><path class="cls-3" d="M342,31.55l18.69.07a20.52,20.52,0,0,0-13.78-11A50.49,50.49,0,0,0,341,.16L341,0h-6c.6.9,1.14,1.79,1.62,2.67A44.81,44.81,0,0,1,341.83,20a20.87,20.87,0,0,0-15.94,7.49l6.88,12A9.47,9.47,0,0,1,342,31.55Z"/><circle class="cls-3" cx="342" cy="41" r="7.35" transform="translate(299.63 382.83) rotate(-89.77)"/><path class="cls-3" d="M258.56,166.88A37.06,37.06,0,0,1,221.77,144H226v-8.48a11,11,0,0,0-6.86-2.51c0-.16,0-.32,0-.48a37,37,0,0,1,34.36-39.47l-.07-1a38,38,0,0,0-35.29,40.53c0,.15,0,.3,0,.45A11,11,0,0,0,208,144h12.68a38,38,0,0,0,73.21-11.35l-1-.07A37,37,0,0,1,258.56,166.88Z"/><path class="cls-4" d="M62.72,48.5H0v88.33H67.51V53.28A4.78,4.78,0,0,0,62.72,48.5Z"/><path class="cls-5" d="M68,53.28A5.3,5.3,0,0,0,62.72,48H0v1H62.72A4.28,4.28,0,0,1,67,53.28v83.06H0v1H68Z"/><rect class="cls-5" y="143.01" width="86" height="0.99"/><path class="cls-5" d="M451.72,139.1V63.73a7.9,7.9,0,0,1,7.89-7.89h25.07v-.7H459.62a8.6,8.6,0,0,0-8.6,8.59V139.1a8.6,8.6,0,0,0,8.6,8.59H472V147H459.62A7.9,7.9,0,0,1,451.72,139.1Z"/><path class="cls-5" d="M495.22,55.55v.75a7.9,7.9,0,0,1,5.26,7.43V139.1a7.9,7.9,0,0,1-7.89,7.89H480.2v.7h12.39a8.6,8.6,0,0,0,8.6-8.59V63.73A8.61,8.61,0,0,0,495.22,55.55Z"/><path class="cls-6" d="M499.48,7.6c-11.6,11.7-11.6,28-11.59,28.74,0,.15,0,14.78-10,24.78-6.34,6.37-15.38,9.6-26.89,9.6v5.62c13.08,0,23.48-3.8,30.91-11.3,11.6-11.7,11.6-28,11.59-28.74,0-.15,0-14.78,10-24.78A29.73,29.73,0,0,1,512,5.58V0h-1.28A35.46,35.46,0,0,0,499.48,7.6Z"/><path class="cls-1" d="M62.56,99.28a11.77,11.77,0,0,0-9.48,5,7.42,7.42,0,0,0-2.7-.52c-4.49,0-8.12,4-8.12,9H74.75C74.75,105.3,69.29,99.28,62.56,99.28Z"/><path class="cls-5" d="M68,70v.53a8.35,8.35,0,0,1,8.44,7.94H68V79h9v-.26A8.88,8.88,0,0,0,68,70Z"/><path class="cls-5" d="M166.5,81a2,2,0,0,1,2-2h4.72V77a2.55,2.55,0,0,1,5.11,0V79h.49V77a3,3,0,0,0-6.09,0v1.44h-4.23A2.48,2.48,0,0,0,166,81v4.5h.49Z"/><path class="cls-5" d="M187,85.19h-1.43V81A2.49,2.49,0,0,0,183,78.48h-3.25V79H183a2,2,0,0,1,2,2v4.72H187a2.55,2.55,0,0,1,0,5.11H185v.49H187a3,3,0,0,0,0-6.09Z"/><path class="cls-5" d="M185,95.52a2,2,0,0,1-2,2h-4V96.08a3.27,3.27,0,0,0-6.54,0V98H173V96.08a2.78,2.78,0,0,1,5.56,0V98H183a2.49,2.49,0,0,0,2.48-2.48V92.26H185Z"/><path class="cls-5" d="M166.49,95.52v-4h1.43a3.27,3.27,0,1,0,0-6.54h-.24v.49h.24a2.78,2.78,0,0,1,0,5.56H166v4.5A2.49,2.49,0,0,0,168.48,98h3v-.49h-3A2,2,0,0,1,166.49,95.52Z"/><path class="cls-5" d="M231.5,32.3V47.11h2.64V32.3Zm2.15,14.32H232V32.79h1.66Z"/><path class="cls-5" d="M234.61,28H207.39A2.4,2.4,0,0,0,205,30.39v3.1h.49v-3.1a1.9,1.9,0,0,1,1.9-1.9h27.21a1.9,1.9,0,0,1,1.9,1.9V49a1.9,1.9,0,0,1-1.9,1.9H207.39a1.9,1.9,0,0,1-1.9-1.9V42.48l1.87,2.58,2.14-1.55-2.13-2.93,3.44-1.12L210,36.95l-3.43,1.11V34.44H205v.49h1.07v3.8l3.61-1.17.51,1.57-3.62,1.17,2.24,3.08-1.34,1L205,41v8a2.4,2.4,0,0,0,2.39,2.39h27.21A2.4,2.4,0,0,0,237,49V30.39A2.4,2.4,0,0,0,234.61,28Z"/><path class="cls-5" d="M219.68,34.44v3.62l-3.43-1.11-.82,2.51,3.44,1.12-2.13,2.93,2.14,1.55L221,42.14l2.12,2.92,2.14-1.55-2.13-2.93,3.44-1.12-.82-2.51-3.43,1.11V34.44Zm5.75,3.13.51,1.57-3.61,1.17,2.24,3.08-1.34,1L221,41.31l-2.23,3.06-1.34-1,2.24-3.08-3.62-1.17.51-1.57,3.61,1.17v-3.8h1.66v3.8Z"/><polygon class="cls-5" points="296.75 69.86 296.25 69.86 296.25 73.61 291.05 68.41 296.25 63.2 296.25 66.96 296.75 66.96 296.75 62 290.34 68.41 296.75 74.82 296.75 69.86"/><polygon class="cls-5" points="296.25 87.28 296.75 87.28 296.75 83.53 301.95 88.73 296.75 93.94 296.75 90.19 296.25 90.19 296.25 95.14 302.66 88.73 296.25 82.32 296.25 87.28"/><path class="cls-5" d="M296.5,68.07v.5a10,10,0,0,1,8.62,15.08l.43.25a10.5,10.5,0,0,0-9-15.83Z"/><path class="cls-5" d="M296.5,88.57a10,10,0,0,1-8.62-15.08l-.43-.25a10.5,10.5,0,0,0,9,15.83Z"/><path class="cls-5" d="M47,31.7V20.58H23.49v-3a2.1,2.1,0,0,1,2.09-2.11H44.4a2.11,2.11,0,0,1,2.11,2.11v2H47v-2A2.6,2.6,0,0,0,44.4,15H25.6A2.59,2.59,0,0,0,23,17.6v3.48H46.51V31.7a2.11,2.11,0,0,1-2.11,2.11H25.6a2.11,2.11,0,0,1-2.11-2.11v-8H45.94V23.2H23v8.5a2.6,2.6,0,0,0,2.6,2.6H44.4A2.6,2.6,0,0,0,47,31.7Z"/><path class="cls-5" d="M354,101.55a4.78,4.78,0,1,0,4.78,4.78A4.79,4.79,0,0,0,354,101.55Zm0,9.06a4.28,4.28,0,1,1,4.28-4.28A4.28,4.28,0,0,1,354,110.62Z"/><path class="cls-5" d="M365.9,102.27l-2.41-4.18a.88.88,0,0,0-1.05-.38l-2.88,1.16a9,9,0,0,0-1.85-1.07l-.43-3.06a.85.85,0,0,0-.85-.73h-4.84a.84.84,0,0,0-.84.73l-.43,3.06a9.33,9.33,0,0,0-1.85,1.07l-2.88-1.16a.85.85,0,0,0-1,.38l-2.42,4.19a.84.84,0,0,0,.22,1.09l2.44,1.9a7.56,7.56,0,0,0-.09,1.07,8,8,0,0,0,.07,1.07l-2.44,1.91a.88.88,0,0,0-.21,1.09l2.41,4.18a.87.87,0,0,0,1.05.38l2.88-1.16a9,9,0,0,0,1.85,1.07l.44,3.07a.87.87,0,0,0,.85.72h4.84a.83.83,0,0,0,.84-.73l.43-3.06a9.34,9.34,0,0,0,1.85-1.07l2.88,1.16a.85.85,0,0,0,1-.38l2.42-4.19a.84.84,0,0,0-.22-1.09l-2.41-1.91a9.82,9.82,0,0,0,.06-1.07,7.93,7.93,0,0,0-.07-1.07l2.44-1.91A.88.88,0,0,0,365.9,102.27Zm-.52.7-2.67,2.09,0,.15a7.28,7.28,0,0,1,.09,1.14,9.76,9.76,0,0,1-.07,1.15l0,.14,2.64,2.09a.33.33,0,0,1,.08.44L363,114.34a.34.34,0,0,1-.43.16l-3.14-1.26-.11.09a8.89,8.89,0,0,1-2,1.15l-.13.05-.47,3.36a.33.33,0,0,1-.34.29h-4.84a.36.36,0,0,1-.36-.3l-.47-3.34-.13-.06a8.58,8.58,0,0,1-2-1.15l-.11-.09-3.12,1.26a.36.36,0,0,1-.44-.16l-2.41-4.18a.37.37,0,0,1,.08-.45l2.67-2.09,0-.15a7.4,7.4,0,0,1-.09-1.14,7.28,7.28,0,0,1,.1-1.14l0-.15L342.64,103a.33.33,0,0,1-.08-.44L345,98.33a.34.34,0,0,1,.43-.16l3.14,1.26.11-.09a8.9,8.9,0,0,1,2-1.15l.13-.05.47-3.34a.34.34,0,0,1,.34-.3h4.84a.35.35,0,0,1,.36.3l.47,3.35.13.05a8.58,8.58,0,0,1,2,1.15l.11.09,3.12-1.26a.36.36,0,0,1,.44.16l2.41,4.18A.37.37,0,0,1,365.37,103Z"/><path class="cls-5" d="M62.56,99A12,12,0,0,0,53,104a7.64,7.64,0,0,0-2.62-.47c-4.62,0-8.38,4.14-8.38,9.24V113H75v-.28C75,105.15,69.42,99,62.56,99Zm11.93,13.44h-32c.13-4.66,3.61-8.4,7.87-8.4a7.19,7.19,0,0,1,2.62.5l.17.07.11-.15a11.5,11.5,0,0,1,9.28-4.9C69.06,99.56,74.35,105.31,74.49,112.44Z"/><path class="cls-5" d="M375.91,42.28a13.18,13.18,0,0,0-10.17,4.77A8.89,8.89,0,0,0,354,55.51v.27h35.1v-.27A13.24,13.24,0,0,0,375.91,42.28Zm-21.33,13a8.35,8.35,0,0,1,11.15-7.61l.18.06.12-.15a12.69,12.69,0,0,1,22.56,7.7Z"/><path class="cls-5" d="M441,33.51a2.5,2.5,0,1,0-2.5-2.5A2.51,2.51,0,0,0,441,33.51ZM441,29a2,2,0,1,1-2,2A2,2,0,0,1,441,29Z"/><path class="cls-5" d="M441,38a7,7,0,0,0,6.53-4.49H452V38h5V33.51h2v-5H447.53A7,7,0,1,0,441,38Zm0-13.48a6.48,6.48,0,0,1,6.11,4.32l.06.17h11.32v4h-2v4.49h-4V33h-5.3l-.06.17A6.48,6.48,0,1,1,441,24.52Z"/><path class="cls-7" d="M256,92v1a37,37,0,0,1,37,37h1A38,38,0,0,0,256,92Z"/><path class="cls-1" d="M411.08,121A16.81,16.81,0,0,0,398,127.27a11.21,11.21,0,0,0-15,10.58h44.93A16.85,16.85,0,0,0,411.08,121Z"/><path class="cls-3" d="M411.08,121.7a16.17,16.17,0,0,1,16.13,15.44H383.73a10.5,10.5,0,0,1,14-9.22l.47.17.31-.39a16.09,16.09,0,0,1,12.56-6m0-.7A16.81,16.81,0,0,0,398,127.27a11.21,11.21,0,0,0-15,10.58h44.93A16.85,16.85,0,0,0,411.08,121Z"/></svg>
\ No newline at end of file
......@@ -19,11 +19,14 @@ Polymer({
type: Boolean,
value: false,
},
},
listeners: {
// This is necessary since the settingsLink element is inserted by i18nRaw.
'settingsLink.tap': 'onGoToSettings_'
/** @private */
accountImageSrc_: {
type: String,
value: function() {
return loadTimeData.getString('accountPictureUrl');
},
},
},
/** @private {?sync.confirmation.SyncConfirmationBrowserProxy} */
......
......@@ -8,13 +8,18 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/unified_consent_helper.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "components/signin/core/browser/avatar_icon_util.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "ui/base/l10n/l10n_util.h"
......@@ -57,6 +62,8 @@ SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
IDS_SYNC_CONFIRMATION_DICE_SYNC_SETTINGS_LINK_BODY);
AddStringResource(source, "syncConfirmationSyncSettingsDescription",
IDS_SYNC_CONFIRMATION_DICE_SYNC_SETTINGS_DESCRIPTION);
AddStringResource(source, "syncConfirmationSettingsLabel",
IDS_SYNC_CONFIRMATION_DICE_SETTINGS_BUTTON_LABEL);
AddStringResource(source, "syncConfirmationMoreOptionsLabel",
IDS_SYNC_CONFIRMATION_UNITY_MORE_OPTIONS_BUTTON_LABEL);
......@@ -81,10 +88,25 @@ SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
IDS_SYNC_CONFIRMATION_UNITY_OPTIONS_CONFIRM_BUTTON_LABEL);
AddStringResource(source, "syncConfirmationOptionsBackLabel",
IDS_SYNC_CONFIRMATION_UNITY_OPTIONS_BACK_BUTTON_LABEL);
AddStringResource(source, "syncConsentBumpTitle",
IDS_SYNC_CONFIRMATION_UNITY_CONSENT_BUMP_TITLE);
constexpr int kAccountPictureSize = 68;
std::string custom_picture_url = profiles::GetPlaceholderAvatarIconUrl();
GURL account_picture_url(SigninManagerFactory::GetForProfile(profile)
->GetAuthenticatedAccountInfo()
.picture_url);
if (account_picture_url.is_valid()) {
custom_picture_url = signin::GetAvatarImageURLWithOptions(
account_picture_url, kAccountPictureSize,
false /* no_silhouette */)
.spec();
}
source->AddString("accountPictureUrl", custom_picture_url);
title_ids = IDS_SYNC_CONFIRMATION_UNITY_TITLE;
confirm_button_ids = IDS_SYNC_CONFIRMATION_DICE_CONFIRM_BUTTON_LABEL;
undo_button_ids = IDS_SYNC_CONFIRMATION_DICE_UNDO_BUTTON_LABEL;
undo_button_ids = IDS_CANCEL;
} else {
source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML);
source->AddResourcePath("sync_confirmation.css", IDR_SYNC_CONFIRMATION_CSS);
......
......@@ -14,7 +14,9 @@ cr.define('signin_sync_confirmation', function() {
// Tests that no DCHECKS are thrown during initialization of the UI.
test('LoadPage', function() {
assertEquals('Get even more from Chrome', app.$.heading.textContent);
assertEquals(
'Get Google smarts in Chrome',
app.$.syncConfirmationHeading.textContent.trim());
});
});
......@@ -43,18 +45,14 @@ cr.define('signin_sync_confirmation', function() {
});
const STANDARD_CONSENT_DESCRIPTION_TEXT = [
'Get even more from Chrome',
'Sync your bookmarks, passwords, and history on all your devices',
'Get more personalized experiences, such as better ' +
'content suggestions and smarter Translate',
'Bring powerful Google services like spell check and tap to search ' +
'to Chrome',
'You can customize what information Google collects in ' +
'<a id="settingsLink" href="chrome://settings">Settings</a> ' +
'anytime.',
'Google may use your browsing activity, content on some sites you ' +
'visit, and other browser interactions to personalize Chrome and ' +
'other Google services like Translate, Search, and ads.',
'Get Google smarts in Chrome',
'Your bookmarks, passwords, history, and more on all your devices',
'Personalized Google services like Google Pay',
'Improve Chrome and its security by sending system and usage ' +
'information to Google',
'Google may use content on sites you visit and browsing activity and ' +
'interactions to personalize Chrome and other Google services like ' +
'Translate, Search, and ads. You can customize this in Settings.',
];
......@@ -77,7 +75,7 @@ cr.define('signin_sync_confirmation', function() {
// Tests that the expected strings are recorded when clicking the Confirm
// button.
test('recordConsentOnSettingsLink', function() {
app.$$('#settingsLink').click();
app.$$('#settingsButton').click();
return browserProxy.whenCalled('goToSettings').then(function(arguments) {
assertEquals(2, arguments.length);
var description = arguments[0];
......@@ -86,11 +84,7 @@ cr.define('signin_sync_confirmation', function() {
assertEquals(
JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT),
JSON.stringify(description));
assertEquals(
'You can customize what information Google collects in ' +
'<a id="settingsLink" href="chrome://settings">Settings' +
'</a> anytime.',
confirmation);
assertEquals('Settings', confirmation);
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment