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

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: . 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #include "chrome/browser/chromeos/login/user_manager.h" 93 #include "chrome/browser/chromeos/login/user_manager.h"
94 #include "chrome/browser/chromeos/policy/policy_cert_service.h" 94 #include "chrome/browser/chromeos/policy/policy_cert_service.h"
95 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" 95 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
96 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" 96 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
97 #include "chrome/browser/chromeos/settings/cros_settings.h" 97 #include "chrome/browser/chromeos/settings/cros_settings.h"
98 #include "chromeos/dbus/cryptohome_client.h" 98 #include "chromeos/dbus/cryptohome_client.h"
99 #include "chromeos/dbus/dbus_thread_manager.h" 99 #include "chromeos/dbus/dbus_thread_manager.h"
100 #include "chromeos/settings/cros_settings_names.h" 100 #include "chromeos/settings/cros_settings_names.h"
101 #include "crypto/nss_util.h" 101 #include "crypto/nss_util.h"
102 #include "crypto/nss_util_internal.h" 102 #include "crypto/nss_util_internal.h"
103 #include "net/ssl/client_cert_store_chromeos.h"
103 #endif // defined(OS_CHROMEOS) 104 #endif // defined(OS_CHROMEOS)
104 105
105 #if defined(USE_NSS) 106 #if defined(USE_NSS)
106 #include "chrome/browser/ui/crypto_module_delegate_nss.h" 107 #include "chrome/browser/ui/crypto_module_delegate_nss.h"
107 #include "net/ssl/client_cert_store_nss.h" 108 #include "net/ssl/client_cert_store_nss.h"
108 #endif 109 #endif
109 110
110 #if defined(OS_WIN) 111 #if defined(OS_WIN)
111 #include "net/ssl/client_cert_store_win.h" 112 #include "net/ssl/client_cert_store_win.h"
112 #endif 113 #endif
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 } 833 }
833 834
834 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { 835 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() {
835 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 836 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
836 DCHECK(io_data_->initialized_); 837 DCHECK(io_data_->initialized_);
837 return request_context_; 838 return request_context_;
838 } 839 }
839 840
840 scoped_ptr<net::ClientCertStore> 841 scoped_ptr<net::ClientCertStore>
841 ProfileIOData::ResourceContext::CreateClientCertStore() { 842 ProfileIOData::ResourceContext::CreateClientCertStore() {
842 #if defined(USE_NSS) 843 #if defined(OS_CHROMEOS)
844 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreChromeOS(
845 io_data_->username_hash(),
846 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate,
847 chrome::kCryptoModulePasswordClientAuth)));
848 #elif defined(USE_NSS)
843 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS( 849 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS(
844 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate, 850 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate,
845 chrome::kCryptoModulePasswordClientAuth))); 851 chrome::kCryptoModulePasswordClientAuth)));
846 #elif defined(OS_WIN) 852 #elif defined(OS_WIN)
847 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreWin()); 853 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreWin());
848 #elif defined(OS_MACOSX) 854 #elif defined(OS_MACOSX)
849 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreMac()); 855 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreMac());
850 #elif defined(USE_OPENSSL) 856 #elif defined(USE_OPENSSL)
851 // OpenSSL does not use the ClientCertStore infrastructure. On Android client 857 // OpenSSL does not use the ClientCertStore infrastructure. On Android client
852 // cert matching is done by the OS as part of the call to show the cert 858 // cert matching is done by the OS as part of the call to show the cert
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 void ProfileIOData::SetCookieSettingsForTesting( 1184 void ProfileIOData::SetCookieSettingsForTesting(
1179 CookieSettings* cookie_settings) { 1185 CookieSettings* cookie_settings) {
1180 DCHECK(!cookie_settings_.get()); 1186 DCHECK(!cookie_settings_.get());
1181 cookie_settings_ = cookie_settings; 1187 cookie_settings_ = cookie_settings;
1182 } 1188 }
1183 1189
1184 void ProfileIOData::set_signin_names_for_testing( 1190 void ProfileIOData::set_signin_names_for_testing(
1185 SigninNamesOnIOThread* signin_names) { 1191 SigninNamesOnIOThread* signin_names) {
1186 signin_names_.reset(signin_names); 1192 signin_names_.reset(signin_names);
1187 } 1193 }
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