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

Unified Diff: components/proximity_auth/ble/proximity_auth_ble_system.cc

Issue 1209193003: [Proximity Auth] Create one ProximityAuthClient per profile, rather than one global one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: components/proximity_auth/ble/proximity_auth_ble_system.cc
diff --git a/components/proximity_auth/ble/proximity_auth_ble_system.cc b/components/proximity_auth/ble/proximity_auth_ble_system.cc
index 5ad6b624070b2297385b5db0a42503547d8c61f2..af3bd398acee373221496275c3d87acc474ac800 100644
--- a/components/proximity_auth/ble/proximity_auth_ble_system.cc
+++ b/components/proximity_auth/ble/proximity_auth_ble_system.cc
@@ -68,17 +68,17 @@ void ProximityAuthBleSystem::ScreenlockBridgeAdapter::RemoveObserver(
}
void ProximityAuthBleSystem::ScreenlockBridgeAdapter::Unlock(
- content::BrowserContext* browser_context) {
- screenlock_bridge_->Unlock(browser_context);
+ ProximityAuthClient* client) {
+ screenlock_bridge_->Unlock(client);
}
ProximityAuthBleSystem::ProximityAuthBleSystem(
ScreenlockBridge* screenlock_bridge,
- content::BrowserContext* browser_context,
+ ProximityAuthClient* proximity_auth_client,
scoped_ptr<CryptAuthClientFactory> cryptauth_client_factory)
: screenlock_bridge_(new ProximityAuthBleSystem::ScreenlockBridgeAdapter(
screenlock_bridge)),
- browser_context_(browser_context),
+ proximity_auth_client_(proximity_auth_client),
cryptauth_client_factory_(cryptauth_client_factory.Pass()),
is_polling_screen_state_(false),
weak_ptr_factory_(this) {
@@ -87,10 +87,10 @@ ProximityAuthBleSystem::ProximityAuthBleSystem(
}
ProximityAuthBleSystem::ProximityAuthBleSystem(
- ScreenlockBridgeAdapter* screenlock_bridge,
- content::BrowserContext* browser_context)
- : screenlock_bridge_(screenlock_bridge),
- browser_context_(browser_context),
+ scoped_ptr<ScreenlockBridgeAdapter> screenlock_bridge,
+ ProximityAuthClient* proximity_auth_client)
+ : screenlock_bridge_(screenlock_bridge.Pass()),
+ proximity_auth_client_(proximity_auth_client),
is_polling_screen_state_(false),
weak_ptr_factory_(this) {
VLOG(1) << "Starting Proximity Auth over Bluetooth Low Energy.";
@@ -206,7 +206,7 @@ void ProximityAuthBleSystem::OnMessageReceived(const Connection& connection,
// the Proximity Auth Unlock Manager migration to C++ is done.
if (message.payload() == kScreenUnlocked) {
VLOG(1) << "Device unlocked. Unlock.";
- screenlock_bridge_->Unlock(browser_context_);
+ screenlock_bridge_->Unlock(proximity_auth_client_);
}
}

Powered by Google App Engine
This is Rietveld 408576698