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

Side by Side Diff: device/bluetooth/bluetooth_service_record_win.cc

Issue 415773009: Re-enable various MSVC warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_service_record_win.h" 5 #include "device/bluetooth/bluetooth_service_record_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 BluetoothServiceRecordWin::BluetoothServiceRecordWin( 123 BluetoothServiceRecordWin::BluetoothServiceRecordWin(
124 const std::string& device_address, 124 const std::string& device_address,
125 const std::string& name, 125 const std::string& name,
126 const std::vector<uint8>& sdp_bytes, 126 const std::vector<uint8>& sdp_bytes,
127 const BluetoothUUID& gatt_uuid) 127 const BluetoothUUID& gatt_uuid)
128 : device_bth_addr_(ConvertToBthAddr(device_address)), 128 : device_bth_addr_(ConvertToBthAddr(device_address)),
129 device_address_(device_address), 129 device_address_(device_address),
130 name_(name), 130 name_(name),
131 uuid_(gatt_uuid), 131 uuid_(gatt_uuid),
132 supports_rfcomm_(false), 132 supports_rfcomm_(false),
133 rfcomm_channel_(-1) { 133 rfcomm_channel_(0xFF) {
134 // Bluetooth 2.0 134 // Bluetooth 2.0
135 if (sdp_bytes.size() > 0) { 135 if (sdp_bytes.size() > 0) {
136 LPBYTE blob_data = const_cast<LPBYTE>(&sdp_bytes[0]); 136 LPBYTE blob_data = const_cast<LPBYTE>(&sdp_bytes[0]);
137 ULONG blob_size = static_cast<ULONG>(sdp_bytes.size()); 137 ULONG blob_size = static_cast<ULONG>(sdp_bytes.size());
138 SDP_ELEMENT_DATA protocol_descriptor_list_data; 138 SDP_ELEMENT_DATA protocol_descriptor_list_data;
139 if (ERROR_SUCCESS == 139 if (ERROR_SUCCESS ==
140 BluetoothSdpGetAttributeValue(blob_data, 140 BluetoothSdpGetAttributeValue(blob_data,
141 blob_size, 141 blob_size,
142 kProtocolDescriptorListId, 142 kProtocolDescriptorListId,
143 &protocol_descriptor_list_data)) { 143 &protocol_descriptor_list_data)) {
144 ExtractChannels( 144 ExtractChannels(
145 protocol_descriptor_list_data, &supports_rfcomm_, &rfcomm_channel_); 145 protocol_descriptor_list_data, &supports_rfcomm_, &rfcomm_channel_);
146 } 146 }
147 SDP_ELEMENT_DATA uuid_data; 147 SDP_ELEMENT_DATA uuid_data;
148 if (ERROR_SUCCESS == BluetoothSdpGetAttributeValue( 148 if (ERROR_SUCCESS == BluetoothSdpGetAttributeValue(
149 blob_data, blob_size, kUuidId, &uuid_data)) { 149 blob_data, blob_size, kUuidId, &uuid_data)) {
150 ExtractUuid(uuid_data, &uuid_); 150 ExtractUuid(uuid_data, &uuid_);
151 } 151 }
152 } 152 }
153 } 153 }
154 154
155 } // namespace device 155 } // namespace device
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | gpu/gles2_conform_support/egl/config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698