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

Unified Diff: components/storage_monitor/portable_device_watcher_win.cc

Issue 1220653002: Fix some case-insensitive cases for StartsWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/storage_monitor/portable_device_watcher_win.cc
diff --git a/components/storage_monitor/portable_device_watcher_win.cc b/components/storage_monitor/portable_device_watcher_win.cc
index ed850738e9fe438275eeae332c05e4e8fcda8ba4..29b77ffb69feaa48ef4bebef6c1bc29e2271d240 100644
--- a/components/storage_monitor/portable_device_watcher_win.cc
+++ b/components/storage_monitor/portable_device_watcher_win.cc
@@ -301,7 +301,8 @@ bool IsMassStoragePortableDevice(const base::string16& pnp_device_id,
const base::string16& device_name) {
// Based on testing, if the pnp device id starts with "\\?\wpdbusenumroot#",
// then the attached device belongs to a mass storage class.
- if (base::StartsWith(pnp_device_id, L"\\\\?\\wpdbusenumroot#", false))
+ if (base::StartsWith(pnp_device_id, L"\\\\?\\wpdbusenumroot#",
+ base::CompareCase::INSENSITIVE_ASCII))
return true;
// If the device is a volume mounted device, |device_name| will be

Powered by Google App Engine
This is Rietveld 408576698