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

Unified Diff: chrome/browser/chromeos/login/user_manager.cc

Issue 6667020: This change loads opencryptoki and uses the TPM for keygen tags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleaning up Created 9 years, 8 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/login/user_manager.cc
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index 922ac4dbcdf1d587fa93e054e2be2b3cb455db9f..c730aad163430eae29065f2097793d65672a8039 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -27,6 +28,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
#include "content/common/notification_type.h"
@@ -570,6 +572,14 @@ void UserManager::NotifyOnLogin() {
// Ensure we've opened the real user's key/certificate database.
base::OpenPersistentNSSDB();
+ // Only load the Opencryptoki library into NSS if we have this switch.
+ // TODO(gspencer): Remove this switch once cryptohomed work is finished:
+ // http://crosbug.com/12295 and http://crosbug.com/12304
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kLoadOpencryptoki)) {
+ base::EnableTPMForNSS();
+ }
+
// Schedules current user ownership check on file thread.
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(&CheckOwnership));

Powered by Google App Engine
This is Rietveld 408576698