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

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

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more refactoring 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "chrome/browser/chromeos/login/user_manager.h" 94 #include "chrome/browser/chromeos/login/user_manager.h"
95 #include "chrome/browser/chromeos/policy/policy_cert_service.h" 95 #include "chrome/browser/chromeos/policy/policy_cert_service.h"
96 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" 96 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
97 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" 97 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
98 #include "chrome/browser/chromeos/settings/cros_settings.h" 98 #include "chrome/browser/chromeos/settings/cros_settings.h"
99 #include "chromeos/dbus/cryptohome_client.h" 99 #include "chromeos/dbus/cryptohome_client.h"
100 #include "chromeos/dbus/dbus_thread_manager.h" 100 #include "chromeos/dbus/dbus_thread_manager.h"
101 #include "chromeos/settings/cros_settings_names.h" 101 #include "chromeos/settings/cros_settings_names.h"
102 #include "crypto/nss_util.h" 102 #include "crypto/nss_util.h"
103 #include "crypto/nss_util_internal.h" 103 #include "crypto/nss_util_internal.h"
104 #include "net/ssl/client_cert_store_chromeos.h"
104 #endif // defined(OS_CHROMEOS) 105 #endif // defined(OS_CHROMEOS)
105 106
106 #if defined(USE_NSS) 107 #if defined(USE_NSS)
107 #include "chrome/browser/ui/crypto_module_delegate_nss.h" 108 #include "chrome/browser/ui/crypto_module_delegate_nss.h"
108 #endif 109 #endif
109 110
110 using content::BrowserContext; 111 using content::BrowserContext;
111 using content::BrowserThread; 112 using content::BrowserThread;
112 using content::ResourceContext; 113 using content::ResourceContext;
113 114
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 826
826 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { 827 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() {
827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 828 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
828 DCHECK(io_data_->initialized_); 829 DCHECK(io_data_->initialized_);
829 return request_context_; 830 return request_context_;
830 } 831 }
831 832
832 scoped_ptr<net::ClientCertStore> 833 scoped_ptr<net::ClientCertStore>
833 ProfileIOData::ResourceContext::CreateClientCertStore() { 834 ProfileIOData::ResourceContext::CreateClientCertStore() {
834 #if !defined(USE_OPENSSL) 835 #if !defined(USE_OPENSSL)
836 #if defined(OS_CHROMEOS)
837 scoped_ptr<net::ClientCertStoreChromeOS> store(
838 new net::ClientCertStoreChromeOS(io_data_->username_hash()));
839 #else
835 scoped_ptr<net::ClientCertStoreImpl> store(new net::ClientCertStoreImpl()); 840 scoped_ptr<net::ClientCertStoreImpl> store(new net::ClientCertStoreImpl());
841 #endif
836 #if defined(USE_NSS) 842 #if defined(USE_NSS)
837 store->set_password_delegate_factory( 843 store->set_password_delegate_factory(
838 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate, 844 base::Bind(&CreateCryptoModuleBlockingPasswordDelegate,
839 chrome::kCryptoModulePasswordClientAuth)); 845 chrome::kCryptoModulePasswordClientAuth));
840 #endif 846 #endif
841 return store.PassAs<net::ClientCertStore>(); 847 return store.PassAs<net::ClientCertStore>();
842 #else // defined(USE_OPENSSL) 848 #else // defined(USE_OPENSSL)
843 // OpenSSL does not use the ClientCertStore infrastructure. On Android client 849 // OpenSSL does not use the ClientCertStore infrastructure. On Android client
844 // cert matching is done by the OS as part of the call to show the cert 850 // cert matching is done by the OS as part of the call to show the cert
845 // selection dialog. 851 // selection dialog.
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 void ProfileIOData::SetCookieSettingsForTesting( 1171 void ProfileIOData::SetCookieSettingsForTesting(
1166 CookieSettings* cookie_settings) { 1172 CookieSettings* cookie_settings) {
1167 DCHECK(!cookie_settings_.get()); 1173 DCHECK(!cookie_settings_.get());
1168 cookie_settings_ = cookie_settings; 1174 cookie_settings_ = cookie_settings;
1169 } 1175 }
1170 1176
1171 void ProfileIOData::set_signin_names_for_testing( 1177 void ProfileIOData::set_signin_names_for_testing(
1172 SigninNamesOnIOThread* signin_names) { 1178 SigninNamesOnIOThread* signin_names) {
1173 signin_names_.reset(signin_names); 1179 signin_names_.reset(signin_names);
1174 } 1180 }
OLDNEW
« no previous file with comments | « chrome/browser/net/nss_context_linux.cc ('k') | chrome/browser/resources/options/certificate_manager.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698