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

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

Issue 18854021: Making the extension permissions dialog scrollable, when needed (adding expandable sections for thi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more param reductions Created 7 years, 5 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) 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 if (vendor) { 43 if (vendor) {
44 const char* product = 44 const char* product =
45 device::UsbIds::GetProductName(i->vendor_id(), i->product_id()); 45 device::UsbIds::GetProductName(i->vendor_id(), i->product_id());
46 if (product) { 46 if (product) {
47 result.push_back(PermissionMessage( 47 result.push_back(PermissionMessage(
48 PermissionMessage::kUsbDevice, 48 PermissionMessage::kUsbDevice,
49 l10n_util::GetStringFUTF16( 49 l10n_util::GetStringFUTF16(
50 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE, 50 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE,
51 ASCIIToUTF16(product), 51 ASCIIToUTF16(product),
52 ASCIIToUTF16(vendor)))); 52 ASCIIToUTF16(vendor)),
53 string16()));
53 } else { 54 } else {
54 result.push_back(PermissionMessage( 55 result.push_back(PermissionMessage(
55 PermissionMessage::kUsbDevice, 56 PermissionMessage::kUsbDevice,
56 l10n_util::GetStringFUTF16( 57 l10n_util::GetStringFUTF16(
57 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_PRODUCT, 58 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_PRODUCT,
58 ASCIIToUTF16(vendor)))); 59 ASCIIToUTF16(vendor)),
60 string16()));
59 } 61 }
60 } else { 62 } else {
61 result.push_back(PermissionMessage( 63 result.push_back(PermissionMessage(
62 PermissionMessage::kUsbDevice, 64 PermissionMessage::kUsbDevice,
63 l10n_util::GetStringUTF16( 65 l10n_util::GetStringUTF16(
64 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_VENDOR))); 66 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_VENDOR),
67 string16()));
65 } 68 }
66 } 69 }
67 #else 70 #else
68 NOTREACHED(); 71 NOTREACHED();
69 #endif // defined(ENABLE_EXTENSIONS) 72 #endif // defined(ENABLE_EXTENSIONS)
70 73
71 return result; 74 return result;
72 } 75 }
73 76
74 } // namespace extensions 77 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698