Move NQE prefs from browser process to network
Currently, Network Quality Estimator (NQE) stores
prefs on the disk. These prefs are managed (written t0
and read by) in the browser process, and then notified
to the network quality estimator object.
With network servicification, NQE object would live
in the network process, and would no longer be
accessible in the browser process.
This CL moves the management of prefs from the browser
process to the network process.
Bug: 878844
Change-Id: Id533c2260201c0c665ae3bde1a0fe955a140a70e
Reviewed-on: https://chromium-review.googlesource.com/c/1312977
Commit-Queue: Tarun Bansal <[email protected]>
Reviewed-by: Martin Šrámek <[email protected]>
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Reviewed-by: Ryan Sturm <[email protected]>
Cr-Commit-Position: refs/heads/master@{#605910}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c6be13b..f308b91 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -32,7 +32,6 @@
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
#include "chrome/browser/metrics/chrome_metrics_service_client.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
#include "chrome/browser/net/prediction_options.h"
#include "chrome/browser/net/profile_network_context_service.h"
#include "chrome/browser/net/system_network_context_manager.h"
@@ -378,6 +377,9 @@
// Deprecated 10/2018
const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
+// Deprecated 11/2018.
+const char kNetworkQualities[] = "net.network_qualities";
+
// Register prefs used only for migration (clearing or moving to a new key).
void RegisterProfilePrefsForMigration(
user_prefs::PrefRegistrySyncable* registry) {
@@ -403,6 +405,8 @@
registry->RegisterBooleanPref(kSupervisedUserCreationAllowed, true);
registry->RegisterBooleanPref(kReverseAutologinEnabled, true);
+
+ registry->RegisterDictionaryPref(kNetworkQualities, PrefRegistry::LOSSY_PREF);
}
} // namespace
@@ -603,7 +607,6 @@
syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
translate::TranslatePrefs::RegisterProfilePrefs(registry);
- UINetworkQualityEstimatorService::RegisterProfilePrefs(registry);
ZeroSuggestProvider::RegisterProfilePrefs(registry);
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -862,4 +865,7 @@
// Added 10/2018
profile_prefs->ClearPref(kReverseAutologinEnabled);
+
+ // Added 11/2018.
+ profile_prefs->ClearPref(kNetworkQualities);
}