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

Side by Side Diff: components/proximity_auth/ble/proximity_auth_ble_system.cc

Issue 1165323004: We should use UserID object to identify users instead of username. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/proximity_auth/ble/proximity_auth_ble_system.h" 5 #include "components/proximity_auth/ble/proximity_auth_ble_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h" 9 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h"
10 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h " 10 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h "
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void ProximityAuthBleSystem::OnScreenDidUnlock( 70 void ProximityAuthBleSystem::OnScreenDidUnlock(
71 ScreenlockBridge::LockHandler::ScreenType screen_type) { 71 ScreenlockBridge::LockHandler::ScreenType screen_type) {
72 VLOG(1) << "OnScreenDidUnlock: " << screen_type; 72 VLOG(1) << "OnScreenDidUnlock: " << screen_type;
73 if (connection_) 73 if (connection_)
74 connection_->Disconnect(); 74 connection_->Disconnect();
75 75
76 connection_.reset(); 76 connection_.reset();
77 connection_finder_.reset(); 77 connection_finder_.reset();
78 }; 78 };
79 79
80 void ProximityAuthBleSystem::OnFocusedUserChanged(const std::string& user_id) { 80 void ProximityAuthBleSystem::OnFocusedUserChanged(const user_manager::UserID& us er_id) {
81 VLOG(1) << "OnFocusedUserChanged: " << user_id; 81 VLOG(1) << "OnFocusedUserChanged: " << user_id.Serialize();
82 }; 82 };
83 83
84 void ProximityAuthBleSystem::OnConnectionFound( 84 void ProximityAuthBleSystem::OnConnectionFound(
85 scoped_ptr<Connection> connection) { 85 scoped_ptr<Connection> connection) {
86 VLOG(1) << "Connection found. Unlock."; 86 VLOG(1) << "Connection found. Unlock.";
87 87
88 connection_ = connection.Pass(); 88 connection_ = connection.Pass();
89 89
90 // Unlock the screen when a connection is found. 90 // Unlock the screen when a connection is found.
91 // 91 //
92 // Note that this magically unlocks Chrome (no user interaction is needed). 92 // Note that this magically unlocks Chrome (no user interaction is needed).
93 // This user experience for this operation will be greately improved once 93 // This user experience for this operation will be greately improved once
94 // the Proximity Auth Unlock Manager migration to C++ is done. 94 // the Proximity Auth Unlock Manager migration to C++ is done.
95 screenlock_bridge_->Unlock(browser_context_); 95 screenlock_bridge_->Unlock(browser_context_);
96 } 96 }
97 97
98 } // namespace proximity_auth 98 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698