[iOS] Removing preload feature from Sync and Google services
Since Unity doesn't turn on anymore preload pages feature when the user
signs in, and since it is not related to Google services, preload pages
feature should not be part of Sync and Google services screen.
Bug: 925885
Change-Id: I815d4f59682a446e0574b61c60c23c59a4390e11
Reviewed-on: https://chromium-review.googlesource.com/c/1497951
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637238}
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd
index 713cd99..a1ea73b 100644
--- a/ios/chrome/app/strings/ios_strings.grd
+++ b/ios/chrome/app/strings/ios_strings.grd
@@ -742,12 +742,6 @@
<message name="IDS_IOS_GOOGLE_SERVICES_SETTINGS_IMPROVE_CHROME_DETAIL" desc="Feature detail text in the settings for the user enable or disable. Related with 'Help improve Chrome's features and performance' feature. [iOS only]">
Automatically sends usage statistics and crash reports to Google
</message>
- <message name="IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_DETAIL" desc="Detail text for a feature in the settings for the user to enable/disable, to preload pages. Related to 'Preload pages for faster browsing and searching'. [iOS only]">
- Uses cookies to remember your preferences, even if you don't visit those pages
- </message>
- <message name="IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_TEXT" desc="Title for a feature in the settings for the user to enable/disable, to preload pages. Related to 'Uses cookies to remember your preferences, even if you don't visit those pages'. [iOS only]">
- Preload pages for faster browsing and searching
- </message>
<message name="IDS_IOS_GOOGLE_SERVICES_SETTINGS_SIGN_IN_DETAIL_TEXT" desc="Invite the user to sign-in and explains the benefit. [iOS only]">
Sync and personalize across devices
</message>
diff --git a/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm b/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm
index b6868bb..7d61d4d 100644
--- a/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm
@@ -131,10 +131,6 @@
detailTextID:
IDS_IOS_GOOGLE_SERVICES_SETTINGS_AUTOCOMPLETE_SEARCHES_AND_URLS_DETAIL];
[self
- assertCellWithTitleID:IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_TEXT
- detailTextID:
- IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_DETAIL];
- [self
assertCellWithTitleID:IDS_IOS_GOOGLE_SERVICES_SETTINGS_IMPROVE_CHROME_TEXT
detailTextID:
IDS_IOS_GOOGLE_SERVICES_SETTINGS_IMPROVE_CHROME_DETAIL];
diff --git a/ios/chrome/browser/ui/settings/google_services/google_services_settings_mediator.mm b/ios/chrome/browser/ui/settings/google_services/google_services_settings_mediator.mm
index e9053d1..25f64882 100644
--- a/ios/chrome/browser/ui/settings/google_services/google_services_settings_mediator.mm
+++ b/ios/chrome/browser/ui/settings/google_services/google_services_settings_mediator.mm
@@ -65,7 +65,6 @@
ManageSyncItemType,
// NonPersonalizedSectionIdentifier section.
AutocompleteSearchesAndURLsItemType,
- PreloadPagesItemType,
ImproveChromeItemType,
BetterSearchAndBrowsingItemType,
};
@@ -108,14 +107,6 @@
// Preference value for the "Autocomplete searches and URLs" feature.
@property(nonatomic, strong, readonly)
PrefBackedBoolean* autocompleteSearchPreference;
-// Preference value for the "Preload pages for faster browsing" feature.
-@property(nonatomic, strong, readonly)
- PrefBackedBoolean* preloadPagesPreference;
-// Preference value for the "Preload pages for faster browsing" for Wifi-Only.
-// TODO(crbug.com/872101): Needs to create the UI to change from Wifi-Only to
-// always
-@property(nonatomic, strong, readonly)
- PrefBackedBoolean* preloadPagesWifiOnlyPreference;
// Preference value for the "Help improve Chromium's features" feature.
@property(nonatomic, strong, readonly)
PrefBackedBoolean* sendDataUsagePreference;
@@ -149,13 +140,6 @@
initWithPrefService:userPrefService
prefName:prefs::kSearchSuggestEnabled];
_autocompleteSearchPreference.observer = self;
- _preloadPagesPreference = [[PrefBackedBoolean alloc]
- initWithPrefService:userPrefService
- prefName:prefs::kNetworkPredictionEnabled];
- _preloadPagesPreference.observer = self;
- _preloadPagesWifiOnlyPreference = [[PrefBackedBoolean alloc]
- initWithPrefService:userPrefService
- prefName:prefs::kNetworkPredictionWifiOnly];
_sendDataUsagePreference = [[PrefBackedBoolean alloc]
initWithPrefService:localPrefService
prefName:metrics::prefs::kMetricsReportingEnabled];
@@ -431,9 +415,6 @@
case AutocompleteSearchesAndURLsItemType:
switchItem.on = self.autocompleteSearchPreference.value;
break;
- case PreloadPagesItemType:
- switchItem.on = self.preloadPagesPreference.value;
- break;
case ImproveChromeItemType:
switchItem.on = self.sendDataUsagePreference.value;
break;
@@ -468,13 +449,6 @@
detailStringID:
IDS_IOS_GOOGLE_SERVICES_SETTINGS_AUTOCOMPLETE_SEARCHES_AND_URLS_DETAIL
dataType:0];
- SyncSwitchItem* preloadPagesItem =
- [self switchItemWithItemType:PreloadPagesItemType
- textStringID:
- IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_TEXT
- detailStringID:
- IDS_IOS_GOOGLE_SERVICES_SETTINGS_PRELOAD_PAGES_DETAIL
- dataType:0];
SyncSwitchItem* improveChromeItem =
[self switchItemWithItemType:ImproveChromeItemType
textStringID:
@@ -490,7 +464,7 @@
IDS_IOS_GOOGLE_SERVICES_SETTINGS_BETTER_SEARCH_AND_BROWSING_DETAIL
dataType:0];
_nonPersonalizedItems = @[
- autocompleteSearchesAndURLsItem, preloadPagesItem, improveChromeItem,
+ autocompleteSearchesAndURLsItem, improveChromeItem,
betterSearchAndBrowsingItemType
];
}
@@ -555,13 +529,6 @@
case AutocompleteSearchesAndURLsItemType:
self.autocompleteSearchPreference.value = value;
break;
- case PreloadPagesItemType:
- self.preloadPagesPreference.value = value;
- if (value) {
- // Should be wifi only, until https://crbug.com/872101 is fixed.
- self.preloadPagesWifiOnlyPreference.value = YES;
- }
- break;
case ImproveChromeItemType:
self.sendDataUsagePreference.value = value;
if (value) {
@@ -608,7 +575,6 @@
[self.commandHandler openManageSyncSettings];
break;
case AutocompleteSearchesAndURLsItemType:
- case PreloadPagesItemType:
case ImproveChromeItemType:
case BetterSearchAndBrowsingItemType:
case SyncChromeDataItemType:
diff --git a/ios/chrome/browser/ui/settings/settings_table_view_controller.mm b/ios/chrome/browser/ui/settings/settings_table_view_controller.mm
index 7a8b3f6..3cd51c4 100644
--- a/ios/chrome/browser/ui/settings/settings_table_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/settings_table_view_controller.mm
@@ -438,12 +438,8 @@
toSectionWithIdentifier:SectionIdentifierAdvanced];
[model addItem:[self contentSettingsDetailItem]
toSectionWithIdentifier:SectionIdentifierAdvanced];
- if (!unified_consent::IsUnifiedConsentFeatureEnabled()) {
- // When unified consent flag is enabled, the bandwidth settings is available
- // under the Google services and sync settings.
- [model addItem:[self bandwidthManagementDetailItem]
- toSectionWithIdentifier:SectionIdentifierAdvanced];
- }
+ [model addItem:[self bandwidthManagementDetailItem]
+ toSectionWithIdentifier:SectionIdentifierAdvanced];
// Info Section
[model addSectionWithIdentifier:SectionIdentifierInfo];