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

Unified Diff: device/serial/serial_device_enumerator_mac.cc

Issue 2607063002: Remove mojo::Array. (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: device/serial/serial_device_enumerator_mac.cc
diff --git a/device/serial/serial_device_enumerator_mac.cc b/device/serial/serial_device_enumerator_mac.cc
index 954f575172de7070dd8f51bf6f247c36ec7614c9..954ab7daf36daae3a58904ca0401f7d02df99b6a 100644
--- a/device/serial/serial_device_enumerator_mac.cc
+++ b/device/serial/serial_device_enumerator_mac.cc
@@ -101,8 +101,8 @@ int Clamp(int value, int min, int max) {
// Returns an array of devices as retrieved through the new method of
// enumerating serial devices (IOKit). This new method gives more information
// about the devices than the old method.
-mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
- mojo::Array<serial::DeviceInfoPtr> devices;
+std::vector<serial::DeviceInfoPtr> GetDevicesNew() {
+ std::vector<serial::DeviceInfoPtr> devices;
// Make a service query to find all serial devices.
CFMutableDictionaryRef matchingDict =
@@ -167,7 +167,7 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
// Returns an array of devices as retrieved through the old method of
// enumerating serial devices (pattern matching in /dev/). This old method gives
// less information about the devices than the new method.
-mojo::Array<serial::DeviceInfoPtr> GetDevicesOld() {
+std::vector<serial::DeviceInfoPtr> GetDevicesOld() {
const base::FilePath kDevRoot("/dev");
const int kFilesAndSymLinks =
base::FileEnumerator::FILES | base::FileEnumerator::SHOW_SYM_LINKS;
@@ -181,7 +181,7 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesOld() {
valid_patterns.insert("/dev/tty.*");
valid_patterns.insert("/dev/cu.*");
- mojo::Array<serial::DeviceInfoPtr> devices;
+ std::vector<serial::DeviceInfoPtr> devices;
base::FileEnumerator enumerator(kDevRoot, false, kFilesAndSymLinks);
do {
const base::FilePath next_device_path(enumerator.Next());
@@ -214,9 +214,9 @@ SerialDeviceEnumeratorMac::SerialDeviceEnumeratorMac() {}
SerialDeviceEnumeratorMac::~SerialDeviceEnumeratorMac() {}
-mojo::Array<serial::DeviceInfoPtr> SerialDeviceEnumeratorMac::GetDevices() {
- mojo::Array<serial::DeviceInfoPtr> devices = GetDevicesNew();
- mojo::Array<serial::DeviceInfoPtr> old_devices = GetDevicesOld();
+std::vector<serial::DeviceInfoPtr> SerialDeviceEnumeratorMac::GetDevices() {
+ std::vector<serial::DeviceInfoPtr> devices = GetDevicesNew();
+ std::vector<serial::DeviceInfoPtr> old_devices = GetDevicesOld();
UMA_HISTOGRAM_SPARSE_SLOWLY(
"Hardware.Serial.NewMinusOldDeviceListSize",

Powered by Google App Engine
This is Rietveld 408576698