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

Side by Side Diff: extensions/browser/api/usb/usb_guid_map.cc

Issue 2417043002: Move device/core files to device/base directory. (Closed)
Patch Set: Fix ChromeOS build Created 4 years, 2 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 | « extensions/browser/api/usb/usb_event_router.cc ('k') | extensions/shell/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/usb/usb_guid_map.h" 5 #include "extensions/browser/api/usb/usb_guid_map.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "device/core/device_client.h" 11 #include "device/base/device_client.h"
12 #include "device/usb/usb_device.h" 12 #include "device/usb/usb_device.h"
13 #include "device/usb/usb_service.h" 13 #include "device/usb/usb_service.h"
14 #include "extensions/common/api/usb.h" 14 #include "extensions/common/api/usb.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 namespace { 18 namespace {
19 19
20 base::LazyInstance<BrowserContextKeyedAPIFactory<UsbGuidMap>>::Leaky 20 base::LazyInstance<BrowserContextKeyedAPIFactory<UsbGuidMap>>::Leaky
21 g_usb_guid_map_factory = LAZY_INSTANCE_INITIALIZER; 21 g_usb_guid_map_factory = LAZY_INSTANCE_INITIALIZER;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 scoped_refptr<device::UsbDevice> device) { 77 scoped_refptr<device::UsbDevice> device) {
78 auto iter = guid_to_id_map_.find(device->guid()); 78 auto iter = guid_to_id_map_.find(device->guid());
79 if (iter != guid_to_id_map_.end()) { 79 if (iter != guid_to_id_map_.end()) {
80 int id = iter->second; 80 int id = iter->second;
81 guid_to_id_map_.erase(iter); 81 guid_to_id_map_.erase(iter);
82 id_to_guid_map_.erase(id); 82 id_to_guid_map_.erase(id);
83 } 83 }
84 } 84 }
85 85
86 } // namespace extensions 86 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/usb/usb_event_router.cc ('k') | extensions/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698