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

Side by Side Diff: device/serial/test_serial_io_handler.cc

Issue 646053002: Implement permission_broker for serial devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix device_unittests. Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "device/serial/test_serial_io_handler.h" 5 #include "device/serial/test_serial_io_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "device/serial/serial.mojom.h" 10 #include "device/serial/serial.mojom.h"
11 11
12 namespace device { 12 namespace device {
13 13
14 TestSerialIoHandler::TestSerialIoHandler() 14 TestSerialIoHandler::TestSerialIoHandler()
15 : SerialIoHandler(NULL), 15 : SerialIoHandler(NULL, NULL),
16 opened_(false), 16 opened_(false),
17 dtr_(false), 17 dtr_(false),
18 rts_(false), 18 rts_(false),
19 flushes_(0) { 19 flushes_(0) {
20 } 20 }
21 21
22 scoped_refptr<SerialIoHandler> TestSerialIoHandler::Create() { 22 scoped_refptr<SerialIoHandler> TestSerialIoHandler::Create() {
23 return scoped_refptr<SerialIoHandler>(new TestSerialIoHandler); 23 return scoped_refptr<SerialIoHandler>(new TestSerialIoHandler);
24 } 24 }
25 25
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 dtr_ = signals.dtr; 102 dtr_ = signals.dtr;
103 if (signals.has_rts) 103 if (signals.has_rts)
104 rts_ = signals.rts; 104 rts_ = signals.rts;
105 return true; 105 return true;
106 } 106 }
107 107
108 TestSerialIoHandler::~TestSerialIoHandler() { 108 TestSerialIoHandler::~TestSerialIoHandler() {
109 } 109 }
110 110
111 } // namespace device 111 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/serial_service_unittest.cc ('k') | extensions/browser/api/serial/serial_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698