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

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

Issue 1372283002: Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: fix msan tests Created 5 years, 2 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/fake_connection.h" 5 #include "components/proximity_auth/fake_connection.h"
6 6
7 #include "components/proximity_auth/wire_message.h" 7 #include "components/proximity_auth/wire_message.h"
8 8
9 namespace proximity_auth { 9 namespace proximity_auth {
10 10
11 FakeConnection::FakeConnection(const RemoteDevice& remote_device) 11 FakeConnection::FakeConnection(const RemoteDevice& remote_device)
12 : Connection(RemoteDevice()) { 12 : Connection(remote_device) {
13 Connect(); 13 Connect();
14 } 14 }
15 15
16 FakeConnection::~FakeConnection() { 16 FakeConnection::~FakeConnection() {
17 Disconnect(); 17 Disconnect();
18 } 18 }
19 19
20 void FakeConnection::Connect() { 20 void FakeConnection::Connect() {
21 SetStatus(CONNECTED); 21 SetStatus(CONNECTED);
22 } 22 }
(...skipping 21 matching lines...) Expand all
44 current_message_ = message.Pass(); 44 current_message_ = message.Pass();
45 } 45 }
46 46
47 scoped_ptr<WireMessage> FakeConnection::DeserializeWireMessage( 47 scoped_ptr<WireMessage> FakeConnection::DeserializeWireMessage(
48 bool* is_incomplete_message) { 48 bool* is_incomplete_message) {
49 *is_incomplete_message = false; 49 *is_incomplete_message = false;
50 return make_scoped_ptr(new WireMessage(pending_payload_)); 50 return make_scoped_ptr(new WireMessage(pending_payload_));
51 } 51 }
52 52
53 } // namespace proximity_auth 53 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698