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

Unified Diff: chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc

Issue 1096293003: Move screenlock_bridge to components/proximity_auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add proximity auth client and the chrome glue. Created 5 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/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 78d1c4907185a2790a18718020d7dd57fb664fdb..9bffd053305500e78856dd2a40f08c835741c2a1 100644
--- a/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc
+++ b/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.cc
@@ -8,6 +8,7 @@
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/easy_unlock_service.h"
+#include "chrome/browser/signin/easy_unlock_util.h"
#include "chrome/common/extensions/api/screenlock_private.h"
#include "chrome/common/extensions/extension_constants.h"
#include "extensions/browser/app_window/app_window_registry.h"
@@ -50,7 +51,8 @@ ScreenlockPrivateGetLockedFunction::ScreenlockPrivateGetLockedFunction() {}
ScreenlockPrivateGetLockedFunction::~ScreenlockPrivateGetLockedFunction() {}
bool ScreenlockPrivateGetLockedFunction::RunAsync() {
- SetResult(new base::FundamentalValue(ScreenlockBridge::Get()->IsLocked()));
+ SetResult(
+ new base::FundamentalValue(GetScreenlockBridgeInstance()->IsLocked()));
SendResponse(error_.empty());
return true;
}
@@ -75,9 +77,9 @@ bool ScreenlockPrivateSetLockedFunction::RunAsync() {
if (service)
service->SetTrialRun();
}
- ScreenlockBridge::Get()->Lock(GetProfile());
+ GetScreenlockBridgeInstance()->Lock(GetProfile());
} else {
- ScreenlockBridge::Get()->Unlock(GetProfile());
+ GetScreenlockBridgeInstance()->Unlock(GetProfile());
}
SendResponse(error_.empty());
return true;
@@ -104,7 +106,7 @@ bool ScreenlockPrivateAcceptAuthAttemptFunction::RunSync() {
ScreenlockPrivateEventRouter::ScreenlockPrivateEventRouter(
content::BrowserContext* context)
: browser_context_(context) {
- ScreenlockBridge::Get()->AddObserver(this);
+ GetScreenlockBridgeInstance()->AddObserver(this);
}
ScreenlockPrivateEventRouter::~ScreenlockPrivateEventRouter() {}
@@ -146,7 +148,7 @@ ScreenlockPrivateEventRouter::GetFactoryInstance() {
}
void ScreenlockPrivateEventRouter::Shutdown() {
- ScreenlockBridge::Get()->RemoveObserver(this);
+ GetScreenlockBridgeInstance()->RemoveObserver(this);
}
bool ScreenlockPrivateEventRouter::OnAuthAttempted(

Powered by Google App Engine
This is Rietveld 408576698