This source file includes following definitions.
- CancelWatch
#include "base/files/file_path_watcher.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
namespace base {
FilePathWatcher::~FilePathWatcher() {
impl_->Cancel();
}
void FilePathWatcher::CancelWatch(
const scoped_refptr<PlatformDelegate>& delegate) {
delegate->CancelOnMessageLoopThread();
}
FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
}
FilePathWatcher::PlatformDelegate::~PlatformDelegate() {
DCHECK(is_cancelled());
}
bool FilePathWatcher::Watch(const FilePath& path,
bool recursive,
const Callback& callback) {
DCHECK(path.IsAbsolute());
return impl_->Watch(path, recursive, callback);
}
}