summaryrefslogtreecommitdiffstats
path: root/components/cronet
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2016-02-03 00:22:02 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-03 08:23:19 +0000
commit066508682fd2bcf566f83c39169df4b949ccf09a (patch)
treed4bb15e5eac7ed880afbf380fe9786e1d7434bca /components/cronet
parentf531e094ae328f316e7ad3a08a4ce32f5b087e6b (diff)
downloadchromium_src-066508682fd2bcf566f83c39169df4b949ccf09a.zip
chromium_src-066508682fd2bcf566f83c39169df4b949ccf09a.tar.gz
chromium_src-066508682fd2bcf566f83c39169df4b949ccf09a.tar.bz2
Delete base/prefs and update callers to use components.
Deletes the forwarding headers in base/prefs. Updates the remaining users of base/prefs includes to use components/prefs. Sort headers in updated files. Move PrefServiceFactory out of the base namespace. Update users. Update all preprocessor stuff in components/prefs to change BASE_PREFS_ to COMPONENTS_PREFS_. Add components/prefs to DEPS file of directories where checkdeps fails after the update. BUG=583034 Reland of http://crrev.com/1662523004#ps40001 with fix. TBR=estade@chromium.org Review URL: https://codereview.chromium.org/1668463002 Cr-Commit-Position: refs/heads/master@{#373197}
Diffstat (limited to 'components/cronet')
-rw-r--r--components/cronet/DEPS1
-rw-r--r--components/cronet/android/cronet_data_reduction_proxy.cc8
-rw-r--r--components/cronet/android/cronet_in_memory_pref_store.h6
-rw-r--r--components/cronet/android/cronet_url_request_context_adapter.cc12
-rw-r--r--components/cronet/android/cronet_url_request_context_adapter.h2
5 files changed, 15 insertions, 14 deletions
diff --git a/components/cronet/DEPS b/components/cronet/DEPS
index 413c4b4..bd43afc 100644
--- a/components/cronet/DEPS
+++ b/components/cronet/DEPS
@@ -1,4 +1,5 @@
include_rules = [
"+components/metrics",
+ "+components/prefs",
"+net",
]
diff --git a/components/cronet/android/cronet_data_reduction_proxy.cc b/components/cronet/android/cronet_data_reduction_proxy.cc
index 0b6bf02..360862fb 100644
--- a/components/cronet/android/cronet_data_reduction_proxy.cc
+++ b/components/cronet/android/cronet_data_reduction_proxy.cc
@@ -8,9 +8,6 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/prefs/pref_registry_simple.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/pref_service_factory.h"
#include "base/single_thread_task_runner.h"
#include "components/cronet/android/cronet_in_memory_pref_store.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h"
@@ -23,6 +20,9 @@
#include "components/data_reduction_proxy/core/browser/data_store.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_service_factory.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_interceptor.h"
@@ -36,7 +36,7 @@ scoped_ptr<PrefService> CreatePrefService() {
scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
pref_registry->RegisterBooleanPref(kDataReductionProxyEnabled, false);
data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry.get());
- base::PrefServiceFactory pref_service_factory;
+ PrefServiceFactory pref_service_factory;
pref_service_factory.set_user_prefs(
make_scoped_refptr(new CronetInMemoryPrefStore()));
scoped_ptr<PrefService> pref_service =
diff --git a/components/cronet/android/cronet_in_memory_pref_store.h b/components/cronet/android/cronet_in_memory_pref_store.h
index 1aede14..42d9d27 100644
--- a/components/cronet/android/cronet_in_memory_pref_store.h
+++ b/components/cronet/android/cronet_in_memory_pref_store.h
@@ -13,8 +13,8 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
-#include "base/prefs/persistent_pref_store.h"
-#include "base/prefs/pref_value_map.h"
+#include "components/prefs/persistent_pref_store.h"
+#include "components/prefs/pref_value_map.h"
namespace base {
class Value;
@@ -22,7 +22,7 @@ class Value;
// A light-weight prefstore implementation that keeps preferences
// in a memory backed store. This is not a persistent prefstore.
-// TODO(bengr): Move to base/prefs or some other shared location.
+// TODO(bengr): Move to components/prefs or some other shared location.
class CronetInMemoryPrefStore : public PersistentPrefStore {
public:
CronetInMemoryPrefStore();
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index a8fe96d..49ba22a 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -21,16 +21,16 @@
#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/statistics_recorder.h"
-#include "base/prefs/pref_change_registrar.h"
-#include "base/prefs/pref_filter.h"
-#include "base/prefs/pref_registry_simple.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/pref_service_factory.h"
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/cronet/histogram_manager.h"
#include "components/cronet/url_request_context_config.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "components/prefs/pref_filter.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_service_factory.h"
#include "jni/CronetUrlRequestContext_jni.h"
#include "net/base/external_estimate_provider.h"
#include "net/base/load_flags.h"
@@ -443,7 +443,7 @@ void CronetURLRequestContextAdapter::InitializeOnNetworkThread(
context_builder.SetFileTaskRunner(GetFileThread()->task_runner());
// Set up HttpServerPropertiesManager.
- base::PrefServiceFactory factory;
+ PrefServiceFactory factory;
factory.set_user_prefs(json_pref_store_);
scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple());
registry->RegisterDictionaryPref(kHttpServerProperties,
diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h
index 851dc75..81c07dd 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.h
+++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -16,8 +16,8 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/prefs/json_pref_store.h"
#include "base/threading/thread.h"
+#include "components/prefs/json_pref_store.h"
#include "net/base/network_quality_estimator.h"
class PrefService;