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

Side by Side Diff: chrome/common/extensions/permissions/usb_device_permission.cc

Issue 16231013: device: Restructure the layout of gyp files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: doh forgot to rename the principal - the target Created 7 years, 6 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/tools/build/repack_locales.py » ('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 (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 "chrome/common/extensions/permissions/usb_device_permission.h" 5 #include "chrome/common/extensions/permissions/usb_device_permission.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 UsbDevicePermission::~UsbDevicePermission() { 29 UsbDevicePermission::~UsbDevicePermission() {
30 } 30 }
31 31
32 PermissionMessages UsbDevicePermission::GetMessages() const { 32 PermissionMessages UsbDevicePermission::GetMessages() const {
33 DCHECK(HasMessages()); 33 DCHECK(HasMessages());
34 PermissionMessages result; 34 PermissionMessages result;
35 35
36 #if defined(ENABLE_EXTENSIONS) 36 #if defined(ENABLE_EXTENSIONS)
37 // device.gyp:device_usb is not available when extensions are disabled. 37 // //device/usb/usb.gyp:device_usb is not available when extensions are
38 // disabled.
38 for (std::set<UsbDevicePermissionData>::const_iterator i = 39 for (std::set<UsbDevicePermissionData>::const_iterator i =
39 data_set_.begin(); i != data_set_.end(); ++i) { 40 data_set_.begin(); i != data_set_.end(); ++i) {
40 const char* vendor = device::UsbIds::GetVendorName(i->vendor_id()); 41 const char* vendor = device::UsbIds::GetVendorName(i->vendor_id());
41 42
42 if (vendor) { 43 if (vendor) {
43 const char* product = 44 const char* product =
44 device::UsbIds::GetProductName(i->vendor_id(), i->product_id()); 45 device::UsbIds::GetProductName(i->vendor_id(), i->product_id());
45 if (product) { 46 if (product) {
46 result.push_back(PermissionMessage( 47 result.push_back(PermissionMessage(
47 PermissionMessage::kUsbDevice, 48 PermissionMessage::kUsbDevice,
(...skipping 16 matching lines...) Expand all
64 } 65 }
65 } 66 }
66 #else 67 #else
67 NOTREACHED(); 68 NOTREACHED();
68 #endif // defined(ENABLE_EXTENSIONS) 69 #endif // defined(ENABLE_EXTENSIONS)
69 70
70 return result; 71 return result;
71 } 72 }
72 73
73 } // namespace extensions 74 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/tools/build/repack_locales.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698