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

Side by Side Diff: device/hid/hid_service_win.cc

Issue 1837483003: Move base::FreeDeleter into its own header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/hid/hid_service_win.h" 5 #include "device/hid/hid_service_win.h"
6 6
7 #define INITGUID 7 #define INITGUID
8 8
9 #include <dbt.h> 9 #include <dbt.h>
10 #include <setupapi.h> 10 #include <setupapi.h>
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <winioctl.h> 12 #include <winioctl.h>
13 13
14 #include <utility> 14 #include <utility>
15 15
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/files/file.h" 17 #include "base/files/file.h"
18 #include "base/location.h" 18 #include "base/location.h"
19 #include "base/memory/free_deleter.h"
19 #include "base/single_thread_task_runner.h" 20 #include "base/single_thread_task_runner.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/strings/sys_string_conversions.h" 22 #include "base/strings/sys_string_conversions.h"
22 #include "base/thread_task_runner_handle.h" 23 #include "base/thread_task_runner_handle.h"
23 #include "base/threading/thread_restrictions.h" 24 #include "base/threading/thread_restrictions.h"
24 #include "components/device_event_log/device_event_log.h" 25 #include "components/device_event_log/device_event_log.h"
25 #include "device/hid/hid_connection_win.h" 26 #include "device/hid/hid_connection_win.h"
26 #include "device/hid/hid_device_info.h" 27 #include "device/hid/hid_device_info.h"
27 #include "net/base/io_buffer.h" 28 #include "net/base/io_buffer.h"
28 29
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 296 FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
296 FILE_FLAG_OVERLAPPED, NULL)); 297 FILE_FLAG_OVERLAPPED, NULL));
297 if (!file.IsValid() && GetLastError() == ERROR_ACCESS_DENIED) { 298 if (!file.IsValid() && GetLastError() == ERROR_ACCESS_DENIED) {
298 file.Set(CreateFileA(device_path.c_str(), GENERIC_READ, FILE_SHARE_READ, 299 file.Set(CreateFileA(device_path.c_str(), GENERIC_READ, FILE_SHARE_READ,
299 NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL)); 300 NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL));
300 } 301 }
301 return file; 302 return file;
302 } 303 }
303 304
304 } // namespace device 305 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698