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

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

Issue 93793010: Update uses of UTF conversions in chrome/common to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 30 matching lines...) Expand all
41 const char* vendor = device::UsbIds::GetVendorName(i->vendor_id()); 41 const char* vendor = device::UsbIds::GetVendorName(i->vendor_id());
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 base::ASCIIToUTF16(product),
52 ASCIIToUTF16(vendor)))); 52 base::ASCIIToUTF16(vendor))));
53 } else { 53 } else {
54 result.push_back(PermissionMessage( 54 result.push_back(PermissionMessage(
55 PermissionMessage::kUsbDevice, 55 PermissionMessage::kUsbDevice,
56 l10n_util::GetStringFUTF16( 56 l10n_util::GetStringFUTF16(
57 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_PRODUCT, 57 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_PRODUCT,
58 ASCIIToUTF16(vendor)))); 58 base::ASCIIToUTF16(vendor))));
59 } 59 }
60 } else { 60 } else {
61 result.push_back(PermissionMessage( 61 result.push_back(PermissionMessage(
62 PermissionMessage::kUsbDevice, 62 PermissionMessage::kUsbDevice,
63 l10n_util::GetStringUTF16( 63 l10n_util::GetStringUTF16(
64 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_VENDOR))); 64 IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_MISSING_VENDOR)));
65 } 65 }
66 } 66 }
67 #else 67 #else
68 NOTREACHED(); 68 NOTREACHED();
69 #endif // defined(ENABLE_EXTENSIONS) 69 #endif // defined(ENABLE_EXTENSIONS)
70 70
71 return result; 71 return result;
72 } 72 }
73 73
74 } // namespace extensions 74 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698