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

Unified Diff: chrome/browser/chromeos/camera_detector.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/camera_detector.cc
diff --git a/chrome/browser/chromeos/camera_detector.cc b/chrome/browser/chromeos/camera_detector.cc
index 8c5deff523ffc56495834d6fc9edd725b92ba7c6..918a8693712f3929a5e2d0840821490b31c5e37e 100644
--- a/chrome/browser/chromeos/camera_detector.cc
+++ b/chrome/browser/chromeos/camera_detector.cc
@@ -75,8 +75,9 @@ bool CameraDetector::CheckPresence() {
std::string v4l_capabilities;
if (storage_monitor::GetUdevDevicePropertyValueByPath(
path, kV4LCapabilities, &v4l_capabilities)) {
- std::vector<std::string> caps;
- base::SplitString(v4l_capabilities, kV4LCapabilitiesDelim, &caps);
+ std::vector<std::string> caps = base::SplitString(
+ v4l_capabilities, std::string(1, kV4LCapabilitiesDelim),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (find(caps.begin(), caps.end(), kV4LCaptureCapability) != caps.end()) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698