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

Side by Side Diff: components/proximity_auth/remote_device_life_cycle_impl.cc

Issue 2845433003: [EasyUnlock] Update ProximityMonitor to only check for RSSI proximity. (Closed)
Patch Set: [EasyUnlock] Update ProximityMonitor to only check for RSSI proximity. Created 3 years, 7 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/remote_device_life_cycle_impl.h" 5 #include "components/proximity_auth/remote_device_life_cycle_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 PA_LOG(INFO) << "Life cycle for " << remote_device_.bluetooth_address 55 PA_LOG(INFO) << "Life cycle for " << remote_device_.bluetooth_address
56 << " started."; 56 << " started.";
57 DCHECK(state_ == RemoteDeviceLifeCycle::State::STOPPED); 57 DCHECK(state_ == RemoteDeviceLifeCycle::State::STOPPED);
58 FindConnection(); 58 FindConnection();
59 } 59 }
60 60
61 cryptauth::RemoteDevice RemoteDeviceLifeCycleImpl::GetRemoteDevice() const { 61 cryptauth::RemoteDevice RemoteDeviceLifeCycleImpl::GetRemoteDevice() const {
62 return remote_device_; 62 return remote_device_;
63 } 63 }
64 64
65 cryptauth::Connection* RemoteDeviceLifeCycleImpl::GetConnection() const {
66 return connection_.get();
67 }
68
65 RemoteDeviceLifeCycle::State RemoteDeviceLifeCycleImpl::GetState() const { 69 RemoteDeviceLifeCycle::State RemoteDeviceLifeCycleImpl::GetState() const {
66 return state_; 70 return state_;
67 } 71 }
68 72
69 Messenger* RemoteDeviceLifeCycleImpl::GetMessenger() { 73 Messenger* RemoteDeviceLifeCycleImpl::GetMessenger() {
70 return messenger_.get(); 74 return messenger_.get();
71 } 75 }
72 76
73 void RemoteDeviceLifeCycleImpl::AddObserver(Observer* observer) { 77 void RemoteDeviceLifeCycleImpl::AddObserver(Observer* observer) {
74 observers_.AddObserver(observer); 78 observers_.AddObserver(observer);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 TransitionToState(RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED); 183 TransitionToState(RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED);
180 } 184 }
181 185
182 void RemoteDeviceLifeCycleImpl::OnDisconnected() { 186 void RemoteDeviceLifeCycleImpl::OnDisconnected() {
183 DCHECK(state_ == RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED); 187 DCHECK(state_ == RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED);
184 messenger_.reset(); 188 messenger_.reset();
185 FindConnection(); 189 FindConnection();
186 } 190 }
187 191
188 } // namespace proximity_auth 192 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698