| 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 #include "components/ssl_config/ssl_config_service_manager.h" | 4 #include "components/ssl_config/ssl_config_service_manager.h" |
| 5 | 5 |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 if (pref_name_in == ssl_config::prefs::kCipherSuiteBlacklist) | 263 if (pref_name_in == ssl_config::prefs::kCipherSuiteBlacklist) |
| 264 OnDisabledCipherSuitesChange(prefs); | 264 OnDisabledCipherSuitesChange(prefs); |
| 265 | 265 |
| 266 net::SSLConfig new_config; | 266 net::SSLConfig new_config; |
| 267 GetSSLConfigFromPrefs(&new_config); | 267 GetSSLConfigFromPrefs(&new_config); |
| 268 | 268 |
| 269 // Post a task to |io_loop| with the new configuration, so it can | 269 // Post a task to |io_loop| with the new configuration, so it can |
| 270 // update |cached_config_|. | 270 // update |cached_config_|. |
| 271 io_task_runner_->PostTask(FROM_HERE, | 271 io_task_runner_->PostTask(FROM_HERE, |
| 272 base::Bind(&SSLConfigServicePref::SetNewSSLConfig, | 272 base::Bind(&SSLConfigServicePref::SetNewSSLConfig, |
| 273 ssl_config_service_.get(), new_config)); | 273 ssl_config_service_, new_config)); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( | 276 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( |
| 277 net::SSLConfig* config) { | 277 net::SSLConfig* config) { |
| 278 // rev_checking_enabled was formerly a user-settable preference, but now | 278 // rev_checking_enabled was formerly a user-settable preference, but now |
| 279 // it is managed-only. | 279 // it is managed-only. |
| 280 if (rev_checking_enabled_.IsManaged()) | 280 if (rev_checking_enabled_.IsManaged()) |
| 281 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); | 281 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); |
| 282 else | 282 else |
| 283 config->rev_checking_enabled = false; | 283 config->rev_checking_enabled = false; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 PrefService* local_state, | 316 PrefService* local_state, |
| 317 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { | 317 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { |
| 318 return new SSLConfigServiceManagerPref(local_state, io_task_runner); | 318 return new SSLConfigServiceManagerPref(local_state, io_task_runner); |
| 319 } | 319 } |
| 320 | 320 |
| 321 // static | 321 // static |
| 322 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 322 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
| 323 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 323 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
| 324 } | 324 } |
| 325 } // namespace ssl_config | 325 } // namespace ssl_config |
| OLD | NEW |