| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // new config information. | 112 // new config information. |
| 113 void SetNewSSLConfig(const net::SSLConfig& new_config); | 113 void SetNewSSLConfig(const net::SSLConfig& new_config); |
| 114 | 114 |
| 115 // Cached value of prefs, should only be accessed from IO thread. | 115 // Cached value of prefs, should only be accessed from IO thread. |
| 116 net::SSLConfig cached_config_; | 116 net::SSLConfig cached_config_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(SSLConfigServicePref); | 118 DISALLOW_COPY_AND_ASSIGN(SSLConfigServicePref); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 void SSLConfigServicePref::GetSSLConfig(net::SSLConfig* config) { | 121 void SSLConfigServicePref::GetSSLConfig(net::SSLConfig* config) { |
| 122 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 122 *config = cached_config_; | 123 *config = cached_config_; |
| 123 } | 124 } |
| 124 | 125 |
| 125 bool SSLConfigServicePref::SupportsFastradioPadding(const GURL& url) { | 126 bool SSLConfigServicePref::SupportsFastradioPadding(const GURL& url) { |
| 126 return google_util::IsGoogleHostname(url.host(), | 127 return google_util::IsGoogleHostname(url.host(), |
| 127 google_util::ALLOW_SUBDOMAIN); | 128 google_util::ALLOW_SUBDOMAIN); |
| 128 } | 129 } |
| 129 | 130 |
| 130 void SSLConfigServicePref::SetNewSSLConfig( | 131 void SSLConfigServicePref::SetNewSSLConfig( |
| 131 const net::SSLConfig& new_config) { | 132 const net::SSLConfig& new_config) { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // static | 314 // static |
| 314 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( | 315 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( |
| 315 PrefService* local_state) { | 316 PrefService* local_state) { |
| 316 return new SSLConfigServiceManagerPref(local_state); | 317 return new SSLConfigServiceManagerPref(local_state); |
| 317 } | 318 } |
| 318 | 319 |
| 319 // static | 320 // static |
| 320 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 321 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
| 321 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 322 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
| 322 } | 323 } |
| OLD | NEW |