OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bluetooth/bluetooth_socket_win.h" | 5 #include "device/bluetooth/bluetooth_socket_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "device/bluetooth/bluetooth_init_win.h" | 12 #include "device/bluetooth/bluetooth_init_win.h" |
13 #include "device/bluetooth/bluetooth_service_record_win.h" | 13 #include "device/bluetooth/bluetooth_service_record_win.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 #include "net/base/winsock_init.h" | 15 #include "net/base/winsock_init.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 std::string FormatErrorMessage(DWORD error_code) { | 19 std::string FormatErrorMessage(DWORD error_code) { |
20 TCHAR error_msg[1024]; | 20 TCHAR error_msg[1024]; |
21 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, | 21 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return false; | 106 return false; |
107 } | 107 } |
108 return true; | 108 return true; |
109 } | 109 } |
110 | 110 |
111 std::string BluetoothSocketWin::GetLastErrorMessage() const { | 111 std::string BluetoothSocketWin::GetLastErrorMessage() const { |
112 return error_message_; | 112 return error_message_; |
113 } | 113 } |
114 | 114 |
115 } // namespace device | 115 } // namespace device |
OLD | NEW |