summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb <stevenjb@chromium.org>2015-07-02 15:02:11 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-02 22:02:50 +0000
commitb237e2aea0d2c50b19e0e6109a3d76b282630572 (patch)
treee387e9cedf0ed928269f9f558117d83abe0df266
parent4529d53a54ffe09e7cf9f5abbd7c686e516fb983 (diff)
downloadchromium_src-b237e2aea0d2c50b19e0e6109a3d76b282630572.zip
chromium_src-b237e2aea0d2c50b19e0e6109a3d76b282630572.tar.gz
chromium_src-b237e2aea0d2c50b19e0e6109a3d76b282630572.tar.bz2
Add proxy_config component
This CL moves proxy_config_dictionary and proxy_prefs to src/components/proxy_config so that they can be used in src/chromeos/network/onc for ONC translation. BUG=470445 TBR=various for moving include files Review URL: https://codereview.chromium.org/1221033002 Cr-Commit-Position: refs/heads/master@{#337257}
-rw-r--r--chrome/browser/BUILD.gn1
-rw-r--r--chrome/browser/DEPS1
-rw-r--r--chrome/browser/chromeos/net/onc_utils.cc2
-rw-r--r--chrome/browser/chromeos/net/onc_utils.h2
-rw-r--r--chrome/browser/chromeos/net/proxy_config_handler.cc2
-rw-r--r--chrome/browser/chromeos/proxy_config_service_impl.cc4
-rw-r--r--chrome/browser/chromeos/ui_proxy_config.cc3
-rw-r--r--chrome/browser/chromeos/ui_proxy_config.h2
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_api.cc2
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_api.h2
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_api_helpers.cc2
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_api_helpers.h2
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc4
-rw-r--r--chrome/browser/extensions/api/proxy/proxy_apitest.cc2
-rw-r--r--chrome/browser/net/pref_proxy_config_tracker_impl.cc2
-rw-r--r--chrome/browser/net/pref_proxy_config_tracker_impl.h2
-rw-r--r--chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc2
-rw-r--r--chrome/browser/net/proxy_policy_handler.cc4
-rw-r--r--chrome/browser/net/proxy_policy_handler_unittest.cc4
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc2
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc2
-rw-r--r--chrome/browser/prefs/command_line_pref_store.cc2
-rw-r--r--chrome/browser/prefs/command_line_pref_store_unittest.cc2
-rw-r--r--chrome/browser/prefs/proxy_policy_unittest.cc4
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/network_state_informer.cc4
-rw-r--r--chrome/browser/ui/webui/options/preferences_browsertest.cc2
-rw-r--r--chrome/chrome_browser.gypi25
-rw-r--r--chrome/chrome_tests_unit.gypi8
-rw-r--r--components/BUILD.gn1
-rw-r--r--components/components.gyp1
-rw-r--r--components/components_tests.gyp6
-rw-r--r--components/proxy_config.gypi29
-rw-r--r--components/proxy_config/BUILD.gn20
-rw-r--r--components/proxy_config/OWNERS3
-rw-r--r--components/proxy_config/proxy_config_dictionary.cc (renamed from chrome/browser/prefs/proxy_config_dictionary.cc)2
-rw-r--r--components/proxy_config/proxy_config_dictionary.h (renamed from chrome/browser/prefs/proxy_config_dictionary.h)11
-rw-r--r--components/proxy_config/proxy_config_dictionary_unittest.cc (renamed from chrome/browser/prefs/proxy_config_dictionary_unittest.cc)2
-rw-r--r--components/proxy_config/proxy_config_export.h29
-rw-r--r--components/proxy_config/proxy_prefs.cc (renamed from chrome/browser/prefs/proxy_prefs.cc)2
-rw-r--r--components/proxy_config/proxy_prefs.h (renamed from chrome/browser/prefs/proxy_prefs.h)31
-rw-r--r--components/proxy_config/proxy_prefs_unittest.cc (renamed from chrome/browser/prefs/proxy_prefs_unittest.cc)2
42 files changed, 163 insertions, 74 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index f82b78a..68d319b 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -129,6 +129,7 @@ source_set("browser") {
"//components/password_manager/core/browser",
"//components/password_manager/core/common",
"//components/policy:policy_component",
+ "//components/proxy_config",
"//components/query_parser",
"//components/rappor",
"//components/renderer_context_menu",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index 28feeb1..5f16e0c 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -68,6 +68,7 @@ include_rules = [
"+components/pref_registry",
"+components/printing/common",
"+components/proximity_auth",
+ "+components/proxy_config",
"+components/query_parser",
"+components/rappor",
"+components/renderer_context_menu",
diff --git a/chrome/browser/chromeos/net/onc_utils.cc b/chrome/browser/chromeos/net/onc_utils.cc
index 2e4194eb..4d9d7db 100644
--- a/chrome/browser/chromeos/net/onc_utils.cc
+++ b/chrome/browser/chromeos/net/onc_utils.cc
@@ -10,7 +10,6 @@
#include "base/prefs/pref_service.h"
#include "base/values.h"
#include "chrome/browser/chromeos/ui_proxy_config.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/pref_names.h"
#include "chromeos/network/managed_network_configuration_handler.h"
#include "chromeos/network/network_configuration_handler.h"
@@ -24,6 +23,7 @@
#include "chromeos/network/onc/onc_signature.h"
#include "chromeos/network/onc/onc_translator.h"
#include "chromeos/network/onc/onc_utils.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/user_manager/user.h"
#include "components/user_manager/user_manager.h"
#include "net/base/host_port_pair.h"
diff --git a/chrome/browser/chromeos/net/onc_utils.h b/chrome/browser/chromeos/net/onc_utils.h
index 3f6cae4..8c663ff 100644
--- a/chrome/browser/chromeos/net/onc_utils.h
+++ b/chrome/browser/chromeos/net/onc_utils.h
@@ -29,7 +29,7 @@ namespace onc {
// Translates |onc_proxy_settings|, which has to be a valid ONC ProxySettings
// dictionary, to a ProxyConfig dictionary (see
-// chrome/browser/prefs/proxy_config_dictionary.h).
+// components/proxy_config/proxy_config_dictionary.h).
//
// This function is used to translate ONC ProxySettings to the "ProxyConfig"
// field of the Shill configuration.
diff --git a/chrome/browser/chromeos/net/proxy_config_handler.cc b/chrome/browser/chromeos/net/proxy_config_handler.cc
index 0351f34..37ef935 100644
--- a/chrome/browser/chromeos/net/proxy_config_handler.cc
+++ b/chrome/browser/chromeos/net/proxy_config_handler.cc
@@ -10,7 +10,6 @@
#include "base/prefs/pref_registry_simple.h"
#include "base/values.h"
#include "chrome/browser/chromeos/net/onc_utils.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/pref_names.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/shill_service_client.h"
@@ -20,6 +19,7 @@
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "dbus/object_path.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index 8b59c5d..598244af 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -14,8 +14,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/net/proxy_config_handler.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/pref_names.h"
#include "chromeos/network/network_profile.h"
#include "chromeos/network/network_profile_handler.h"
@@ -23,6 +21,8 @@
#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/onc/onc_utils.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "components/user_manager/user_manager.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/ui_proxy_config.cc b/chrome/browser/chromeos/ui_proxy_config.cc
index 2dd3517..9b246c6 100644
--- a/chrome/browser/chromeos/ui_proxy_config.cc
+++ b/chrome/browser/chromeos/ui_proxy_config.cc
@@ -6,8 +6,7 @@
#include "base/logging.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "net/proxy/proxy_config.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/ui_proxy_config.h b/chrome/browser/chromeos/ui_proxy_config.h
index 08fa47f..3e85c0a 100644
--- a/chrome/browser/chromeos/ui_proxy_config.h
+++ b/chrome/browser/chromeos/ui_proxy_config.h
@@ -7,7 +7,7 @@
#include <string>
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "net/proxy/proxy_bypass_rules.h"
#include "net/proxy/proxy_server.h"
#include "url/gurl.h"
diff --git a/chrome/browser/extensions/api/proxy/proxy_api.cc b/chrome/browser/extensions/api/proxy/proxy_api.cc
index c61d6ed..bbc2248 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "net/base/net_errors.h"
namespace extensions {
diff --git a/chrome/browser/extensions/api/proxy/proxy_api.h b/chrome/browser/extensions/api/proxy/proxy_api.h
index 62cbe73..8cb06d5 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api.h
+++ b/chrome/browser/extensions/api/proxy/proxy_api.h
@@ -13,7 +13,7 @@
#include "base/memory/singleton.h"
#include "base/strings/string16.h"
#include "chrome/browser/extensions/api/preference/preference_api.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
namespace base {
class Value;
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
index 54f9357..6919877 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -20,7 +20,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/proxy/proxy_api_constants.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "extensions/common/error_utils.h"
#include "net/base/data_url.h"
#include "net/proxy/proxy_config.h"
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.h b/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
index 064b5c2..26b9a9c 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
@@ -9,7 +9,7 @@
#include <string>
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "net/proxy/proxy_config.h"
class ProxyConfigDictionary;
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc
index b32256b..98864bd 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc
@@ -8,8 +8,8 @@
#include "base/values.h"
#include "chrome/browser/extensions/api/proxy/proxy_api_constants.h"
#include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
diff --git a/chrome/browser/extensions/api/proxy/proxy_apitest.cc b/chrome/browser/extensions/api/proxy/proxy_apitest.cc
index f88f6bb..bd80412 100644
--- a/chrome/browser/extensions/api/proxy/proxy_apitest.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_apitest.cc
@@ -5,11 +5,11 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_util.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "extensions/common/extension.h"
#include "extensions/test/result_catcher.h"
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.cc b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
index a4ec56c..02469dd 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
@@ -11,9 +11,9 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.h b/chrome/browser/net/pref_proxy_config_tracker_impl.h
index 8055c26..1e35389 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl.h
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl.h
@@ -11,7 +11,7 @@
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/net/pref_proxy_config_tracker.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_config_service.h"
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
index d780b95..2f55053 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
@@ -13,9 +13,9 @@
#include "base/prefs/testing_pref_service.h"
#include "base/test/histogram_tester.h"
#include "chrome/browser/prefs/pref_service_mock_factory.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "content/public/test/test_browser_thread.h"
#include "net/proxy/proxy_config_service_common_unittest.h"
#include "net/proxy/proxy_info.h"
diff --git a/chrome/browser/net/proxy_policy_handler.cc b/chrome/browser/net/proxy_policy_handler.cc
index 2cbab221..6e1024a 100644
--- a/chrome/browser/net/proxy_policy_handler.cc
+++ b/chrome/browser/net/proxy_policy_handler.cc
@@ -8,12 +8,12 @@
#include "base/prefs/pref_value_map.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "grit/components_strings.h"
#include "policy/policy_constants.h"
diff --git a/chrome/browser/net/proxy_policy_handler_unittest.cc b/chrome/browser/net/proxy_policy_handler_unittest.cc
index a1818a1..8e2737f 100644
--- a/chrome/browser/net/proxy_policy_handler_unittest.cc
+++ b/chrome/browser/net/proxy_policy_handler_unittest.cc
@@ -7,12 +7,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/net/proxy_policy_handler.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/configuration_policy_pref_store.h"
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
#include "components/policy/core/common/policy_service_impl.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "policy/policy_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
index 1ceb296..a45f583 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
@@ -15,7 +15,6 @@
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/pref_names.h"
@@ -25,6 +24,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "net/base/host_port_pair.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_list.h"
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
index c2f319b..d742331 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
@@ -14,7 +14,6 @@
#include "base/test/test_simple_task_runner.h"
#include "base/time/time.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h"
@@ -22,6 +21,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "net/proxy/proxy_server.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 53c6dbd..4d504c4 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -12,9 +12,9 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/values.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/prefs/command_line_pref_store_unittest.cc b/chrome/browser/prefs/command_line_pref_store_unittest.cc
index 53c3e67..d515a1c 100644
--- a/chrome/browser/prefs/command_line_pref_store_unittest.cc
+++ b/chrome/browser/prefs/command_line_pref_store_unittest.cc
@@ -9,9 +9,9 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/prefs/command_line_pref_store.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "ui/base/ui_base_switches.h"
namespace {
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 80a0874..3daee07 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -10,8 +10,6 @@
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_service_mock_factory.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/common/external_data_fetcher.h"
@@ -19,6 +17,8 @@
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_service_impl.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "policy/policy_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 02ece36..871769e 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -61,7 +61,7 @@
#if defined(OS_ANDROID) || defined(OS_IOS)
#include "base/prefs/scoped_user_pref_update.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
#endif // defined(OS_ANDROID) || defined(OS_IOS)
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
index 00af251..8023002 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
@@ -11,10 +11,10 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/screens/network_error.h"
#include "chrome/browser/chromeos/net/proxy_config_handler.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "net/proxy/proxy_config.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc
index b5a89c9..2482e34 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -41,13 +41,13 @@
#include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h"
#include "chrome/browser/chromeos/proxy_cros_settings_parser.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/shill_profile_client.h"
#include "chromeos/dbus/shill_service_client.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "chromeos/settings/cros_settings_names.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "content/public/test/test_utils.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
#endif
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index d9d1aa5..224ce9c4 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -616,18 +616,18 @@
# TODO(brettw) should this go with the webrtc sources?
'browser/media/webrtc_log_list.cc',
'browser/media/webrtc_log_list.h',
+ 'browser/memory/oom_memory_details.cc',
+ 'browser/memory/oom_memory_details.h',
+ 'browser/memory/oom_priority_manager.h',
+ 'browser/memory/oom_priority_manager_chromeos.cc',
+ 'browser/memory/system_memory_stats_recorder.h',
+ 'browser/memory/system_memory_stats_recorder_linux.cc',
'browser/memory_details.cc',
'browser/memory_details.h',
'browser/memory_details_android.cc',
'browser/memory_details_linux.cc',
'browser/memory_details_mac.cc',
'browser/memory_details_win.cc',
- 'browser/memory/oom_memory_details.cc',
- 'browser/memory/oom_memory_details.h',
- 'browser/memory/oom_priority_manager_chromeos.cc',
- 'browser/memory/oom_priority_manager.h',
- 'browser/memory/system_memory_stats_recorder_linux.cc',
- 'browser/memory/system_memory_stats_recorder.h',
'browser/mod_pagespeed/mod_pagespeed_metrics.cc',
'browser/mod_pagespeed/mod_pagespeed_metrics.h',
'browser/native_window_notification_source.h',
@@ -1022,10 +1022,10 @@
'browser/download/download_shelf_context_menu.h',
'browser/download/notification/download_group_notification.cc',
'browser/download/notification/download_group_notification.h',
- 'browser/download/notification/download_notification.cc',
- 'browser/download/notification/download_notification.h',
'browser/download/notification/download_item_notification.cc',
'browser/download/notification/download_item_notification.h',
+ 'browser/download/notification/download_notification.cc',
+ 'browser/download/notification/download_notification.h',
'browser/download/notification/download_notification_manager.cc',
'browser/download/notification/download_notification_manager.h',
'browser/feedback/feedback_profile_observer.cc',
@@ -2270,10 +2270,6 @@
'browser/prefs/pref_service_syncable_observer.h',
'browser/prefs/profile_pref_store_manager.cc',
'browser/prefs/profile_pref_store_manager.h',
- 'browser/prefs/proxy_config_dictionary.cc',
- 'browser/prefs/proxy_config_dictionary.h',
- 'browser/prefs/proxy_prefs.cc',
- 'browser/prefs/proxy_prefs.h',
'browser/prefs/session_startup_pref.cc',
'browser/prefs/session_startup_pref.h',
'browser/prefs/synced_pref_change_registrar.cc',
@@ -2348,9 +2344,9 @@
'browser/printing/cloud_print/cloud_print_proxy_service_factory.cc',
'browser/printing/cloud_print/cloud_print_proxy_service_factory.h',
'browser/printing/print_dialog_cloud.cc',
- 'browser/printing/print_dialog_cloud_win.cc',
- 'browser/printing/print_dialog_cloud_posix.cc',
'browser/printing/print_dialog_cloud.h',
+ 'browser/printing/print_dialog_cloud_posix.cc',
+ 'browser/printing/print_dialog_cloud_win.cc',
'browser/printing/print_error_dialog.cc',
'browser/printing/print_error_dialog.h',
'browser/printing/print_preview_context_menu_observer.cc',
@@ -3162,6 +3158,7 @@
'../components/components.gyp:password_manager_core_browser',
'../components/components.gyp:password_manager_core_common',
'../components/components.gyp:policy_component',
+ '../components/components.gyp:proxy_config',
'../components/components.gyp:query_parser',
'../components/components.gyp:rappor',
'../components/components.gyp:renderer_context_menu',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 59e806a..be7f3a7 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -183,8 +183,6 @@
'browser/prefs/pref_model_associator_unittest.cc',
'browser/prefs/prefs_syncable_service_unittest.cc',
'browser/prefs/profile_pref_store_manager_unittest.cc',
- 'browser/prefs/proxy_config_dictionary_unittest.cc',
- 'browser/prefs/proxy_prefs_unittest.cc',
'browser/prefs/session_startup_pref_unittest.cc',
'browser/prefs/tracked/device_id_unittest.cc',
'browser/prefs/tracked/mock_validation_delegate.cc',
@@ -2528,12 +2526,12 @@
],
'sources': [ '<@(chrome_unit_tests_mac_sources)' ],
'sources!': [
- 'browser/ui/tests/ui_gfx_image_unittest.cc',
- 'renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc',
- 'tools/convert_dict/convert_dict_unittest.cc',
# This tests the function GetSpellCheckLanguages which is not used
# on Mac.
'browser/spellchecker/spellcheck_service_unittest.cc',
+ 'browser/ui/tests/ui_gfx_image_unittest.cc',
+ 'renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc',
+ 'tools/convert_dict/convert_dict_unittest.cc',
],
# TODO(mark): We really want this for all non-static library targets,
# but when we tried to pull it up to the common.gypi level, it broke
diff --git a/components/BUILD.gn b/components/BUILD.gn
index 72d53f6..727bd02 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -84,6 +84,7 @@ group("all_components") {
"//components/power",
"//components/precache/core",
"//components/precache/content",
+ "//components/proxy_config",
"//components/pref_registry",
"//components/query_parser",
"//components/rappor",
diff --git a/components/components.gyp b/components/components.gyp
index 512802d..7b5a01c 100644
--- a/components/components.gyp
+++ b/components/components.gyp
@@ -55,6 +55,7 @@
'policy.gypi',
'precache.gypi',
'pref_registry.gypi',
+ 'proxy_config.gypi',
'query_parser.gypi',
'rappor.gypi',
'renderer_context_menu.gypi',
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 19b9c36..594dfa9 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -464,6 +464,10 @@
'proximity_auth/throttled_bluetooth_connection_finder_unittest.cc',
'proximity_auth/wire_message_unittest.cc',
],
+ 'proxy_config_unittest_sources': [
+ 'proxy_config/proxy_config_dictionary_unittest.cc',
+ 'proxy_config/proxy_prefs_unittest.cc',
+ ],
'query_parser_unittest_sources': [
'query_parser/query_parser_unittest.cc',
'query_parser/snippet_unittest.cc',
@@ -710,6 +714,7 @@
'<@(packed_ct_ev_whitelist_unittest_sources)',
'<@(password_manager_unittest_sources)',
'<@(precache_unittest_sources)',
+ '<@(proxy_config_unittest_sources)',
'<@(query_parser_unittest_sources)',
'<@(rappor_unittest_sources)',
'<@(search_unittest_sources)',
@@ -817,6 +822,7 @@
'components.gyp:password_manager_core_browser_test_support',
'components.gyp:precache_core',
'components.gyp:pref_registry_test_support',
+ 'components.gyp:proxy_config',
'components.gyp:query_parser',
'components.gyp:rappor',
'components.gyp:rappor_test_support',
diff --git a/components/proxy_config.gypi b/components/proxy_config.gypi
new file mode 100644
index 0000000..b7f8e5f
--- /dev/null
+++ b/components/proxy_config.gypi
@@ -0,0 +1,29 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ # GN version: //components/proxy_config
+ 'target_name': 'proxy_config',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'defines': [
+ 'PROXY_CONFIG_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'proxy_config/proxy_config_dictionary.cc',
+ 'proxy_config/proxy_config_dictionary.h',
+ 'proxy_config/proxy_config_export.h',
+ 'proxy_config/proxy_prefs.cc',
+ 'proxy_config/proxy_prefs.h',
+ ],
+ },
+ ],
+}
diff --git a/components/proxy_config/BUILD.gn b/components/proxy_config/BUILD.gn
new file mode 100644
index 0000000..59245af
--- /dev/null
+++ b/components/proxy_config/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# GYP version: components/proxy_config.gypi:proxy_config_component
+component("proxy_config") {
+ sources = [
+ "proxy_config_dictionary.cc",
+ "proxy_config_dictionary.h",
+ "proxy_config_export.h",
+ "proxy_prefs.cc",
+ "proxy_prefs.h",
+ ]
+
+ defines = [ "PROXY_CONFIG_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ ]
+}
diff --git a/components/proxy_config/OWNERS b/components/proxy_config/OWNERS
new file mode 100644
index 0000000..baacefc
--- /dev/null
+++ b/components/proxy_config/OWNERS
@@ -0,0 +1,3 @@
+mnissler@chromium.org
+pneubeck@chromium.org
+stevenjb@chromium.org
diff --git a/chrome/browser/prefs/proxy_config_dictionary.cc b/components/proxy_config/proxy_config_dictionary.cc
index 85852ea..e493bda 100644
--- a/chrome/browser/prefs/proxy_config_dictionary.cc
+++ b/components/proxy_config/proxy_config_dictionary.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/chrome/browser/prefs/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h
index 1593768..54ccc74 100644
--- a/chrome/browser/prefs/proxy_config_dictionary.h
+++ b/components/proxy_config/proxy_config_dictionary.h
@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
-#define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
+#ifndef COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_DICTIONARY_H_
+#define COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_DICTIONARY_H_
#include <string>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_config_export.h"
+#include "components/proxy_config/proxy_prefs.h"
namespace base {
class DictionaryValue;
@@ -24,7 +25,7 @@ class DictionaryValue;
// bypass_list: string
// }
// See proxy_config_dictionary.cc for the structure of the respective strings.
-class ProxyConfigDictionary {
+class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
public:
// Creates a deep copy of |dict| and leaves ownership to caller.
explicit ProxyConfigDictionary(const base::DictionaryValue* dict);
@@ -60,4 +61,4 @@ class ProxyConfigDictionary {
DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary);
};
-#endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
+#endif // COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_DICTIONARY_H_
diff --git a/chrome/browser/prefs/proxy_config_dictionary_unittest.cc b/components/proxy_config/proxy_config_dictionary_unittest.cc
index 171c34b..ca73ab0 100644
--- a/chrome/browser/prefs/proxy_config_dictionary_unittest.cc
+++ b/components/proxy_config/proxy_config_dictionary_unittest.cc
@@ -6,7 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "chrome/browser/prefs/proxy_config_dictionary.h"
+#include "components/proxy_config/proxy_config_dictionary.h"
#include "testing/gtest/include/gtest/gtest.h"
struct ProxyConfigHolder {
diff --git a/components/proxy_config/proxy_config_export.h b/components/proxy_config/proxy_config_export.h
new file mode 100644
index 0000000..2f73a9e
--- /dev/null
+++ b/components/proxy_config/proxy_config_export.h
@@ -0,0 +1,29 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_EXPORT_H_
+#define COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_EXPORT_H_
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(PROXY_CONFIG_IMPLEMENTATION)
+#define PROXY_CONFIG_EXPORT __declspec(dllexport)
+#else
+#define PROXY_CONFIG_EXPORT __declspec(dllimport)
+#endif // defined(PROXY_CONFIG_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(PROXY_CONFIG_IMPLEMENTATION)
+#define PROXY_CONFIG_EXPORT __attribute__((visibility("default")))
+#else
+#define PROXY_CONFIG_EXPORT
+#endif
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define PROXY_CONFIG_EXPORT
+#endif
+
+#endif // COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_EXPORT_H_
diff --git a/chrome/browser/prefs/proxy_prefs.cc b/components/proxy_config/proxy_prefs.cc
index 04785ec..215a451 100644
--- a/chrome/browser/prefs/proxy_prefs.cc
+++ b/components/proxy_config/proxy_prefs.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/chrome/browser/prefs/proxy_prefs.h b/components/proxy_config/proxy_prefs.h
index ea151f7..25af0be 100644
--- a/chrome/browser/prefs/proxy_prefs.h
+++ b/components/proxy_config/proxy_prefs.h
@@ -2,18 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_PREFS_PROXY_PREFS_H_
-#define CHROME_BROWSER_PREFS_PROXY_PREFS_H_
+#ifndef COMPONENTS_PROXY_CONFIG_PROXY_PREFS_H_
+#define COMPONENTS_PROXY_CONFIG_PROXY_PREFS_H_
#include <string>
+#include "components/proxy_config/proxy_config_export.h"
+
namespace ProxyPrefs {
// Possible types of specifying proxy settings. Do not change the order of
// the constants, because numeric values are exposed to users.
// If you add an enum constant, you should also add a string to
// kProxyModeNames in the .cc file.
-enum ProxyMode {
+enum PROXY_CONFIG_EXPORT ProxyMode {
// Direct connection to the network, other proxy preferences are ignored.
MODE_DIRECT = 0,
@@ -36,7 +38,7 @@ enum ProxyMode {
};
// State of proxy configuration.
-enum ConfigState {
+enum PROXY_CONFIG_EXPORT ConfigState {
// Configuration is from policy.
CONFIG_POLICY,
// Configuration is from extension.
@@ -53,18 +55,19 @@ enum ConfigState {
// Constants for string values used to specify the proxy mode through externally
// visible APIs, e.g. through policy or the proxy extension API.
-extern const char kDirectProxyModeName[];
-extern const char kAutoDetectProxyModeName[];
-extern const char kPacScriptProxyModeName[];
-extern const char kFixedServersProxyModeName[];
-extern const char kSystemProxyModeName[];
+PROXY_CONFIG_EXPORT extern const char kDirectProxyModeName[];
+PROXY_CONFIG_EXPORT extern const char kAutoDetectProxyModeName[];
+PROXY_CONFIG_EXPORT extern const char kPacScriptProxyModeName[];
+PROXY_CONFIG_EXPORT extern const char kFixedServersProxyModeName[];
+PROXY_CONFIG_EXPORT extern const char kSystemProxyModeName[];
-bool IntToProxyMode(int in_value, ProxyMode* out_value);
-bool StringToProxyMode(const std::string& in_value, ProxyMode* out_value);
+PROXY_CONFIG_EXPORT bool IntToProxyMode(int in_value, ProxyMode* out_value);
+PROXY_CONFIG_EXPORT bool StringToProxyMode(const std::string& in_value,
+ ProxyMode* out_value);
// Ownership of the return value is NOT passed to the caller.
-const char* ProxyModeToString(ProxyMode mode);
-std::string ConfigStateToDebugString(ConfigState state);
+PROXY_CONFIG_EXPORT const char* ProxyModeToString(ProxyMode mode);
+PROXY_CONFIG_EXPORT std::string ConfigStateToDebugString(ConfigState state);
} // namespace ProxyPrefs
-#endif // CHROME_BROWSER_PREFS_PROXY_PREFS_H_
+#endif // COMPONENTS_PROXY_CONFIG_PROXY_PREFS_H_
diff --git a/chrome/browser/prefs/proxy_prefs_unittest.cc b/components/proxy_config/proxy_prefs_unittest.cc
index 63b8ea3..fa9288a 100644
--- a/chrome/browser/prefs/proxy_prefs_unittest.cc
+++ b/components/proxy_config/proxy_prefs_unittest.cc
@@ -5,7 +5,7 @@
#include <string>
#include "base/values.h"
-#include "chrome/browser/prefs/proxy_prefs.h"
+#include "components/proxy_config/proxy_prefs.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ProxyPrefsTest, StringToProxyMode) {