[Code Health][Clank] Clean up unused feature Incognito NTP
Bug: 40258200, 40838267, 335440649 Change-Id: I8ae1135c0e1a195607e39a808a771a4ed32a6a51 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490088 Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Mariam Ali <alimariam@google.com> Reviewed-by: Side YILMAZ <sideyilmaz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1293680}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
dfc4eae59a
commit
01bbc848cd
chrome
android
chrome_java_resources.gnichrome_java_sources.gnichrome_test_java_sources.gni
features
start_surface
java
src
org
chromium
chrome
features
tasks
javatests
src
org
chromium
chrome
features
start_surface
junit
src
org
chromium
chrome
features
java
res
layout
revamped_incognito_cookie_controls_card.xmlrevamped_incognito_description_layout.xmlrevamped_incognito_tracking_protection_card.xml
values
src
javatests
src
browser
flags
android
common
test
android
javatests
src
org
chromium
chrome
test
components
new_or_sad_tab_strings.grdp
new_or_sad_tab_strings_grdp
IDS_REVAMPED_INCOGNITO_NTP_DOES_DESCRIPTION.png.sha1IDS_REVAMPED_INCOGNITO_NTP_DOES_HEADER.png.sha1IDS_REVAMPED_INCOGNITO_NTP_DOES_NOT_DESCRIPTION.png.sha1IDS_REVAMPED_INCOGNITO_NTP_DOES_NOT_HEADER.png.sha1IDS_REVAMPED_INCOGNITO_NTP_LEARN_MORE.png.sha1IDS_REVAMPED_INCOGNITO_NTP_OTR_THIRD_PARTY_COOKIE.png.sha1IDS_REVAMPED_INCOGNITO_NTP_OTR_THIRD_PARTY_COOKIE_SUBLABEL.png.sha1IDS_REVAMPED_INCOGNITO_NTP_TITLE.png.sha1
@@ -568,9 +568,6 @@ chrome_java_resources = [
|
||||
"java/res/layout/recent_tabs_group_separator_visible.xml",
|
||||
"java/res/layout/recent_tabs_list_item.xml",
|
||||
"java/res/layout/recent_tabs_page.xml",
|
||||
"java/res/layout/revamped_incognito_cookie_controls_card.xml",
|
||||
"java/res/layout/revamped_incognito_description_layout.xml",
|
||||
"java/res/layout/revamped_incognito_tracking_protection_card.xml",
|
||||
"java/res/layout/search_activity.xml",
|
||||
"java/res/layout/search_widget_template.xml",
|
||||
"java/res/layout/send_tab_to_self_device_picker_footer.xml",
|
||||
|
@@ -843,7 +843,6 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/ntp/RecentlyClosedGroup.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/RecentlyClosedTab.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/RecentlyClosedTabManager.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/SnapScrollHelperImpl.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/TitleUtil.java",
|
||||
"java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java",
|
||||
|
@@ -277,8 +277,6 @@ chrome_test_java_sources = [
|
||||
"javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/ntp/RecentTabsPageTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridgeTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionViewRenderTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoNewTabPageTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/offlinepages/MHTMLPageTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageArchivePublisherBridgeTest.java",
|
||||
"javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageAutoFetchTest.java",
|
||||
|
@@ -221,14 +221,7 @@ public class TasksView extends CoordinatorLayoutForPointer {
|
||||
|
||||
ViewStub incognitoDescriptionViewStub =
|
||||
(ViewStub) findViewById(R.id.task_view_incognito_layout_stub);
|
||||
boolean isIncognitoNtpRevampEnabled = ChromeFeatureList.sIncognitoNtpRevamp.isEnabled();
|
||||
if (isIncognitoNtpRevampEnabled) {
|
||||
incognitoDescriptionViewStub.setLayoutResource(
|
||||
R.layout.revamped_incognito_description_layout);
|
||||
} else {
|
||||
incognitoDescriptionViewStub.setLayoutResource(R.layout.incognito_description_layout);
|
||||
}
|
||||
|
||||
incognitoDescriptionViewStub.setLayoutResource(R.layout.incognito_description_layout);
|
||||
mIncognitoDescriptionView =
|
||||
(IncognitoDescriptionView) incognitoDescriptionViewStub.inflate();
|
||||
|
||||
@@ -236,15 +229,9 @@ public class TasksView extends CoordinatorLayoutForPointer {
|
||||
ViewStub cardStub = findViewById(R.id.cookie_card_stub);
|
||||
if (cardStub == null) return;
|
||||
if (shouldShowTrackingProtectionNtp()) {
|
||||
cardStub.setLayoutResource(
|
||||
isIncognitoNtpRevampEnabled
|
||||
? R.layout.revamped_incognito_tracking_protection_card
|
||||
: R.layout.incognito_tracking_protection_card);
|
||||
cardStub.setLayoutResource(R.layout.incognito_tracking_protection_card);
|
||||
} else {
|
||||
cardStub.setLayoutResource(
|
||||
isIncognitoNtpRevampEnabled
|
||||
? R.layout.revamped_incognito_cookie_controls_card
|
||||
: R.layout.incognito_cookie_controls_card);
|
||||
cardStub.setLayoutResource(R.layout.incognito_cookie_controls_card);
|
||||
}
|
||||
cardStub.inflate();
|
||||
mIncognitoDescriptionView.formatTrackingProtectionText(getContext(), this);
|
||||
|
@@ -310,11 +310,7 @@ public class StartSurfaceTest {
|
||||
StartSurfaceTestUtils.waitForTabSwitcherVisible(
|
||||
mLayoutChangedCallbackHelper, mCurrentlyActiveLayout, cta);
|
||||
} else {
|
||||
int container_id =
|
||||
ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP)
|
||||
? R.id.revamped_incognito_ntp_container
|
||||
: R.id.new_tab_incognito_container;
|
||||
onViewWaiting(withId(container_id)).check(matches(isDisplayed()));
|
||||
onViewWaiting(withId(R.id.new_tab_incognito_container)).check(matches(isDisplayed()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -700,11 +696,7 @@ public class StartSurfaceTest {
|
||||
// Simulates pressing the home button. Incognito tab should stay and homepage shouldn't
|
||||
// show.
|
||||
onView(withId(R.id.home_button)).perform(click());
|
||||
int container_id =
|
||||
ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP)
|
||||
? R.id.revamped_incognito_ntp_container
|
||||
: R.id.new_tab_incognito_container;
|
||||
onViewWaiting(withId(container_id)).check(matches(isDisplayed()));
|
||||
onViewWaiting(withId(R.id.new_tab_incognito_container)).check(matches(isDisplayed()));
|
||||
assertFalse(
|
||||
cta.getLayoutManager()
|
||||
.isLayoutVisible(StartSurfaceTestUtils.getStartSurfaceLayoutType()));
|
||||
|
@@ -241,10 +241,7 @@ public class TasksViewBinderUnitTest {
|
||||
|
||||
@Test
|
||||
@SmallTest
|
||||
@DisableFeatures({
|
||||
ChromeFeatureList.TRACKING_PROTECTION_3PCD,
|
||||
ChromeFeatureList.INCOGNITO_NTP_REVAMP
|
||||
})
|
||||
@DisableFeatures({ChromeFeatureList.TRACKING_PROTECTION_3PCD})
|
||||
public void testSetIncognitoDescriptionVisibilityAndClickListener() {
|
||||
when(mPrefService.getBoolean(Pref.TRACKING_PROTECTION3PCD_ENABLED)).thenReturn(false);
|
||||
assertFalse(isViewVisible(R.id.incognito_description_container_layout_stub));
|
||||
@@ -270,7 +267,6 @@ public class TasksViewBinderUnitTest {
|
||||
|
||||
@Test
|
||||
@SmallTest
|
||||
@DisableFeatures(ChromeFeatureList.INCOGNITO_NTP_REVAMP)
|
||||
public void testSetIncognitoDescriptionVisibilityAndClickListenerTrackingProtection() {
|
||||
when(mPrefService.getBoolean(Pref.TRACKING_PROTECTION3PCD_ENABLED)).thenReturn(true);
|
||||
assertFalse(isViewVisible(R.id.incognito_description_container_layout_stub));
|
||||
|
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/revamped_cookie_controls_card"
|
||||
style="@style/CardTransparentForDark"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/revamped_cookie_controls_card_managed_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ContentDescription"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentStart="true"
|
||||
app:tint="@color/default_icon_color_light" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/revamped_cookie_controls_card_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:contentDescription="@string/revamped_incognito_ntp_otr_third_party_cookie"
|
||||
style="@style/Widget.BrowserUI.Switch.Incognito"
|
||||
app:showText="false" />
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/revamped_cookie_controls_card_title"
|
||||
android:text="@string/revamped_incognito_ntp_otr_third_party_cookie"
|
||||
android:textAppearance="@style/TextAppearance.TextLarge.Primary.Baseline.Light"
|
||||
android:layout_toStartOf="@id/revamped_cookie_controls_card_toggle"
|
||||
android:layout_toEndOf="@id/revamped_cookie_controls_card_managed_icon"
|
||||
android:layout_marginBottom="@dimen/md_incognito_ntp_line_spacing"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/revamped_cookie_controls_card_subtitle"
|
||||
android:text="@string/revamped_incognito_ntp_otr_third_party_cookie_sublabel"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
android:layout_toStartOf="@id/revamped_cookie_controls_card_toggle"
|
||||
android:layout_toEndOf="@id/revamped_cookie_controls_card_managed_icon"
|
||||
android:layout_below="@id/revamped_cookie_controls_card_title"
|
||||
app:leading="@dimen/text_size_medium_leading"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2021 The Chromium Authors
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<org.chromium.chrome.browser.ntp.RevampedIncognitoDescriptionView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/revamped_incognito_ntp_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/md_incognito_ntp_padding_left" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/revamped_incognito_ntp_icon"
|
||||
android:layout_width="@dimen/incognito_ntp_icon_size"
|
||||
android:layout_height="@dimen/incognito_ntp_icon_size"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/incognito_splash"
|
||||
app:tint="@color/ntp_incognito_icon_color"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/revamped_incognito_ntp_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revamped_incognito_ntp_title"
|
||||
android:textAppearance="@style/TextAppearance.HeadlineThick.Primary.Baseline.Light"
|
||||
android:layout_marginTop="@dimen/incognito_ntp_space_between_icon_and_title"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/revamped_incognito_ntp_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/revamped_incognito_ntp_description_text_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/revamped_incognito_ntp_does_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/incognito_ntp_does_and_doesnt_top_spacing"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/revamped_incognito_ntp_does_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revamped_incognito_ntp_does_header"
|
||||
android:textAppearance="@style/TextAppearance.Headline.Primary.Baseline.Light"
|
||||
android:layout_marginBottom="@dimen/incognito_ntp_space_between_header_and_description"/>
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/revamped_incognito_ntp_does_description_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
app:leading="@dimen/text_size_medium_leading"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/revamped_incognito_ntp_does_not_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/revamped_incognito_ntp_does_not_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revamped_incognito_ntp_does_not_header"
|
||||
android:textAppearance="@style/TextAppearance.Headline.Primary.Baseline.Light"
|
||||
android:layout_marginBottom="@dimen/incognito_ntp_space_between_header_and_description"/>
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/revamped_incognito_ntp_does_not_description_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
app:leading="@dimen/text_size_medium_leading"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/revamped_incognito_ntp_learn_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
android:minHeight="@dimen/min_touch_target_size"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<!-- Placeholder for a Cookie Controls or a Tracking Protection card. -->
|
||||
<ViewStub
|
||||
android:id="@+id/cookie_card_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.chromium.chrome.browser.ntp.RevampedIncognitoDescriptionView>
|
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/revamped_tracking_protection_card"
|
||||
style="@style/CardTransparentForDark"
|
||||
android:orientation="vertical"
|
||||
android:gravity="start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/tracking_protection_card_title"
|
||||
android:text="@string/new_tab_otr_third_party_blocked_cookie"
|
||||
android:textAppearance="@style/TextAppearance.TextLarge.Primary.Baseline.Light"
|
||||
android:layout_marginBottom="@dimen/md_incognito_ntp_line_spacing"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithLeading
|
||||
android:id="@+id/tracking_protection_description_one"
|
||||
android:text="@string/new_tab_otr_third_party_blocked_cookie_part_one"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
app:leading="@dimen/text_size_medium_leading"
|
||||
android:layout_marginBottom="@dimen/md_incognito_ntp_line_spacing"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
|
||||
<org.chromium.ui.widget.TextViewWithClickableSpans
|
||||
android:id="@+id/tracking_protection_description_two"
|
||||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Baseline.Light"
|
||||
app:leading="@dimen/text_size_medium_leading"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
|
||||
</LinearLayout>
|
@@ -188,24 +188,6 @@ found in the LICENSE file.
|
||||
<!-- Incognito NTP -->
|
||||
<dimen name="incognito_ntp_total_space_between_views">14sp</dimen>
|
||||
|
||||
<!-- Revamped Incognito NTP -->
|
||||
<dimen name="incognito_ntp_portrait_small_or_big_threshold">320dp</dimen>
|
||||
<dimen name="incognito_ntp_portrait_horizontal_small_padding">16dp</dimen>
|
||||
<dimen name="incognito_ntp_portrait_horizontal_big_padding">32dp</dimen>
|
||||
<dimen name="incognito_ntp_portrait_vertical_padding">48dp</dimen>
|
||||
<dimen name="incognito_ntp_landscape_small_or_big_threshold">320dp</dimen>
|
||||
<dimen name="incognito_ntp_landscape_horizontal_padding">24dp</dimen>
|
||||
<dimen name="incognito_ntp_landscape_vertical_small_padding">24dp</dimen>
|
||||
<dimen name="incognito_ntp_landscape_vertical_big_padding">32dp</dimen>
|
||||
<dimen name="incognito_ntp_icon_size">72dp</dimen>
|
||||
<dimen name="incognito_ntp_space_between_icon_and_title">16dp</dimen>
|
||||
<dimen name="incognito_ntp_wide_layout_threshold">720dp</dimen>
|
||||
<dimen name="incognito_ntp_content_max_width">704dp</dimen>
|
||||
<dimen name="incognito_ntp_does_and_doesnt_top_spacing">32dp</dimen>
|
||||
<dimen name="incognito_ntp_descriptions_horizontal_spacing">32dp</dimen>
|
||||
<dimen name="incognito_ntp_space_between_header_and_description">8dp</dimen>
|
||||
<dimen name="incognito_ntp_learn_more_vertical_spacing">22dp</dimen>
|
||||
|
||||
<!-- Recent tabs page -->
|
||||
<dimen name="recent_tabs_visible_separator_padding">8dp</dimen>
|
||||
<dimen name="recent_tabs_group_view_vertical_padding">8dp</dimen>
|
||||
|
@@ -25,7 +25,4 @@ found in the LICENSE file.
|
||||
<integer name="download_infobar_bar_start_offset">800</integer>
|
||||
<integer name="download_infobar_bar_fill_in_delay">400</integer>
|
||||
<integer name="download_infobar_bar_fill_out_delay">200</integer>
|
||||
|
||||
<!-- Revamped Incognito NTP -->
|
||||
<integer name="descriptions_weight">1</integer>
|
||||
</resources>
|
||||
|
@@ -11,7 +11,6 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
|
||||
import org.chromium.base.ObserverList;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
|
||||
import org.chromium.chrome.browser.site_settings.CookieControlsServiceBridge;
|
||||
import org.chromium.chrome.browser.site_settings.CookieControlsServiceBridge.CookieControlsServiceObserver;
|
||||
@@ -102,10 +101,7 @@ public class IncognitoCookieControlsManager
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
boolean isCookieToggle =
|
||||
ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP)
|
||||
? buttonView.getId() == R.id.revamped_cookie_controls_card_toggle
|
||||
: buttonView.getId() == R.id.cookie_controls_card_toggle;
|
||||
boolean isCookieToggle = buttonView.getId() == R.id.cookie_controls_card_toggle;
|
||||
if (isChecked != mChecked && isCookieToggle) {
|
||||
mServiceBridge.handleCookieControlsToggleChanged(isChecked);
|
||||
}
|
||||
|
@@ -103,11 +103,6 @@ public class IncognitoNewTabPage extends BasicNativePage
|
||||
return mCookieControlsManager.shouldCaptureThumbnail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldShowRevampedIncognitoNtp() {
|
||||
return ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldShowTrackingProtectionNtp() {
|
||||
return UserPrefs.get(mProfile)
|
||||
|
@@ -40,9 +40,6 @@ public class IncognitoNewTabPageView extends FrameLayout {
|
||||
/** Tells the caller whether a new snapshot is required or not. */
|
||||
boolean shouldCaptureThumbnail();
|
||||
|
||||
/** Whether the new version of the Incognito NTP should be shown. */
|
||||
boolean shouldShowRevampedIncognitoNtp();
|
||||
|
||||
/** Whether to show the tracking protection UI on the NTP. */
|
||||
boolean shouldShowTrackingProtectionNtp();
|
||||
|
||||
@@ -77,12 +74,7 @@ public class IncognitoNewTabPageView extends FrameLayout {
|
||||
|
||||
private void inflateConditionalLayouts() {
|
||||
ViewStub viewStub = findViewById(R.id.incognito_description_layout_stub);
|
||||
if (mManager.shouldShowRevampedIncognitoNtp()) {
|
||||
viewStub.setLayoutResource(R.layout.revamped_incognito_description_layout);
|
||||
} else {
|
||||
viewStub.setLayoutResource(R.layout.incognito_description_layout);
|
||||
}
|
||||
|
||||
viewStub.setLayoutResource(R.layout.incognito_description_layout);
|
||||
mDescriptionView = (IncognitoDescriptionView) viewStub.inflate();
|
||||
mDescriptionView.setLearnMoreOnclickListener(
|
||||
new OnClickListener() {
|
||||
@@ -96,15 +88,9 @@ public class IncognitoNewTabPageView extends FrameLayout {
|
||||
ViewStub cardStub = findViewById(R.id.cookie_card_stub);
|
||||
if (cardStub == null) return;
|
||||
if (mManager.shouldShowTrackingProtectionNtp()) {
|
||||
cardStub.setLayoutResource(
|
||||
mManager.shouldShowRevampedIncognitoNtp()
|
||||
? R.layout.revamped_incognito_tracking_protection_card
|
||||
: R.layout.incognito_tracking_protection_card);
|
||||
cardStub.setLayoutResource(R.layout.incognito_tracking_protection_card);
|
||||
} else {
|
||||
cardStub.setLayoutResource(
|
||||
mManager.shouldShowRevampedIncognitoNtp()
|
||||
? R.layout.revamped_incognito_cookie_controls_card
|
||||
: R.layout.incognito_cookie_controls_card);
|
||||
cardStub.setLayoutResource(R.layout.incognito_cookie_controls_card);
|
||||
}
|
||||
cardStub.inflate();
|
||||
mDescriptionView.formatTrackingProtectionText(getContext(), this);
|
||||
|
@@ -1,364 +0,0 @@
|
||||
// Copyright 2021 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package org.chromium.chrome.browser.ntp;
|
||||
|
||||
import static org.chromium.ui.base.ViewUtils.dpToPx;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.text.SpannableString;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.components.content_settings.CookieControlsEnforcement;
|
||||
import org.chromium.ui.text.NoUnderlineClickableSpan;
|
||||
import org.chromium.ui.text.SpanApplier;
|
||||
import org.chromium.ui.text.SpanApplier.SpanInfo;
|
||||
import org.chromium.ui.widget.ChromeBulletSpan;
|
||||
|
||||
/** The view to describe revamped incognito mode. */
|
||||
public class RevampedIncognitoDescriptionView extends LinearLayout
|
||||
implements IncognitoDescriptionView {
|
||||
private Resources mResources;
|
||||
|
||||
private int mWidthPx;
|
||||
private int mHeightPx;
|
||||
|
||||
private TextView mTitle;
|
||||
private LinearLayout mContainer;
|
||||
private LinearLayout mContent;
|
||||
private LinearLayout mDescriptionTextContainer;
|
||||
private LinearLayout mDoesLayout;
|
||||
private LinearLayout mDoesNotLayout;
|
||||
private TextView mLearnMore;
|
||||
private RelativeLayout mCookieControlsCard;
|
||||
private SwitchCompat mCookieControlsToggle;
|
||||
private ImageView mCookieControlsManagedIcon;
|
||||
private TextView mCookieControlsTitle;
|
||||
private TextView mCookieControlsSubtitle;
|
||||
|
||||
/** Default constructor needed to inflate via XML. */
|
||||
public RevampedIncognitoDescriptionView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLearnMoreOnclickListener(OnClickListener onClickListener) {
|
||||
// Adjust LearnMore text and add the callback for LearnMore link.
|
||||
adjustLearnMore(onClickListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieControlsToggleOnCheckedChangeListener(
|
||||
CompoundButton.OnCheckedChangeListener listener) {
|
||||
if (!findCookieControlElements()) return;
|
||||
mCookieControlsToggle.setOnCheckedChangeListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieControlsToggle(boolean enabled) {
|
||||
if (!findCookieControlElements()) return;
|
||||
mCookieControlsToggle.setChecked(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieControlsIconOnclickListener(OnClickListener listener) {
|
||||
if (!findCookieControlElements()) return;
|
||||
mCookieControlsManagedIcon.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
|
||||
mResources = getContext().getResources();
|
||||
|
||||
mWidthPx = dpToPx(getContext(), mResources.getConfiguration().screenWidthDp);
|
||||
mHeightPx = dpToPx(getContext(), mResources.getConfiguration().screenHeightDp);
|
||||
|
||||
mContainer = findViewById(R.id.revamped_incognito_ntp_container);
|
||||
|
||||
populateDescriptions(
|
||||
R.id.revamped_incognito_ntp_does_description_view,
|
||||
R.string.revamped_incognito_ntp_does_description);
|
||||
populateDescriptions(
|
||||
R.id.revamped_incognito_ntp_does_not_description_view,
|
||||
R.string.revamped_incognito_ntp_does_not_description);
|
||||
|
||||
mTitle = findViewById(R.id.revamped_incognito_ntp_title);
|
||||
mContent = findViewById(R.id.revamped_incognito_ntp_content);
|
||||
mDescriptionTextContainer =
|
||||
findViewById(R.id.revamped_incognito_ntp_description_text_container);
|
||||
mDoesLayout = findViewById(R.id.revamped_incognito_ntp_does_layout);
|
||||
mDoesNotLayout = findViewById(R.id.revamped_incognito_ntp_does_not_layout);
|
||||
mLearnMore = findViewById(R.id.revamped_incognito_ntp_learn_more);
|
||||
mCookieControlsCard = findViewById(R.id.revamped_cookie_controls_card);
|
||||
|
||||
adjustLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
// View#onConfigurationChanged() doesn't get called when resizing this view in
|
||||
// multi-window mode, so #onMeasure() is used instead.
|
||||
Configuration config = mResources.getConfiguration();
|
||||
int widthPx = dpToPx(getContext(), config.screenWidthDp);
|
||||
int heightPx = dpToPx(getContext(), config.screenHeightDp);
|
||||
if (mWidthPx != widthPx || mHeightPx != heightPx) {
|
||||
mWidthPx = widthPx;
|
||||
mHeightPx = heightPx;
|
||||
adjustLayout();
|
||||
}
|
||||
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param element Resource ID of the element to be populated with the description.
|
||||
* @param content String ID to serve as the text of |element|. Must contain three <li></li>
|
||||
* items, which will be converted to bulletpoints.
|
||||
* Populates |element| with |content|.
|
||||
*/
|
||||
private void populateDescriptions(@IdRes int element, @StringRes int content) {
|
||||
TextView view = findViewById(element);
|
||||
SpannableString spannableString = getSpannedBulletText(getContext(), content);
|
||||
view.setText(spannableString);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
static SpannableString getSpannedBulletText(Context context, int content) {
|
||||
String text = context.getResources().getString(content);
|
||||
|
||||
// Format the bulletpoints:
|
||||
// - Disambiguate the <li></li> spans for SpanApplier.
|
||||
// - Remove leading whitespace (caused by formatting in the .grdp file)
|
||||
// - Remove the trailing newline after the last bulletpoint.
|
||||
text = text.replaceFirst(" *<li>([^<]*)</li>", "<li1>$1</li1>");
|
||||
text = text.replaceFirst(" *<li>([^<]*)</li>", "<li2>$1</li2>");
|
||||
text = text.replaceFirst(" *<li>([^<]*)</li>\n", "<li3>$1</li3>");
|
||||
|
||||
String error =
|
||||
"Format error. Locale: "
|
||||
+ context.getResources().getConfiguration().getLocales()
|
||||
+ " \nstring: "
|
||||
+ context.getResources().getString(content);
|
||||
assert text.contains("<li1>") : error;
|
||||
assert text.contains("<li2>") : error;
|
||||
assert text.contains("<li3>") : error;
|
||||
|
||||
// Remove the <ul></ul> tags which serve no purpose here, including the whitespace around
|
||||
// them.
|
||||
text = text.replaceAll(" *</?ul>\\n?", "");
|
||||
|
||||
SpannableString spannableString =
|
||||
SpanApplier.applySpans(
|
||||
text,
|
||||
new SpanInfo("<li1>", "</li1>", new ChromeBulletSpan(context)),
|
||||
new SpanInfo("<li2>", "</li2>", new ChromeBulletSpan(context)),
|
||||
new SpanInfo("<li3>", "</li3>", new ChromeBulletSpan(context)));
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjusts the paddings, margins, and the orientation of "does", "doesn't do" and LearnMore
|
||||
* containers.
|
||||
*/
|
||||
private void adjustLayout() {
|
||||
int paddingHorizontalPx;
|
||||
int paddingVerticalPx;
|
||||
|
||||
int contentMaxWidthPx =
|
||||
mResources.getDimensionPixelSize(R.dimen.incognito_ntp_content_max_width);
|
||||
int contentWidthPx;
|
||||
|
||||
int doesTopMarginPx =
|
||||
mResources.getDimensionPixelSize(R.dimen.incognito_ntp_does_and_doesnt_top_spacing);
|
||||
int descriptionsWeight = mResources.getInteger(R.integer.descriptions_weight);
|
||||
|
||||
if (isNarrowScreen()) {
|
||||
// Small padding.
|
||||
int thresholdPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
R.dimen.incognito_ntp_portrait_small_or_big_threshold);
|
||||
paddingHorizontalPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
mWidthPx <= thresholdPx
|
||||
? R.dimen.incognito_ntp_portrait_horizontal_small_padding
|
||||
: R.dimen.incognito_ntp_portrait_horizontal_big_padding);
|
||||
paddingVerticalPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
R.dimen.incognito_ntp_portrait_vertical_padding);
|
||||
|
||||
mContainer.setGravity(Gravity.START);
|
||||
|
||||
mDescriptionTextContainer.setOrientation(LinearLayout.VERTICAL);
|
||||
// Since the width can not be directly measured at this stage, we must calculate it.
|
||||
contentWidthPx = Math.min(contentMaxWidthPx, mWidthPx - 2 * paddingHorizontalPx);
|
||||
|
||||
// Set layout params for portrait orientation. Must be done programmatically to cover
|
||||
// the case when the user switches from landscape to portrait.
|
||||
LinearLayout.LayoutParams layoutParams =
|
||||
new LinearLayoutCompat.LayoutParams(
|
||||
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
layoutParams.setMargins(0, doesTopMarginPx, 0, 0);
|
||||
|
||||
mDoesLayout.setLayoutParams(layoutParams);
|
||||
mDoesNotLayout.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
// Large padding.
|
||||
int thresholdPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
R.dimen.incognito_ntp_landscape_small_or_big_threshold);
|
||||
paddingHorizontalPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
R.dimen.incognito_ntp_landscape_horizontal_padding);
|
||||
paddingVerticalPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
mHeightPx <= thresholdPx
|
||||
? R.dimen.incognito_ntp_landscape_vertical_small_padding
|
||||
: R.dimen.incognito_ntp_landscape_vertical_big_padding);
|
||||
|
||||
mContainer.setGravity(Gravity.CENTER_HORIZONTAL);
|
||||
|
||||
mDescriptionTextContainer.setOrientation(LinearLayout.HORIZONTAL);
|
||||
// Since the width can not be directly measured at this stage, we must calculate it.
|
||||
contentWidthPx = Math.min(contentMaxWidthPx, mWidthPx - 2 * paddingHorizontalPx);
|
||||
|
||||
// Set layout params for landscape orientation.
|
||||
int doesRightMarginPx =
|
||||
mResources.getDimensionPixelSize(
|
||||
R.dimen.incognito_ntp_descriptions_horizontal_spacing);
|
||||
LinearLayout.LayoutParams layoutParamsDoes =
|
||||
new LinearLayoutCompat.LayoutParams(
|
||||
0, LayoutParams.WRAP_CONTENT, descriptionsWeight);
|
||||
layoutParamsDoes.setMargins(0, doesTopMarginPx, doesRightMarginPx, 0);
|
||||
mDoesLayout.setLayoutParams(layoutParamsDoes);
|
||||
|
||||
LinearLayout.LayoutParams layoutParamsDoesNot =
|
||||
new LinearLayoutCompat.LayoutParams(
|
||||
0, LayoutParams.WRAP_CONTENT, descriptionsWeight);
|
||||
layoutParamsDoesNot.setMargins(0, doesTopMarginPx, 0, 0);
|
||||
mDoesNotLayout.setLayoutParams(layoutParamsDoesNot);
|
||||
}
|
||||
|
||||
mContent.setLayoutParams(
|
||||
new LinearLayout.LayoutParams(
|
||||
contentWidthPx, LinearLayout.LayoutParams.WRAP_CONTENT));
|
||||
|
||||
// The learn more text view has height of min_touch_target_size. This effectively
|
||||
// creates padding above and below it, depending on Android font size settings.
|
||||
// We want to have a R.dimen.learn_more_vertical_spacing tall gap between the learn more
|
||||
// text and the adjacent elements. So adjust the margin to be the difference between
|
||||
// targeted spacing and effective padding.
|
||||
int innerSpacing =
|
||||
(int)
|
||||
((getContext()
|
||||
.getResources()
|
||||
.getDimensionPixelSize(
|
||||
R.dimen.min_touch_target_size)
|
||||
- mLearnMore.getTextSize())
|
||||
/ 2);
|
||||
int learnMoreVerticalMargin =
|
||||
mResources.getDimensionPixelSize(R.dimen.incognito_ntp_learn_more_vertical_spacing)
|
||||
- innerSpacing;
|
||||
|
||||
LinearLayout.LayoutParams params = (LayoutParams) mLearnMore.getLayoutParams();
|
||||
params.setMargins(0, learnMoreVerticalMargin, 0, learnMoreVerticalMargin);
|
||||
|
||||
mContainer.setPadding(
|
||||
paddingHorizontalPx, paddingVerticalPx, paddingHorizontalPx, paddingVerticalPx);
|
||||
}
|
||||
|
||||
/** Populate LearnMore view. **/
|
||||
private void adjustLearnMore(OnClickListener onClickListener) {
|
||||
String text =
|
||||
getContext().getResources().getString(R.string.revamped_incognito_ntp_learn_more);
|
||||
|
||||
// Make the text between the <a> tags to be clickable, blue, without underline.
|
||||
SpanApplier.SpanInfo spanInfo =
|
||||
new SpanApplier.SpanInfo(
|
||||
"<a>",
|
||||
"</a>",
|
||||
new NoUnderlineClickableSpan(
|
||||
getContext(),
|
||||
R.color.default_text_color_link_light,
|
||||
onClickListener::onClick));
|
||||
|
||||
SpannableString formattedText = SpanApplier.applySpans(text, spanInfo);
|
||||
|
||||
mLearnMore.setText(formattedText);
|
||||
mLearnMore.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
private boolean isNarrowScreen() {
|
||||
int wideLayoutThresholdPx =
|
||||
mResources.getDimensionPixelSize(R.dimen.incognito_ntp_wide_layout_threshold);
|
||||
return mWidthPx <= wideLayoutThresholdPx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieControlsEnforcement(@CookieControlsEnforcement int enforcement) {
|
||||
if (!findCookieControlElements()) return;
|
||||
boolean enforced = enforcement != CookieControlsEnforcement.NO_ENFORCEMENT;
|
||||
mCookieControlsToggle.setEnabled(!enforced);
|
||||
mCookieControlsManagedIcon.setVisibility(enforced ? View.VISIBLE : View.GONE);
|
||||
mCookieControlsTitle.setEnabled(!enforced);
|
||||
mCookieControlsSubtitle.setEnabled(!enforced);
|
||||
|
||||
Resources resources = getContext().getResources();
|
||||
StringBuilder subtitleText = new StringBuilder();
|
||||
subtitleText.append(resources.getString(R.string.new_tab_otr_third_party_cookie_sublabel));
|
||||
if (!enforced) {
|
||||
mCookieControlsSubtitle.setText(subtitleText.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
int iconRes;
|
||||
String addition;
|
||||
switch (enforcement) {
|
||||
case CookieControlsEnforcement.ENFORCED_BY_POLICY:
|
||||
iconRes = R.drawable.ic_business_small;
|
||||
addition = resources.getString(R.string.managed_by_your_organization);
|
||||
break;
|
||||
case CookieControlsEnforcement.ENFORCED_BY_COOKIE_SETTING:
|
||||
iconRes = R.drawable.settings_cog;
|
||||
addition =
|
||||
resources.getString(
|
||||
R.string.new_tab_otr_cookie_controls_controlled_tooltip_text);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
mCookieControlsManagedIcon.setImageResource(iconRes);
|
||||
subtitleText.append("\n");
|
||||
subtitleText.append(addition);
|
||||
mCookieControlsSubtitle.setText(subtitleText.toString());
|
||||
}
|
||||
|
||||
/** Finds the 3PC controls and returns true if they exist. */
|
||||
private boolean findCookieControlElements() {
|
||||
mCookieControlsToggle = findViewById(R.id.revamped_cookie_controls_card_toggle);
|
||||
if (mCookieControlsToggle == null) return false;
|
||||
mCookieControlsManagedIcon = findViewById(R.id.revamped_cookie_controls_card_managed_icon);
|
||||
mCookieControlsTitle = findViewById(R.id.revamped_cookie_controls_card_title);
|
||||
mCookieControlsSubtitle = findViewById(R.id.revamped_cookie_controls_card_subtitle);
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -54,10 +54,7 @@ import java.util.Locale;
|
||||
/** Integration tests for IncognitoNewTabPage. */
|
||||
@RunWith(ChromeJUnit4ClassRunner.class)
|
||||
@Batch(Batch.PER_CLASS)
|
||||
@DisableFeatures({
|
||||
ChromeFeatureList.INCOGNITO_NTP_REVAMP,
|
||||
ChromeFeatureList.TRACKING_PROTECTION_3PCD
|
||||
})
|
||||
@DisableFeatures({ChromeFeatureList.TRACKING_PROTECTION_3PCD})
|
||||
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
|
||||
public class IncognitoNewTabPageTest {
|
||||
@ClassRule
|
||||
|
@@ -1,92 +0,0 @@
|
||||
// Copyright 2021 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package org.chromium.chrome.browser.ntp;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.ViewStub;
|
||||
|
||||
import androidx.test.filters.MediumTest;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.chromium.base.test.params.ParameterAnnotations.ClassParameter;
|
||||
import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate;
|
||||
import org.chromium.base.test.params.ParameterSet;
|
||||
import org.chromium.base.test.params.ParameterizedRunner;
|
||||
import org.chromium.base.test.util.Feature;
|
||||
import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
|
||||
import org.chromium.chrome.test.R;
|
||||
import org.chromium.chrome.test.util.ChromeRenderTestRule;
|
||||
import org.chromium.content_public.browser.test.util.TestThreadUtils;
|
||||
import org.chromium.ui.test.util.BlankUiTestActivityTestCase;
|
||||
import org.chromium.ui.test.util.NightModeTestUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/** Render test of revamped incognito description in the incognito ntp. */
|
||||
@RunWith(ParameterizedRunner.class)
|
||||
@UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
|
||||
public class RevampedIncognitoDescriptionViewRenderTest extends BlankUiTestActivityTestCase {
|
||||
@ClassParameter
|
||||
private static List<ParameterSet> sClassParams =
|
||||
new NightModeTestUtils.NightModeParams().getParameters();
|
||||
|
||||
@Rule
|
||||
public ChromeRenderTestRule mRenderTestRule =
|
||||
ChromeRenderTestRule.Builder.withPublicCorpus()
|
||||
.setRevision(1)
|
||||
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_INCOGNITO)
|
||||
.build();
|
||||
|
||||
public RevampedIncognitoDescriptionViewRenderTest(boolean nightModeEnabled) {
|
||||
NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled);
|
||||
mRenderTestRule.setNightModeEnabled(nightModeEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpTest() throws Exception {
|
||||
super.setUpTest();
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
Activity activity = getActivity();
|
||||
activity.setContentView(R.layout.revamped_incognito_description_layout);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@MediumTest
|
||||
@Feature({"RenderTest"})
|
||||
public void testRender_RevampedIncognitoDescriptionView() throws IOException {
|
||||
View view = getActivity().findViewById(android.R.id.content);
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
view.setBackgroundResource(R.color.ntp_bg_incognito);
|
||||
ViewStub cardStub = getActivity().findViewById(R.id.cookie_card_stub);
|
||||
cardStub.setLayoutResource(R.layout.revamped_incognito_cookie_controls_card);
|
||||
cardStub.inflate();
|
||||
});
|
||||
mRenderTestRule.render(view, "revamped_incognito_description_view");
|
||||
}
|
||||
|
||||
@Test
|
||||
@MediumTest
|
||||
@Feature({"RenderTest"})
|
||||
public void testRender_RevampedIncognitoDescriptionViewTrackingProtection() throws IOException {
|
||||
View view = getActivity().findViewById(android.R.id.content);
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
view.setBackgroundResource(R.color.ntp_bg_incognito);
|
||||
ViewStub cardStub = getActivity().findViewById(R.id.cookie_card_stub);
|
||||
cardStub.setLayoutResource(
|
||||
R.layout.revamped_incognito_tracking_protection_card);
|
||||
cardStub.inflate();
|
||||
});
|
||||
mRenderTestRule.render(view, "revamped_incognito_description_view_tracking_protection");
|
||||
}
|
||||
}
|
193
chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoNewTabPageTest.java
193
chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoNewTabPageTest.java
@@ -1,193 +0,0 @@
|
||||
// Copyright 2022 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package org.chromium.chrome.browser.ntp;
|
||||
|
||||
import static androidx.test.espresso.Espresso.onView;
|
||||
import static androidx.test.espresso.action.ViewActions.click;
|
||||
import static androidx.test.espresso.action.ViewActions.scrollTo;
|
||||
import static androidx.test.espresso.assertion.ViewAssertions.matches;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isChecked;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isEnabled;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isNotChecked;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withId;
|
||||
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import androidx.test.espresso.matcher.ViewMatchers;
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.chromium.base.LocaleUtils;
|
||||
import org.chromium.base.test.util.Batch;
|
||||
import org.chromium.base.test.util.CommandLineFlags;
|
||||
import org.chromium.base.test.util.Features.DisableFeatures;
|
||||
import org.chromium.base.test.util.Features.EnableFeatures;
|
||||
import org.chromium.chrome.browser.ProductConfig;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.flags.ChromeSwitches;
|
||||
import org.chromium.chrome.browser.preferences.Pref;
|
||||
import org.chromium.chrome.browser.profiles.ProfileManager;
|
||||
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
|
||||
import org.chromium.chrome.test.ChromeTabbedActivityTestRule;
|
||||
import org.chromium.chrome.test.R;
|
||||
import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule;
|
||||
import org.chromium.components.content_settings.CookieControlsMode;
|
||||
import org.chromium.components.content_settings.PrefNames;
|
||||
import org.chromium.components.prefs.PrefService;
|
||||
import org.chromium.components.user_prefs.UserPrefs;
|
||||
import org.chromium.content_public.browser.test.util.TestThreadUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/** Integration tests for IncognitoNewTabPage. */
|
||||
@RunWith(ChromeJUnit4ClassRunner.class)
|
||||
@Batch(Batch.PER_CLASS)
|
||||
@EnableFeatures({ChromeFeatureList.INCOGNITO_NTP_REVAMP})
|
||||
@DisableFeatures({ChromeFeatureList.TRACKING_PROTECTION_3PCD})
|
||||
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
|
||||
public class RevampedIncognitoNewTabPageTest {
|
||||
@ClassRule
|
||||
public static ChromeTabbedActivityTestRule sActivityTestRule =
|
||||
new ChromeTabbedActivityTestRule();
|
||||
|
||||
@Rule
|
||||
public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule =
|
||||
new BlankCTATabInitialStateRule(sActivityTestRule, false);
|
||||
|
||||
private void setCookieControlsMode(@CookieControlsMode int mode) {
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
PrefService prefService =
|
||||
UserPrefs.get(ProfileManager.getLastUsedRegularProfile());
|
||||
prefService.setInteger(PrefNames.COOKIE_CONTROLS_MODE, mode);
|
||||
});
|
||||
}
|
||||
|
||||
private void assertCookieControlsMode(@CookieControlsMode int mode) {
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
Assert.assertEquals(
|
||||
UserPrefs.get(ProfileManager.getLastUsedRegularProfile())
|
||||
.getInteger(PrefNames.COOKIE_CONTROLS_MODE),
|
||||
mode);
|
||||
});
|
||||
}
|
||||
|
||||
private void enableTrackingProtection() {
|
||||
TestThreadUtils.runOnUiThreadBlocking(
|
||||
() -> {
|
||||
PrefService prefService =
|
||||
UserPrefs.get(ProfileManager.getLastUsedRegularProfile());
|
||||
prefService.setBoolean(Pref.TRACKING_PROTECTION3PCD_ENABLED, true);
|
||||
});
|
||||
}
|
||||
|
||||
/** Test cookie controls toggle defaults to on if cookie controls mode is on. */
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testCookieControlsToggleStartsOn() throws Exception {
|
||||
setCookieControlsMode(CookieControlsMode.INCOGNITO_ONLY);
|
||||
sActivityTestRule.newIncognitoTabFromMenu();
|
||||
|
||||
// Make sure cookie controls card is visible.
|
||||
onView(withId(R.id.revamped_cookie_controls_card))
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
|
||||
// Assert the cookie controls toggle is checked.
|
||||
onView(withId(R.id.revamped_cookie_controls_card_toggle)).check(matches(isChecked()));
|
||||
}
|
||||
|
||||
/** Test cookie controls toggle turns on and off cookie controls mode as expected. */
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testCookieControlsToggleChanges() throws Exception {
|
||||
setCookieControlsMode(CookieControlsMode.OFF);
|
||||
sActivityTestRule.newIncognitoTabFromMenu();
|
||||
onView(withId(R.id.revamped_cookie_controls_card))
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
|
||||
|
||||
int toggle_id = R.id.revamped_cookie_controls_card_toggle;
|
||||
// Toggle should start unchecked.
|
||||
onView(withId(toggle_id)).check(matches(isNotChecked()));
|
||||
// Toggle should be checked after click.
|
||||
onView(withId(toggle_id)).perform(scrollTo(), click()).check(matches(isChecked()));
|
||||
// CookieControlsMode should be incognito_only.
|
||||
assertCookieControlsMode(CookieControlsMode.INCOGNITO_ONLY);
|
||||
// Toggle should be unchecked again after click.
|
||||
onView(withId(toggle_id)).perform(scrollTo(), click()).check(matches(isNotChecked()));
|
||||
// CookieControlsMode should be off.
|
||||
assertCookieControlsMode(CookieControlsMode.OFF);
|
||||
}
|
||||
|
||||
/** Test cookie controls disabled if managed by settings. */
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testCookieControlsToggleManaged() throws Exception {
|
||||
setCookieControlsMode(CookieControlsMode.INCOGNITO_ONLY);
|
||||
sActivityTestRule.newIncognitoTabFromMenu();
|
||||
onView(withId(R.id.revamped_cookie_controls_card))
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
|
||||
|
||||
int toggle_id = R.id.revamped_cookie_controls_card_toggle;
|
||||
// Toggle should start checked and enabled.
|
||||
onView(withId(toggle_id)).check(matches(allOf(isChecked(), isEnabled())));
|
||||
// Toggle should be disabled if managed by setting.
|
||||
setCookieControlsMode(CookieControlsMode.BLOCK_THIRD_PARTY);
|
||||
onView(withId(toggle_id)).check(matches(not(isEnabled())));
|
||||
// Toggle should be enabled and remain checked.
|
||||
setCookieControlsMode(CookieControlsMode.INCOGNITO_ONLY);
|
||||
onView(withId(toggle_id)).check(matches(allOf(isChecked(), isEnabled())));
|
||||
|
||||
// Repeat of above but toggle should remain unchecked.
|
||||
onView(withId(toggle_id)).perform(scrollTo(), click());
|
||||
onView(withId(toggle_id)).check(matches(allOf(isNotChecked(), isEnabled())));
|
||||
setCookieControlsMode(CookieControlsMode.BLOCK_THIRD_PARTY);
|
||||
onView(withId(toggle_id)).check(matches(not(isEnabled())));
|
||||
setCookieControlsMode(CookieControlsMode.OFF);
|
||||
onView(withId(toggle_id)).check(matches(allOf(isNotChecked(), isEnabled())));
|
||||
}
|
||||
|
||||
/** Test the tracking protection layout. */
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testTrackingProtection() throws Exception {
|
||||
enableTrackingProtection();
|
||||
sActivityTestRule.newIncognitoTabFromMenu();
|
||||
onView(withId(R.id.revamped_tracking_protection_card))
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
|
||||
}
|
||||
|
||||
private Context createContextForLocale(Context context, String languageTag) {
|
||||
Locale locale = LocaleUtils.forLanguageTag(languageTag);
|
||||
Resources res = context.getResources();
|
||||
Configuration config = res.getConfiguration();
|
||||
config.setLocale(locale);
|
||||
return context.createConfigurationContext(config);
|
||||
}
|
||||
|
||||
/** Test the ntp text formatting for all locales. */
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testDescriptionLanguages() throws Exception {
|
||||
var context = sActivityTestRule.getActivity().getApplicationContext();
|
||||
for (String languageTag : ProductConfig.LOCALES) {
|
||||
var localeContext = createContextForLocale(context, languageTag);
|
||||
RevampedIncognitoDescriptionView.getSpannedBulletText(
|
||||
localeContext, R.string.revamped_incognito_ntp_does_description);
|
||||
RevampedIncognitoDescriptionView.getSpannedBulletText(
|
||||
localeContext, R.string.revamped_incognito_ntp_does_not_description);
|
||||
}
|
||||
}
|
||||
}
|
@@ -126,7 +126,6 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&features::kPwaUpdateDialogForIcon,
|
||||
&features::kQuietNotificationPrompts,
|
||||
&features::kWebNfc,
|
||||
&features::kIncognitoNtpRevamp,
|
||||
&feature_engagement::kIPHTabSwitcherButtonFeature,
|
||||
&feed::kFeedContainment,
|
||||
&feed::kFeedDynamicColors,
|
||||
|
@@ -310,7 +310,6 @@ public abstract class ChromeFeatureList {
|
||||
public static final String HASH_PREFIX_REAL_TIME_LOOKUPS =
|
||||
"SafeBrowsingHashPrefixRealTimeLookups";
|
||||
public static final String HISTORY_JOURNEYS = "Journeys";
|
||||
public static final String INCOGNITO_NTP_REVAMP = "IncognitoNtpRevamp";
|
||||
public static final String INCOGNITO_REAUTHENTICATION_FOR_ANDROID =
|
||||
"IncognitoReauthenticationForAndroid";
|
||||
public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot";
|
||||
@@ -790,8 +789,6 @@ public abstract class ChromeFeatureList {
|
||||
newMutableFlagWithSafeDefault(ANDROID_TAB_DECLUTTER_RESCUE_KILLSWITCH, true);
|
||||
public static final MutableFlagWithSafeDefault sBrowserControlsEarlyResize =
|
||||
newMutableFlagWithSafeDefault(BROWSER_CONTROLS_EARLY_RESIZE, false);
|
||||
public static final MutableFlagWithSafeDefault sIncognitoNtpRevamp =
|
||||
newMutableFlagWithSafeDefault(INCOGNITO_NTP_REVAMP, false);
|
||||
public static final MutableFlagWithSafeDefault sIncognitoScreenshot =
|
||||
newMutableFlagWithSafeDefault(INCOGNITO_SCREENSHOT, false);
|
||||
public static final MutableFlagWithSafeDefault sNoVisibleHintForDifferentTLD =
|
||||
|
@@ -807,11 +807,6 @@ BASE_FEATURE(kIncompatibleApplicationsWarning,
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
// When enabled, users will see updated UI in Incognito NTP
|
||||
BASE_FEATURE(kIncognitoNtpRevamp,
|
||||
"IncognitoNtpRevamp",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Enables automatic updates of Isolated Web Apps.
|
||||
BASE_FEATURE(kIsolatedWebAppAutomaticUpdates,
|
||||
|
@@ -486,8 +486,6 @@ COMPONENT_EXPORT(CHROME_FEATURES)
|
||||
BASE_DECLARE_FEATURE(kIncompatibleApplicationsWarning);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kIncognitoNtpRevamp);
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
COMPONENT_EXPORT(CHROME_FEATURES)
|
||||
BASE_DECLARE_FEATURE(kIsolatedWebAppAutomaticUpdates);
|
||||
|
23
chrome/test/android/javatests/src/org/chromium/chrome/test/transit/IncognitoNewTabPageStation.java
23
chrome/test/android/javatests/src/org/chromium/chrome/test/transit/IncognitoNewTabPageStation.java
@@ -12,16 +12,11 @@ import static org.chromium.base.test.transit.ViewElement.sharedViewElement;
|
||||
import org.chromium.base.test.transit.Elements;
|
||||
import org.chromium.base.test.transit.ViewElement;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
|
||||
/** The Incognito New Tab Page screen, with text about Incognito mode. */
|
||||
public class IncognitoNewTabPageStation extends PageStation {
|
||||
public ViewElement ICON = sharedViewElement(withId(R.id.new_tab_incognito_icon));
|
||||
public ViewElement GONE_INCOGNITO_TEXT = sharedViewElement(withText("You’ve gone Incognito"));
|
||||
public ViewElement REVAMPED_ICON = sharedViewElement(withId(R.id.revamped_incognito_ntp_icon));
|
||||
public ViewElement REVAMPED_DOES_TEXT = sharedViewElement(withText("What Incognito does"));
|
||||
public ViewElement REVAMPED_DOESNT_TEXT =
|
||||
sharedViewElement(withText("What Incognito doesn’t do"));
|
||||
|
||||
protected IncognitoNewTabPageStation(Builder<IncognitoNewTabPageStation> builder) {
|
||||
super(builder.withIncognito(true));
|
||||
@@ -34,22 +29,8 @@ public class IncognitoNewTabPageStation extends PageStation {
|
||||
@Override
|
||||
public void declareElements(Elements.Builder elements) {
|
||||
super.declareElements(elements);
|
||||
|
||||
boolean isTablet = mChromeTabbedActivityTestRule.getActivity().isTablet();
|
||||
|
||||
if (ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP)) {
|
||||
elements.declareView(REVAMPED_ICON);
|
||||
elements.declareView(REVAMPED_DOES_TEXT);
|
||||
// TODO(crbug.com/335440649): On generic_android32_foldable the soft keyboard is
|
||||
// opened over this text.
|
||||
if (!isTablet) {
|
||||
elements.declareView(REVAMPED_DOESNT_TEXT);
|
||||
}
|
||||
} else {
|
||||
elements.declareView(ICON);
|
||||
elements.declareView(GONE_INCOGNITO_TEXT);
|
||||
}
|
||||
|
||||
elements.declareView(ICON);
|
||||
elements.declareView(GONE_INCOGNITO_TEXT);
|
||||
elements.declareEnterCondition(new NtpLoadedCondition(mPageLoadedEnterCondition));
|
||||
}
|
||||
}
|
||||
|
@@ -234,67 +234,4 @@
|
||||
</message>
|
||||
</if>
|
||||
|
||||
<!-- Revamped Incognito New Tab Page strings -->
|
||||
|
||||
<if expr="_google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_TITLE" desc="Title of the Incognito new tab page." formatter_data="android_java">
|
||||
Incognito in Chrome
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not _google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_TITLE" desc="Title of the Incognito new tab page." formatter_data="android_java">
|
||||
Incognito in Chromium
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_DOES_HEADER" desc="Header for the 'Incognito does' section that informs users about what happens while browsing Incognito: browsing activity, search history and information entered in forms are not saved locally." formatter_data="android_java">
|
||||
What Incognito does
|
||||
</message>
|
||||
<if expr="_google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_DOES_DESCRIPTION" desc="Paragraph that informs users about Incognito's functionalities: browsing activity, search history and information entered in forms are not saved locally, they are cleared after closing all Incognito tabs. 'Browsing activity' refers to the browsing history (list of visited websites) and the cookies (data saved by websites on the user's device such as: sign-in state, preferences, etc.). 'Search history from this device' means that searches will not be saved locally or used as search suggestions in the future. 'Information entered in forms' refers to names, addresses, passwords etc. that users enter into forms on the web." formatter_data="android_java">
|
||||
When you close all Chrome Incognito tabs, your activity in those tabs is removed from this device:
|
||||
<ph name="BEGIN_LIST"><ul></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Browsing activity<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Search history<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Information entered in forms<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="END_LIST"></ul></ph>
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not _google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_DOES_DESCRIPTION" desc="Paragraph that informs users about Incognito's functionalities: browsing activity, search history and information entered in forms are not saved locally, they are cleared after closing all Incognito tabs. 'Browsing activity' refers to the browsing history (list of visited websites) and the cookies (data saved by websites on the user's device such as: sign-in state, preferences, etc.). 'Search history from this device' means that searches will not be saved locally or used as search suggestions in the future. 'Information entered in forms' refers to names, addresses, passwords etc. that users enter into forms on the web." formatter_data="android_java">
|
||||
When you close all Chromium Incognito tabs, your activity in those tabs is removed from this device:
|
||||
<ph name="BEGIN_LIST"><ul></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Browsing activity<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Search history<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Information entered in forms<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="END_LIST"></ul></ph>
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_DOES_NOT_HEADER" desc="Header for the 'Incognito doesn’t do' section that informs users that they are not invisible online." formatter_data="android_java">
|
||||
What Incognito doesn’t do
|
||||
</message>
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_DOES_NOT_DESCRIPTION" desc="Paragraph that informs users that their online activity is still visible while using Incognito. The bullet points list some examples of entities to which users are not invisible in Incognito and what they can observe. The bullet points elaborate on the fact that Incognito only provides privacy with respect to other users on the same device. Websites you visit still know that you visited them. Employers and schools can still track users' browsing activity and internet service providers can still monitor web traffic, even if it comes from the Incognito mode." formatter_data="android_java">
|
||||
Incognito does not make you invisible online:
|
||||
<ph name="BEGIN_LIST"><ul></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Sites and the services they use can see visits<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Employers or schools can track browsing activity<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="LIST_ITEM"><li></ph>Internet service providers can monitor web traffic<ph name="END_LIST_ITEM"></li></ph>
|
||||
<ph name="END_LIST"></ul></ph>
|
||||
</message>
|
||||
<if expr="_google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_LEARN_MORE" desc="The link text displayed on the Incognito new tab page pointing users to the Incognito learn more page." formatter_data="android_java">
|
||||
<ph name="BEGIN_LINK"><a></ph>Learn more about Incognito in Chrome<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not _google_chrome">
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_LEARN_MORE" desc="The link text displayed on the Incognito new tab page pointing users to the Incognito learn more page." formatter_data="android_java">
|
||||
<ph name="BEGIN_LINK"><a></ph>Learn more about Incognito in Chromium<ph name="END_LINK"></a></ph>
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_OTR_THIRD_PARTY_COOKIE" desc="Label for the Block 3rd-party cookie checkbox on the Cookies category." formatter_data="android_java">
|
||||
Block third party cookies in Incognito
|
||||
</message>
|
||||
<message name="IDS_REVAMPED_INCOGNITO_NTP_OTR_THIRD_PARTY_COOKIE_SUBLABEL" desc="A sub-label below the Block 3rd-party cookie checkbox." formatter_data="android_java">
|
||||
Sites can't use cookies that track you across the web. Features on some sites may break.
|
||||
</message>
|
||||
|
||||
</grit-part>
|
||||
|
@@ -1 +0,0 @@
|
||||
cdcfc83b2190fb3f3337b6ec0c01d6344736c31a
|
@@ -1 +0,0 @@
|
||||
53baedcec162646ba0ca45ffa1f045ce93977180
|
@@ -1 +0,0 @@
|
||||
53baedcec162646ba0ca45ffa1f045ce93977180
|
@@ -1 +0,0 @@
|
||||
53baedcec162646ba0ca45ffa1f045ce93977180
|
@@ -1 +0,0 @@
|
||||
53baedcec162646ba0ca45ffa1f045ce93977180
|
@@ -1 +0,0 @@
|
||||
00ec8f397ac8e05f59687fd9dc2dc815c9688d2e
|
@@ -1 +0,0 @@
|
||||
00ec8f397ac8e05f59687fd9dc2dc815c9688d2e
|
@@ -1 +0,0 @@
|
||||
53baedcec162646ba0ca45ffa1f045ce93977180
|
Reference in New Issue
Block a user