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

Unified Diff: chrome/browser/chromeos/cros/cert_library.cc

Issue 10574040: Remove chromeos::LibraryLoader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/cert_library.cc
diff --git a/chrome/browser/chromeos/cros/cert_library.cc b/chrome/browser/chromeos/cros/cert_library.cc
index a5cade12441dbe0a919cd72e5a141f74999d2197..65518af9c5d9d9671888e204eaa69bc9761948e1 100644
--- a/chrome/browser/chromeos/cros/cert_library.cc
+++ b/chrome/browser/chromeos/cros/cert_library.cc
@@ -108,13 +108,14 @@ class CertLibraryImpl
public:
typedef ObserverListThreadSafe<CertLibrary::Observer> CertLibraryObserverList;
- CertLibraryImpl() :
+ explicit CertLibraryImpl(bool stub) :
observer_list_(new CertLibraryObserverList),
tpm_token_ready_(false),
user_logged_in_(false),
certificates_requested_(false),
certificates_loaded_(false),
key_store_loaded_(false),
+ is_stub_mode_(stub),
ALLOW_THIS_IN_INITIALIZER_LIST(certs_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(user_certs_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(server_certs_(this)),
@@ -154,7 +155,7 @@ class CertLibraryImpl
// make sure that that case still works.
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kLoadOpencryptoki) ||
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kStubCros)) {
+ is_stub_mode_) {
stevenjb 2012/06/20 17:26:47 This really shouldn't be tied to stub_mode, it sho
hashimoto 2012/06/21 06:20:59 Done.
crypto::EnableTPMTokenForNSS();
// Note: this calls crypto::EnsureTPMTokenReady()
RequestCertificates();
@@ -509,6 +510,9 @@ class CertLibraryImpl
// "safe-mode".
bool key_store_loaded_;
+ // True when stub implementation is required.
+ bool is_stub_mode_;
+
// Certificates.
CertList certs_;
CertList user_certs_;
@@ -527,8 +531,7 @@ CertLibrary::~CertLibrary() {
// static
CertLibrary* CertLibrary::GetImpl(bool stub) {
- // No libcros dependencies, so always return CertLibraryImpl() (no stub).
- return new CertLibraryImpl();
+ return new CertLibraryImpl(stub);
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/cros/cros_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698