Commit 00e1e6c7 authored by sdefresne's avatar sdefresne Committed by Commit bot

Move kDataReductionProxy registration to the data_reduction_proxy component.

The pref data_reduction_proxy::prefs::kDataReductionProxy should have
been part of data_reduction_proxy::RegisterPrefs() to avoid having
all embedder register it manually just before call said function.

BUG=557814

Review URL: https://codereview.chromium.org/1463973003

Cr-Commit-Position: refs/heads/master@{#361358}
parent 7c9159b5
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h" #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
#include "components/data_usage/core/data_use_aggregator.h" #include "components/data_usage/core/data_use_aggregator.h"
#include "components/data_usage/core/data_use_amortizer.h" #include "components/data_usage/core/data_use_amortizer.h"
#include "components/data_usage/core/data_use_annotator.h" #include "components/data_usage/core/data_use_annotator.h"
...@@ -1013,8 +1012,6 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) { ...@@ -1013,8 +1012,6 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string()); registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string());
registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType, registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType,
std::string()); std::string());
registry->RegisterStringPref(
data_reduction_proxy::prefs::kDataReductionProxy, std::string());
registry->RegisterBooleanPref(prefs::kEnableReferrers, true); registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
data_reduction_proxy::RegisterPrefs(registry); data_reduction_proxy::RegisterPrefs(registry);
registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, true); registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, true);
......
...@@ -125,6 +125,7 @@ void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { ...@@ -125,6 +125,7 @@ void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) {
// Add any new data reduction proxy prefs to the |pref_map_| or the // Add any new data reduction proxy prefs to the |pref_map_| or the
// |list_pref_map_| in Init() of DataReductionProxyCompressionStats. // |list_pref_map_| in Init() of DataReductionProxyCompressionStats.
void RegisterPrefs(PrefRegistrySimple* registry) { void RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kDataReductionProxy, std::string());
registry->RegisterInt64Pref( registry->RegisterInt64Pref(
prefs::kHttpReceivedContentLength, 0); prefs::kHttpReceivedContentLength, 0);
registry->RegisterInt64Pref( registry->RegisterInt64Pref(
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/autofill_manager.h"
#include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h" #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
#include "components/dom_distiller/core/distilled_page_prefs.h" #include "components/dom_distiller/core/distilled_page_prefs.h"
#include "components/enhanced_bookmarks/bookmark_server_cluster_service.h" #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h"
#include "components/gcm_driver/gcm_channel_status_syncer.h" #include "components/gcm_driver/gcm_channel_status_syncer.h"
...@@ -67,11 +66,6 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { ...@@ -67,11 +66,6 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
[OmniboxGeolocationLocalState registerLocalState:registry]; [OmniboxGeolocationLocalState registerLocalState:registry];
[MemoryDebuggerManager registerLocalState:registry]; [MemoryDebuggerManager registerLocalState:registry];
// TODO(crbug.com/557814): data_reduction_proxy::prefs::kDataReductionProxy
// should be registered by data_reduction_proxy::RegisterPrefs() instead of
// here.
registry->RegisterStringPref(data_reduction_proxy::prefs::kDataReductionProxy,
std::string());
data_reduction_proxy::RegisterPrefs(registry); data_reduction_proxy::RegisterPrefs(registry);
// TODO(shreyasv): Remove this in M49 as almost all users would have the // TODO(shreyasv): Remove this in M49 as almost all users would have the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment