DRP delete network properties manager

No longer needed with the data reduction proxy (DRP) being disabled.

The pref that stored network properties is now being deleted
via chrome/browser/prefs/browser_prefs.cc

Change-Id: Ide5f22c3460f84d272df1524f1f17429e38e1018
Bug: 1048736
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2104095
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Robert Ogden <[email protected]>
Reviewed-by: Martin Šrámek <[email protected]>
Commit-Queue: Dominic Battré <[email protected]>
Auto-Submit: Tarun Bansal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#750907}
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
index 6f55cf29..1571c750 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -963,25 +963,6 @@
 #endif  // BUILDFLAG(ENABLE_FEED_IN_CHROME)
 #endif  // defined(OS_ANDROID)
 
-    // Notify data reduction component.
-    data_reduction_proxy::DataReductionProxySettings*
-        data_reduction_proxy_settings =
-            DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
-                profile_);
-    // |data_reduction_proxy_settings| is null if |profile_| is off the record.
-    // Skip notification if the user clears cache for only a finite set of
-    // sites.
-    if (data_reduction_proxy_settings &&
-        filter_builder->GetMode() != BrowsingDataFilterBuilder::WHITELIST) {
-      data_reduction_proxy::DataReductionProxyService*
-          data_reduction_proxy_service =
-              data_reduction_proxy_settings->data_reduction_proxy_service();
-      if (data_reduction_proxy_service) {
-        data_reduction_proxy_service->OnCacheCleared(delete_begin_,
-                                                     delete_end_);
-      }
-    }
-
 #if defined(OS_ANDROID)
     // For now we're considering offline pages as cache, so if we're removing
     // cache we should remove offline pages as well.
diff --git a/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.cc
index 309dc722..be78cc05 100644
--- a/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.cc
+++ b/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.cc
@@ -239,10 +239,6 @@
   data_reduction_proxy::DataReductionProxySettings::
       InitDataReductionProxySettings(profile_prefs, std::move(service));
 
-#if defined(OS_CHROMEOS)
-  data_reduction_proxy_service()->config()->EnableGetNetworkIdAsynchronously();
-#endif
-
   data_reduction_proxy::DataReductionProxySettings::
       SetCallbackToRegisterSyntheticFieldTrial(base::Bind(
           &ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial));
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 447f02a..b5129634 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -522,6 +522,8 @@
 const char kGoogleServicesUserAccountId[] = "google.services.user_account_id";
 const char kDataReductionProxySavingsClearedNegativeSystemClock[] =
     "data_reduction.savings_cleared_negative_system_clock";
+const char kDataReductionNetworkProperties[] =
+    "data_reduction.network_properties";
 
 #if defined(OS_CHROMEOS)
 // Deprecated 10/2019
@@ -627,6 +629,7 @@
   registry->RegisterStringPref(kGoogleServicesUserAccountId, std::string());
   registry->RegisterInt64Pref(
       kDataReductionProxySavingsClearedNegativeSystemClock, 0);
+  registry->RegisterDictionaryPref(kDataReductionNetworkProperties);
 
 #if defined(OS_CHROMEOS)
   registry->RegisterBooleanPref(
@@ -1308,4 +1311,7 @@
   profile_prefs->ClearPref(kInvalidatorSavedInvalidations);
   profile_prefs->ClearPref(kInvalidatorInvalidationState);
   profile_prefs->ClearPref(kInvalidatorClientId);
+
+  // Added 3/2020.
+  profile_prefs->ClearPref(kDataReductionNetworkProperties);
 }