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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 112533002: Add ClientCertStoreChromeOS which only returns the certs for a given user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | crypto/nss_util.h » ('j') | net/cert/nss_profile_filter_chromeos.h » ('J')
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 4
5 #include "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #include "chrome/browser/chromeos/login/user_manager.h" 101 #include "chrome/browser/chromeos/login/user_manager.h"
102 #include "chrome/browser/chromeos/policy/policy_cert_service.h" 102 #include "chrome/browser/chromeos/policy/policy_cert_service.h"
103 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" 103 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
104 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" 104 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
105 #include "chrome/browser/chromeos/settings/cros_settings.h" 105 #include "chrome/browser/chromeos/settings/cros_settings.h"
106 #include "chromeos/dbus/cryptohome_client.h" 106 #include "chromeos/dbus/cryptohome_client.h"
107 #include "chromeos/dbus/dbus_thread_manager.h" 107 #include "chromeos/dbus/dbus_thread_manager.h"
108 #include "chromeos/settings/cros_settings_names.h" 108 #include "chromeos/settings/cros_settings_names.h"
109 #include "crypto/nss_util.h" 109 #include "crypto/nss_util.h"
110 #include "crypto/nss_util_internal.h" 110 #include "crypto/nss_util_internal.h"
111 #include "net/ssl/client_cert_store_chromeos.h"
111 #endif // defined(OS_CHROMEOS) 112 #endif // defined(OS_CHROMEOS)
112 113
113 #if defined(USE_NSS) 114 #if defined(USE_NSS)
114 #include "chrome/browser/ui/crypto_module_delegate_nss.h" 115 #include "chrome/browser/ui/crypto_module_delegate_nss.h"
115 #include "net/ssl/client_cert_store_nss.h" 116 #include "net/ssl/client_cert_store_nss.h"
116 #endif 117 #endif
117 118
118 #if defined(OS_WIN) 119 #if defined(OS_WIN)
119 #include "net/ssl/client_cert_store_win.h" 120 #include "net/ssl/client_cert_store_win.h"
120 #endif 121 #endif
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 } 855 }
855 856
856 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { 857 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() {
857 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 858 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
858 DCHECK(io_data_->initialized_); 859 DCHECK(io_data_->initialized_);
859 return request_context_; 860 return request_context_;
860 } 861 }
861 862
862 scoped_ptr<net::ClientCertStore> 863 scoped_ptr<net::ClientCertStore>
863 ProfileIOData::ResourceContext::CreateClientCertStore() { 864 ProfileIOData::ResourceContext::CreateClientCertStore() {
864 #if defined(USE_NSS) 865 #if defined(OS_CHROMEOS)
866 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreChromeOS(
867 io_data_->username_hash(),
868 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate,
869 chrome::kCryptoModulePasswordClientAuth)));
870 #elif defined(USE_NSS)
865 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS( 871 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS(
866 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate, 872 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate,
867 chrome::kCryptoModulePasswordClientAuth))); 873 chrome::kCryptoModulePasswordClientAuth)));
868 #elif defined(OS_WIN) 874 #elif defined(OS_WIN)
869 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreWin()); 875 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreWin());
870 #elif defined(OS_MACOSX) 876 #elif defined(OS_MACOSX)
871 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreMac()); 877 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreMac());
872 #elif defined(USE_OPENSSL) 878 #elif defined(USE_OPENSSL)
873 // OpenSSL does not use the ClientCertStore infrastructure. On Android client 879 // OpenSSL does not use the ClientCertStore infrastructure. On Android client
874 // cert matching is done by the OS as part of the call to show the cert 880 // cert matching is done by the OS as part of the call to show the cert
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 void ProfileIOData::SetCookieSettingsForTesting( 1207 void ProfileIOData::SetCookieSettingsForTesting(
1202 CookieSettings* cookie_settings) { 1208 CookieSettings* cookie_settings) {
1203 DCHECK(!cookie_settings_.get()); 1209 DCHECK(!cookie_settings_.get());
1204 cookie_settings_ = cookie_settings; 1210 cookie_settings_ = cookie_settings;
1205 } 1211 }
1206 1212
1207 void ProfileIOData::set_signin_names_for_testing( 1213 void ProfileIOData::set_signin_names_for_testing(
1208 SigninNamesOnIOThread* signin_names) { 1214 SigninNamesOnIOThread* signin_names) {
1209 signin_names_.reset(signin_names); 1215 signin_names_.reset(signin_names);
1210 } 1216 }
OLDNEW
« no previous file with comments | « no previous file | crypto/nss_util.h » ('j') | net/cert/nss_profile_filter_chromeos.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698