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

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

Issue 1121233003: Replacing VerifierTraits with DummyVerifierTraits for non-kernel handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « base/win/scoped_hdc.h ('k') | printing/backend/win_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bluetooth/bluetooth_low_energy_win.h" 5 #include "device/bluetooth/bluetooth_low_energy_win.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return handle != INVALID_HANDLE_VALUE; 42 return handle != INVALID_HANDLE_VALUE;
43 } 43 }
44 44
45 static HDEVINFO NullHandle() { return INVALID_HANDLE_VALUE; } 45 static HDEVINFO NullHandle() { return INVALID_HANDLE_VALUE; }
46 46
47 private: 47 private:
48 DISALLOW_IMPLICIT_CONSTRUCTORS(DeviceInfoSetTraits); 48 DISALLOW_IMPLICIT_CONSTRUCTORS(DeviceInfoSetTraits);
49 }; 49 };
50 50
51 typedef base::win::GenericScopedHandle<DeviceInfoSetTraits, 51 typedef base::win::GenericScopedHandle<DeviceInfoSetTraits,
52 base::win::VerifierTraits> 52 base::win::DummyVerifierTraits>
53 ScopedDeviceInfoSetHandle; 53 ScopedDeviceInfoSetHandle;
54 54
55 bool StringToBluetoothAddress(const std::string& value, 55 bool StringToBluetoothAddress(const std::string& value,
56 BLUETOOTH_ADDRESS* btha, 56 BLUETOOTH_ADDRESS* btha,
57 std::string* error) { 57 std::string* error) {
58 if (value.length() != 6 * 2) { 58 if (value.length() != 6 * 2) {
59 *error = kInvalidBluetoothAddress; 59 *error = kInvalidBluetoothAddress;
60 return false; 60 return false;
61 } 61 }
62 62
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 665
666 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( 666 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting(
667 const std::string& instance_id, 667 const std::string& instance_id,
668 BLUETOOTH_ADDRESS* btha, 668 BLUETOOTH_ADDRESS* btha,
669 std::string* error) { 669 std::string* error) {
670 return ExtractBluetoothAddressFromDeviceInstanceId(instance_id, btha, error); 670 return ExtractBluetoothAddressFromDeviceInstanceId(instance_id, btha, error);
671 } 671 }
672 672
673 } // namespace win 673 } // namespace win
674 } // namespace device 674 } // namespace device
OLDNEW
« no previous file with comments | « base/win/scoped_hdc.h ('k') | printing/backend/win_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698