Index: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc |
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc |
index 8844619823b4468ed17faca696d2765ca1c0f9d8..c9d40039efabffd5646d9d60c178348c4b54a2a6 100644 |
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc |
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc |
@@ -40,7 +40,8 @@ |
#endif |
namespace extensions { |
-namespace api { |
+ |
+namespace easy_unlock_private = api::easy_unlock_private; |
namespace { |
@@ -51,7 +52,7 @@ static base::LazyInstance<BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI> > |
EasyUnlockPrivateCryptoDelegate* GetCryptoDelegate( |
content::BrowserContext* context) { |
return BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>::Get(context) |
- ->crypto_delegate(); |
+ ->GetCryptoDelegate(); |
} |
EasyUnlockScreenlockStateHandler::State ToScreenlockStateHandlerState( |
@@ -93,12 +94,17 @@ BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>* |
return g_factory.Pointer(); |
} |
-EasyUnlockPrivateAPI::EasyUnlockPrivateAPI(content::BrowserContext* context) |
- : crypto_delegate_(EasyUnlockPrivateCryptoDelegate::Create()) { |
+EasyUnlockPrivateAPI::EasyUnlockPrivateAPI(content::BrowserContext* context) { |
} |
EasyUnlockPrivateAPI::~EasyUnlockPrivateAPI() {} |
+EasyUnlockPrivateCryptoDelegate* EasyUnlockPrivateAPI::GetCryptoDelegate() { |
+ if (!crypto_delegate_) |
+ crypto_delegate_ = EasyUnlockPrivateCryptoDelegate::Create(); |
+ return crypto_delegate_.get(); |
+} |
+ |
EasyUnlockPrivateGetStringsFunction::EasyUnlockPrivateGetStringsFunction() { |
} |
EasyUnlockPrivateGetStringsFunction::~EasyUnlockPrivateGetStringsFunction() { |
@@ -835,5 +841,4 @@ bool EasyUnlockPrivateSetAutoPairingResultFunction::RunSync() { |
return true; |
} |
-} // namespace api |
} // namespace extensions |