OLD | NEW |
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 "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h" | 5 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h" |
6 | 6 |
| 7 #include "base/lazy_instance.h" |
7 #include "device/bluetooth/bluetooth_socket.h" | 8 #include "device/bluetooth/bluetooth_socket.h" |
8 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 const char kSocketNotConnectedError[] = "Socket not connected"; | 13 const char kSocketNotConnectedError[] = "Socket not connected"; |
13 const char kSocketNotListeningError[] = "Socket not listening"; | 14 const char kSocketNotListeningError[] = "Socket not listening"; |
14 | 15 |
15 } // namespace | 16 } // namespace |
16 | 17 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 189 |
189 // static | 190 // static |
190 void BluetoothApiSocket::OnSocketAcceptError( | 191 void BluetoothApiSocket::OnSocketAcceptError( |
191 const ErrorCompletionCallback& error_callback, | 192 const ErrorCompletionCallback& error_callback, |
192 const std::string& message) { | 193 const std::string& message) { |
193 DCHECK(content::BrowserThread::CurrentlyOn(kThreadId)); | 194 DCHECK(content::BrowserThread::CurrentlyOn(kThreadId)); |
194 error_callback.Run(BluetoothApiSocket::kSystemError, message); | 195 error_callback.Run(BluetoothApiSocket::kSystemError, message); |
195 } | 196 } |
196 | 197 |
197 } // namespace extensions | 198 } // namespace extensions |
OLD | NEW |