Skip to content

Commit

Permalink
Remove unused network prediction related enums and a method.
Browse files Browse the repository at this point in the history
This is a follow-up to https://crrev.com/c/2568665.

Bug: 526773
Change-Id: I48beb93d9ca3366f519251c909da951215c6e0cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587237
Reviewed-by: Natalie Chouinard <chouinard@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838276}
  • Loading branch information
Bence Béky authored and Chromium LUCI CQ committed Dec 17, 2020
1 parent 53e3903 commit 35ac37a
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 73 deletions.
1 change: 0 additions & 1 deletion chrome/android/chrome_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/previews/PreviewsUma.java",
"java/src/org/chromium/chrome/browser/printing/PrintShareActivity.java",
"java/src/org/chromium/chrome/browser/printing/TabPrinter.java",
"java/src/org/chromium/chrome/browser/privacy/settings/BandwidthType.java",
"java/src/org/chromium/chrome/browser/privacy/settings/DoNotTrackSettings.java",
"java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java",
"java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ public boolean isMetricsReportingManaged() {
return PrivacyPreferencesManagerImplJni.get().isMetricsReportingManaged();
}

/**
* @return Whether there is a user set value for kNetworkPredictionOptions. This should only be
* used for preference migration. See http://crbug.com/334602
*/
private boolean obsoleteNetworkPredictionOptionsHasUserSetting() {
return PrivacyPreferencesManagerImplJni.get()
.obsoleteNetworkPredictionOptionsHasUserSetting();
}

@Override
public boolean getNetworkPredictionEnabled() {
return PrivacyPreferencesManagerImplJni.get().getNetworkPredictionEnabled();
Expand All @@ -175,7 +166,6 @@ public boolean isNetworkPredictionManaged() {
public interface Natives {
boolean canPrefetchAndPrerender();
boolean getNetworkPredictionManaged();
boolean obsoleteNetworkPredictionOptionsHasUserSetting();
boolean getNetworkPredictionEnabled();
void setNetworkPredictionEnabled(boolean enabled);
boolean isMetricsReportingEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,3 @@ static void JNI_PrivacyPreferencesManagerImpl_SetNetworkPredictionEnabled(
enabled ? chrome_browser_net::NETWORK_PREDICTION_WIFI_ONLY
: chrome_browser_net::NETWORK_PREDICTION_NEVER);
}

static jboolean
JNI_PrivacyPreferencesManagerImpl_ObsoleteNetworkPredictionOptionsHasUserSetting(
JNIEnv* env) {
return GetPrefService()->GetUserPrefValue(prefs::kNetworkPredictionOptions) !=
nullptr;
}
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,6 @@ public final class ChromePreferenceKeys {

public static final String PRIVACY_METRICS_REPORTING = "metrics_reporting";
public static final String PRIVACY_METRICS_IN_SAMPLE = "in_metrics_sample";
public static final String PRIVACY_BANDWIDTH_OLD = "prefetch_bandwidth";
public static final String PRIVACY_BANDWIDTH_NO_CELLULAR_OLD = "prefetch_bandwidth_no_cellular";
public static final String PRIVACY_ALLOW_PRERENDER_OLD = "allow_prefetch";

public static final String PROFILES_BOOT_TIMESTAMP =
"com.google.android.apps.chrome.ChromeMobileApplication.BOOT_TIMESTAMP";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static List<String> getKeysForTesting() {
"PrefMigrationVersion",
"ServiceManagerFeatures",
"allow_low_end_device_ui",
"allow_prefetch",
"allow_starting_service_manager_only",
"bookmark_search_history",
"bottom_toolbar_enabled",
Expand All @@ -65,6 +66,8 @@ static List<String> getKeysForTesting() {
"ntp_button_variant",
"physical_web",
"physical_web_sharing",
"prefetch_bandwidth",
"prefetch_bandwidth_no_cellular",
"sole_integration_enabled",
"start_surface_single_pane_enabled",
"tab_persistent_store_task_runner_enabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ static List<String> getKeysInUse() {
ChromePreferenceKeys.PREFETCH_NOTIFICATION_ENABLED,
ChromePreferenceKeys.PREFETCH_NOTIFICATION_TIME,
ChromePreferenceKeys.PREFETCH_OFFLINE_COUNTER,
ChromePreferenceKeys.PRIVACY_ALLOW_PRERENDER_OLD,
ChromePreferenceKeys.PRIVACY_BANDWIDTH_NO_CELLULAR_OLD,
ChromePreferenceKeys.PRIVACY_BANDWIDTH_OLD,
ChromePreferenceKeys.PRIVACY_METRICS_IN_SAMPLE,
ChromePreferenceKeys.PRIVACY_METRICS_REPORTING,
ChromePreferenceKeys.PROFILES_BOOT_TIMESTAMP,
Expand Down

0 comments on commit 35ac37a

Please sign in to comment.