summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/camera_detector.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 22:51:31 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 22:51:31 +0000
commitfcb524ead399b591b4e6587c2fbe712e45126320 (patch)
tree77da32bc4e3ab916de166e0f9e52e0ad61629efa /chrome/browser/chromeos/camera_detector.cc
parent3afef01773fcfe63523ebede8ad5a4dfed10088b (diff)
downloadchromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.zip
chromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.tar.gz
chromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.tar.bz2
Move FileEnumerator to its own file, do some refactoring.
It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked. BUG=175002 R=rvargas@chromium.org Review URL: https://codereview.chromium.org/13165005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/camera_detector.cc')
-rw-r--r--chrome/browser/chromeos/camera_detector.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/camera_detector.cc b/chrome/browser/chromeos/camera_detector.cc
index e7fddb9..3d5d039 100644
--- a/chrome/browser/chromeos/camera_detector.cc
+++ b/chrome/browser/chromeos/camera_detector.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/location.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
@@ -66,10 +67,9 @@ void CameraDetector::OnPresenceCheckDone(const base::Closure& callback,
bool CameraDetector::CheckPresence() {
// We do a quick check using udev database because opening each /dev/videoX
// device may trigger costly device initialization.
- using file_util::FileEnumerator;
- FileEnumerator file_enum(
+ base::FileEnumerator file_enum(
base::FilePath(kV4LSubsystemDir), false /* not recursive */,
- FileEnumerator::FILES | FileEnumerator::SHOW_SYM_LINKS);
+ base::FileEnumerator::FILES | base::FileEnumerator::SHOW_SYM_LINKS);
for (base::FilePath path = file_enum.Next(); !path.empty();
path = file_enum.Next()) {
std::string v4l_capabilities;