Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(925)

Side by Side Diff: chrome/browser/net/ssl_config_service_manager_pref.cc

Issue 1164063004: Call GetSSLConfig on the IO thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enable the test Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698