Commit 67b5b7d9 authored by Andrey Zaytsev's avatar Andrey Zaytsev Committed by Chromium LUCI CQ

Privacy Sandbox Settings: updated the page to match the latest mocks

Screenshot: https://screenshot.googleplex.com/4Nzb8xYfMfA8Xuk.png
Mocks: https://docs.google.com/presentation/d/1_6jDegg169xJ5qgaABZ_wV3-Csd_OL5bf9H1NeUqS9Y/edit?pli=1#slide=id.gad295b4069_0_0

Bug: 1152351
Change-Id: I5ce89a47e48445bfb6f54db5c15f93fe47929433
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2605551Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avatarNatalie Chouinard <chouinard@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Commit-Queue: Andrey Zaytsev <andzaytsev@google.com>
Cr-Commit-Position: refs/heads/master@{#844047}
parent 87c6fe06
......@@ -21,6 +21,7 @@ android_library("java") {
"//components/browser_ui/settings/android:java",
"//third_party/android_deps:androidx_fragment_fragment_java",
"//third_party/android_deps:androidx_preference_preference_java",
"//ui/android:ui_full_java",
]
resources_package = "org.chromium.chrome.browser.privacy_sandbox"
}
......
......@@ -6,26 +6,25 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="privacy_sandbox_toggle"
android:title="@string/privacy_sandbox_title"
android:persistent="false"
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:summary="@string/privacy_sandbox_description"
app:allowDividerBelow="false" />
<PreferenceCategory
android:title="@string/privacy_sandbox_trial_title"/>
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:key="subtitle"
android:title="@string/privacy_sandbox_subtitle"
android:key="privacy_sandbox_trial_description"
app:allowDividerBelow="false" />
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:summary="@string/privacy_sandbox_bullet_one"
android:icon="@drawable/ic_people_24dp"
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="privacy_sandbox_toggle"
android:title="@string/privacy_sandbox_toggle"
android:persistent="false"
app:allowDividerBelow="false" />
<org.chromium.components.browser_ui.settings.TextMessagePreference
android:summary="@string/privacy_sandbox_bullet_two"
android:icon="@drawable/ic_data_viz_grey"
app:iconTint="@color/default_icon_color_tint_list"
android:summary="@string/privacy_sandbox_toggle_description"
app:allowDividerBelow="false" />
</PreferenceScreen>
......@@ -13,11 +13,16 @@ import android.widget.LinearLayout;
import androidx.preference.PreferenceFragmentCompat;
import org.chromium.components.browser_ui.settings.SettingsUtils;
import org.chromium.ui.text.SpanApplier;
import org.chromium.ui.text.SpanApplier.SpanInfo;
import org.chromium.ui.widget.ChromeBulletSpan;
/**
* Settings fragment for privacy sandbox settings. This class represents a View in the MVC paradigm.
*/
public class PrivacySandboxSettingsFragment extends PreferenceFragmentCompat {
public static final String TRIAL_DESCRIPTION_PREFERENCE = "privacy_sandbox_trial_description";
/**
* Initializes all the objects related to the preferences page.
*/
......@@ -26,6 +31,12 @@ public class PrivacySandboxSettingsFragment extends PreferenceFragmentCompat {
// Add all preferences and set the title.
getActivity().setTitle(R.string.prefs_privacy_sandbox);
SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_sandbox_preferences);
// Format the trial description, which has bullet points.
findPreference(TRIAL_DESCRIPTION_PREFERENCE)
.setSummary(SpanApplier.applySpans(
getContext().getString(R.string.privacy_sandbox_trial_description),
new SpanInfo("<li1>", "</li1>", new ChromeBulletSpan(getContext())),
new SpanInfo("<li2>", "</li2>", new ChromeBulletSpan(getContext()))));
}
@Override
......
......@@ -778,21 +778,24 @@ For example, some websites may respond to this request by showing you ads that a
Access payment methods
</message>
<!-- Privacy Sandbox Settings. Used by //chrome/browser/privacy/settings. -->
<!-- Privacy Sandbox Settings. Used by //chrome/browser/privacy_sandbox. -->
<message name="IDS_PREFS_PRIVACY_SANDBOX" desc="Title for the 'Privacy sandbox' page.">
Privacy sandbox
</message>
<message name="IDS_PRIVACY_SANDBOX_TITLE" desc="Title for the Privacy Sandbox toggle.">
Web crowd and ad measurement
<message name="IDS_PRIVACY_SANDBOX_DESCRIPTION" desc="">
Privacy Sandbox is a set of new technologies that will eventually protect people from cross-site tracking mechanisms, like third-party cookies, while preserving web content and services that depend on those mechanisms today. Chrome is working with website developers, publishers, advertisers, and other browsers to develop this new technology.
</message>
<message name="IDS_PRIVACY_SANDBOX_SUBTITLE" desc="Description for the privacy sandbox toggle.">
By joining a Web Crowd, you allow websites to make your web experience relevant without using personally identifiable information. Similar to a crowd in a concert, websites and advertisers can only know thousands of users share a similar interest.
<message name="IDS_PRIVACY_SANDBOX_TRIAL_TITLE" desc="">
Privacy Sandbox trial
</message>
<message name="IDS_PRIVACY_SANDBOX_BULLET_ONE" desc="First bullet point of the Privacy Sandbox description.">
Allow websites and apps to give you a more relevant experience using a non-identifiable alias.
<message name="IDS_PRIVACY_SANDBOX_TRIAL_DESCRIPTION" desc="">
Privacy Sandbox is not widely released yet. During this trial period:\n<ph name="BEGIN_LIST_ITEM1">&lt;li1&gt;</ph>Website and app developers can try out the ability to create relevant experiences without accessing uniquely identifiable information about you<ph name="END_LIST_ITEM1">&lt;/li1&gt;</ph>\n<ph name="BEGIN_LIST_ITEM2">&lt;li2&gt;</ph>Users can opt out of the trial using the controls on this page.<ph name="END_LIST_ITEM2">&lt;/li2&gt;</ph>
</message>
<message name="IDS_PRIVACY_SANDBOX_BULLET_TWO" desc="Second bullet point of the Privacy Sandbox description">
Allow advertisers to study ad campaigns using non-identifiable information.
<message name="IDS_PRIVACY_SANDBOX_TOGGLE" desc="Title for the Privacy Sandbox toggle.">
Crowdmasking
</message>
<message name="IDS_PRIVACY_SANDBOX_TOGGLE_DESCRIPTION" desc="">
When on, websites won’t be able to use information that personally identifies you to make their sites more relevant. Similar to a crowd in a concert, sites can only know that thousands of users share a similar interest.\n\nYour “crowd” is based on sites you’ve visited. Advertisers can only see what sites the whole crowd visits, not what sites you personally visit.
</message>
<message name="IDS_PRIVACY_SANDBOX_SNACKBAR_MESSAGE" desc="The text displayed in the snackbar, which gives the user an option to navigate to the Privacy Sandbox settings page. 'Privacy sandbox' has TC ID 5753235213964358658.">
Explore the Privacy Sandbox
......
ad621d4b76db8fe8a958472c451b28a81cf65dfe
\ No newline at end of file
......@@ -154,7 +154,6 @@ android_resources("java_resources") {
"java/res/drawable/ic_music_note_24dp.xml",
"java/res/drawable/ic_offline_pin_24dp_on_dark_bg.xml",
"java/res/drawable/ic_offline_pin_24dp_on_light_bg.xml",
"java/res/drawable/ic_people_24dp.xml",
"java/res/drawable/ic_permission_location_filled.xml",
"java/res/drawable/ic_play_circle_filled_24dp_on_dark_bg.xml",
"java/res/drawable/ic_play_circle_filled_24dp_on_light_bg.xml",
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/default_icon_color"
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
</vector>
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