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; |