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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service.cc

Issue 317613004: Remove usage of singleton software_slot_ in nss on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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/ownership/owner_settings_service.cc
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service.cc b/chrome/browser/chromeos/ownership/owner_settings_service.cc
index cf08b95a1d39f0b2c8d165874f4c3e87216ac83b..b1c409f602186b0ff37acc89e5ce5dd39463850c 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service.cc
+++ b/chrome/browser/chromeos/ownership/owner_settings_service.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
@@ -197,6 +198,27 @@ void OwnerSettingsService::OnTPMTokenReady() {
}
// static
+void OwnerSettingsService::IsOwnerForSafeModeAsync(
+ const std::string& user_id,
+ const std::string& user_hash,
+ const IsOwnerCallback& callback) {
+ CHECK(chromeos::LoginState::Get()->IsInSafeMode());
+
+ // Make sure NSS is initialzied and NSS DB is loaded for the user before
pneubeck (no reviews) 2014/07/01 14:37:17 typo: initialzied -> initialized
tbarzic 2014/07/01 23:55:03 Done.
+ // serching for the owner key.
pneubeck (no reviews) 2014/07/01 14:37:17 typo: serching -> searching
tbarzic 2014/07/01 23:55:03 Done.
+ BrowserThread::PostTaskAndReply(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(base::IgnoreResult(&crypto::InitializeNSSForChromeOSUser),
+ user_id,
+ user_hash,
+ ProfileHelper::GetProfilePathByUserIdHash(user_hash),
+ true /* provisional */),
pneubeck (no reviews) 2014/07/01 14:37:17 How about always initializing NSS in the parallel
tbarzic 2014/07/01 16:33:07 The NSS is actually initialized in profile_io_data
+ base::Bind(&OwnerSettingsService::IsPrivateKeyExistAsync,
+ callback));
+}
+
+// static
void OwnerSettingsService::IsPrivateKeyExistAsync(
const IsOwnerCallback& callback) {
scoped_refptr<OwnerKeyUtil> owner_key_util;

Powered by Google App Engine
This is Rietveld 408576698