Chromium Code Reviews| Index: chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc |
| diff --git a/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc b/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc |
| index b55a9cb74b11df28ad9d26eafc3856ea233e16cf..cc2001833a4ea4de0a54d18725c614afc3589fb0 100644 |
| --- a/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc |
| +++ b/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/lazy_instance.h" |
| #include "base/values.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/signin/chrome_proximity_auth_client.h" |
| #include "chrome/browser/signin/easy_unlock_service.h" |
| #include "chrome/browser/signin/proximity_auth_facade.h" |
| #include "chrome/common/extensions/api/screenlock_private.h" |
| @@ -65,6 +66,7 @@ bool ScreenlockPrivateSetLockedFunction::RunAsync() { |
| scoped_ptr<screenlock::SetLocked::Params> params( |
| screenlock::SetLocked::Params::Create(*args_)); |
| EXTENSION_FUNCTION_VALIDATE(params.get()); |
| + EasyUnlockService* service = EasyUnlockService::Get(GetProfile()); |
| if (params->locked) { |
| if (extension()->id() == extension_misc::kEasyUnlockAppId && |
| AppWindowRegistry::Get(browser_context()) |
| @@ -73,13 +75,12 @@ bool ScreenlockPrivateSetLockedFunction::RunAsync() { |
| // Mark the Easy Unlock behaviour on the lock screen as the one initiated |
| // by the Easy Unlock setup app as a trial one. |
| // TODO(tbarzic): Move this logic to a new easyUnlockPrivate function. |
| - EasyUnlockService* service = EasyUnlockService::Get(GetProfile()); |
| - if (service) |
| - service->SetTrialRun(); |
| + service->SetTrialRun(); |
| } |
| - GetScreenlockBridgeInstance()->Lock(GetProfile()); |
| + GetScreenlockBridgeInstance()->Lock(); |
| } else { |
| - GetScreenlockBridgeInstance()->Unlock(GetProfile()); |
| + GetScreenlockBridgeInstance()->Unlock( |
| + service->proximity_auth_client()->GetAuthenticatedUsername()); |
|
Marijn Kruisselbrink
2015/06/29 18:15:04
Can you add a comment to that Unlock method to des
Ilya Sherman
2015/06/30 00:22:00
Done, though I'm not sure how much it helps. I th
Ilya Sherman
2015/06/30 01:36:58
To address the other part of your reply: Tim speci
|
| } |
| SendResponse(error_.empty()); |
| return true; |