| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/prefs/browser_prefs.h" | 15 #include "chrome/browser/prefs/browser_prefs.h" |
| 16 #include "chrome/browser/prefs/command_line_pref_store.h" | 16 #include "chrome/browser/prefs/command_line_pref_store.h" |
| 17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 18 #include "components/policy/core/common/external_data_fetcher.h" | 18 #include "components/policy/core/common/external_data_fetcher.h" |
| 19 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 19 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
| 20 #include "components/policy/core/common/policy_map.h" | 20 #include "components/policy/core/common/policy_map.h" |
| 21 #include "components/policy/core/common/policy_service_impl.h" | 21 #include "components/policy/core/common/policy_service_impl.h" |
| 22 #include "components/policy/core/common/policy_types.h" | 22 #include "components/policy/core/common/policy_types.h" |
| 23 #include "components/policy/policy_constants.h" |
| 23 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
| 24 #include "components/proxy_config/proxy_config_dictionary.h" | 25 #include "components/proxy_config/proxy_config_dictionary.h" |
| 25 #include "components/proxy_config/proxy_config_pref_names.h" | 26 #include "components/proxy_config/proxy_config_pref_names.h" |
| 26 #include "components/syncable_prefs/pref_service_mock_factory.h" | 27 #include "components/syncable_prefs/pref_service_mock_factory.h" |
| 27 #include "components/syncable_prefs/pref_service_syncable.h" | 28 #include "components/syncable_prefs/pref_service_syncable.h" |
| 28 #include "content/public/test/test_browser_thread_bundle.h" | 29 #include "content/public/test/test_browser_thread_bundle.h" |
| 29 #include "policy/policy_constants.h" | |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 | 31 |
| 32 using ::testing::Return; | 32 using ::testing::Return; |
| 33 using ::testing::_; | 33 using ::testing::_; |
| 34 | 34 |
| 35 namespace policy { | 35 namespace policy { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 void assertProxyMode(const ProxyConfigDictionary& dict, | 39 void assertProxyMode(const ProxyConfigDictionary& dict, |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Try a second time time with the managed PrefStore in place, the | 232 // Try a second time time with the managed PrefStore in place, the |
| 233 // auto-detect should be overridden. The default pref store must be | 233 // auto-detect should be overridden. The default pref store must be |
| 234 // in place with the appropriate default value for this to work. | 234 // in place with the appropriate default value for this to work. |
| 235 prefs = CreatePrefService(true); | 235 prefs = CreatePrefService(true); |
| 236 ProxyConfigDictionary dict2( | 236 ProxyConfigDictionary dict2( |
| 237 prefs->GetDictionary(proxy_config::prefs::kProxy)); | 237 prefs->GetDictionary(proxy_config::prefs::kProxy)); |
| 238 assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_DIRECT); | 238 assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_DIRECT); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace policy | 241 } // namespace policy |
| OLD | NEW |