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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #include "components/policy/core/common/external_data_fetcher.h" | 100 #include "components/policy/core/common/external_data_fetcher.h" |
101 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 101 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
102 #include "components/policy/core/common/policy_map.h" | 102 #include "components/policy/core/common/policy_map.h" |
103 #include "components/policy/core/common/policy_pref_names.h" | 103 #include "components/policy/core/common/policy_pref_names.h" |
104 #include "components/policy/core/common/policy_service.h" | 104 #include "components/policy/core/common/policy_service.h" |
105 #include "components/policy/core/common/policy_service_impl.h" | 105 #include "components/policy/core/common/policy_service_impl.h" |
106 #include "components/policy/core/common/policy_types.h" | 106 #include "components/policy/core/common/policy_types.h" |
107 #include "components/search/search.h" | 107 #include "components/search/search.h" |
108 #include "components/search_engines/template_url.h" | 108 #include "components/search_engines/template_url.h" |
109 #include "components/search_engines/template_url_service.h" | 109 #include "components/search_engines/template_url_service.h" |
| 110 #include "components/ssl_config/ssl_config_prefs.h" |
110 #include "components/translate/core/browser/language_state.h" | 111 #include "components/translate/core/browser/language_state.h" |
111 #include "components/translate/core/browser/translate_infobar_delegate.h" | 112 #include "components/translate/core/browser/translate_infobar_delegate.h" |
112 #include "components/variations/service/variations_service.h" | 113 #include "components/variations/service/variations_service.h" |
113 #include "components/version_info/version_info.h" | 114 #include "components/version_info/version_info.h" |
114 #include "content/public/browser/browser_child_process_host_iterator.h" | 115 #include "content/public/browser/browser_child_process_host_iterator.h" |
115 #include "content/public/browser/browser_context.h" | 116 #include "content/public/browser/browser_context.h" |
116 #include "content/public/browser/browser_thread.h" | 117 #include "content/public/browser/browser_thread.h" |
117 #include "content/public/browser/child_process_data.h" | 118 #include "content/public/browser/child_process_data.h" |
118 #include "content/public/browser/download_item.h" | 119 #include "content/public/browser/download_item.h" |
119 #include "content/public/browser/download_manager.h" | 120 #include "content/public/browser/download_manager.h" |
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2721 return version_fallback_min; | 2722 return version_fallback_min; |
2722 } | 2723 } |
2723 | 2724 |
2724 } // namespace | 2725 } // namespace |
2725 | 2726 |
2726 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { | 2727 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { |
2727 PrefService* prefs = g_browser_process->local_state(); | 2728 PrefService* prefs = g_browser_process->local_state(); |
2728 | 2729 |
2729 const std::string new_value("tls1.2"); | 2730 const std::string new_value("tls1.2"); |
2730 const std::string default_value( | 2731 const std::string default_value( |
2731 prefs->GetString(prefs::kSSLVersionFallbackMin)); | 2732 prefs->GetString(ssl_config::prefs::kSSLVersionFallbackMin)); |
2732 | 2733 |
2733 EXPECT_NE(default_value, new_value); | 2734 EXPECT_NE(default_value, new_value); |
2734 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2, | 2735 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2, |
2735 GetSSLVersionFallbackMin(browser()->profile())); | 2736 GetSSLVersionFallbackMin(browser()->profile())); |
2736 | 2737 |
2737 PolicyMap policies; | 2738 PolicyMap policies; |
2738 policies.Set(key::kSSLVersionFallbackMin, | 2739 policies.Set(key::kSSLVersionFallbackMin, |
2739 POLICY_LEVEL_MANDATORY, | 2740 POLICY_LEVEL_MANDATORY, |
2740 POLICY_SCOPE_USER, | 2741 POLICY_SCOPE_USER, |
2741 POLICY_SOURCE_CLOUD, | 2742 POLICY_SOURCE_CLOUD, |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3993 POLICY_SCOPE_USER, | 3994 POLICY_SCOPE_USER, |
3994 POLICY_SOURCE_CLOUD, | 3995 POLICY_SOURCE_CLOUD, |
3995 new base::FundamentalValue(false), | 3996 new base::FundamentalValue(false), |
3996 NULL); | 3997 NULL); |
3997 UpdateProviderPolicy(policies); | 3998 UpdateProviderPolicy(policies); |
3998 EXPECT_FALSE(display_manager->unified_desktop_enabled()); | 3999 EXPECT_FALSE(display_manager->unified_desktop_enabled()); |
3999 } | 4000 } |
4000 #endif // defined(OS_CHROMEOS) | 4001 #endif // defined(OS_CHROMEOS) |
4001 | 4002 |
4002 } // namespace policy | 4003 } // namespace policy |
OLD | NEW |