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

Unified Diff: base/files/file_path_watcher_linux.cc

Issue 10874083: Enable file path watcher for Android (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: changes according to the comments Created 8 years, 4 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
« no previous file with comments | « base/base.gypi ('k') | build/android/gtest_filter/unit_tests_disabled » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path_watcher_linux.cc
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index 205a3eb779fbff1127a5c71657d86fa05130447a..d77b0392fc5c7999b9c6f94c22824a2834447859 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -373,10 +373,10 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
std::vector<FilePath::StringType> comps;
target_.GetComponents(&comps);
DCHECK(!comps.empty());
- for (std::vector<FilePath::StringType>::const_iterator comp(++comps.begin());
jar (doing other things) 2012/08/30 02:47:25 I didn't especially like this pre-increment on the
yongsheng 2012/08/30 04:50:17 yes, see the compiler error on Android.
- comp != comps.end(); ++comp) {
+ std::vector<FilePath::StringType>::const_iterator comp = comps.begin();
Mark Mentovai 2012/08/30 02:50:42 Why are you changing this?
yongsheng 2012/08/30 03:06:30 The fix for file_path_watcher_linux.cc is because
+ for (++comp; comp != comps.end(); ++comp)
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, *comp));
- }
+
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch,
FilePath::StringType()));
return UpdateWatches();
« no previous file with comments | « base/base.gypi ('k') | build/android/gtest_filter/unit_tests_disabled » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698