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

Unified Diff: base/files/file_path_watcher_linux.cc

Issue 9553007: Remove a unused parameter in the Linux FilePathWatcher implementation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path_watcher_linux.cc
===================================================================
--- base/files/file_path_watcher_linux.cc (revision 126194)
+++ base/files/file_path_watcher_linux.cc (working copy)
@@ -92,12 +92,10 @@
// Called for each event coming from the watch. |fired_watch| identifies the
// watch that fired, |child| indicates what has changed, and is relative to
// the currently watched path for |fired_watch|. The flag |created| is true if
- // the object appears, and |is_directory| is set when the event refers to a
- // directory.
+ // the object appears.
void OnFilePathChanged(InotifyReader::Watch fired_watch,
const FilePath::StringType& child,
- bool created,
- bool is_directory);
+ bool created);
// Start watching |path| for changes and notify |delegate| on each change.
// Returns true if watch for |path| has been added successfully.
@@ -291,8 +289,7 @@
++watcher) {
(*watcher)->OnFilePathChanged(event->wd,
child,
- event->mask & (IN_CREATE | IN_MOVED_TO),
- event->mask & IN_ISDIR);
+ event->mask & (IN_CREATE | IN_MOVED_TO));
}
}
@@ -300,12 +297,9 @@
: delegate_(NULL) {
}
-void FilePathWatcherImpl::OnFilePathChanged(
- InotifyReader::Watch fired_watch,
- const FilePath::StringType& child,
- bool created,
- bool is_directory) {
-
+void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
+ const FilePath::StringType& child,
+ bool created) {
if (!message_loop()->BelongsToCurrentThread()) {
// Switch to message_loop_ to access watches_ safely.
message_loop()->PostTask(FROM_HERE,
@@ -313,8 +307,7 @@
this,
fired_watch,
child,
- created,
- is_directory));
+ created));
return;
}
@@ -339,9 +332,10 @@
// Update watches if a directory component of the |target_| path
// (dis)appears. Note that we don't add the additional restriction
- // of checking is_directory here as changes to symlinks on the
- // target path will not have is_directory set but as a result we
- // may sometimes call UpdateWatches unnecessarily.
+ // of checking the event mask to see if it is for a directory here
+ // as changes to symlinks on the target path will not have
+ // IN_ISDIR set in the event masks. As a result we may sometimes
+ // call UpdateWatches() unnecessarily.
if (change_on_target_path && !UpdateWatches()) {
delegate_->OnFilePathError(target_);
return;
@@ -363,7 +357,6 @@
}
}
}
-
}
bool FilePathWatcherImpl::Watch(const FilePath& path,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698