| 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 "chrome/browser/net/ssl_config_service_manager.h" | 4 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 5 | 5 |
| 6 #include <algorithm> | 6 #include <algorithm> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 registry->RegisterListPref(prefs::kCipherSuiteBlacklist); | 235 registry->RegisterListPref(prefs::kCipherSuiteBlacklist); |
| 236 } | 236 } |
| 237 | 237 |
| 238 net::SSLConfigService* SSLConfigServiceManagerPref::Get() { | 238 net::SSLConfigService* SSLConfigServiceManagerPref::Get() { |
| 239 return ssl_config_service_.get(); | 239 return ssl_config_service_.get(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void SSLConfigServiceManagerPref::OnPreferenceChanged( | 242 void SSLConfigServiceManagerPref::OnPreferenceChanged( |
| 243 PrefService* prefs, | 243 PrefService* prefs, |
| 244 const std::string& pref_name_in) { | 244 const std::string& pref_name_in) { |
| 245 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 245 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 246 DCHECK(prefs); | 246 DCHECK(prefs); |
| 247 if (pref_name_in == prefs::kCipherSuiteBlacklist) | 247 if (pref_name_in == prefs::kCipherSuiteBlacklist) |
| 248 OnDisabledCipherSuitesChange(prefs); | 248 OnDisabledCipherSuitesChange(prefs); |
| 249 | 249 |
| 250 net::SSLConfig new_config; | 250 net::SSLConfig new_config; |
| 251 GetSSLConfigFromPrefs(&new_config); | 251 GetSSLConfigFromPrefs(&new_config); |
| 252 | 252 |
| 253 // Post a task to |io_loop| with the new configuration, so it can | 253 // Post a task to |io_loop| with the new configuration, so it can |
| 254 // update |cached_config_|. | 254 // update |cached_config_|. |
| 255 BrowserThread::PostTask( | 255 BrowserThread::PostTask( |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // static | 315 // static |
| 316 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( | 316 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( |
| 317 PrefService* local_state) { | 317 PrefService* local_state) { |
| 318 return new SSLConfigServiceManagerPref(local_state); | 318 return new SSLConfigServiceManagerPref(local_state); |
| 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 } |
| OLD | NEW |