Index: content/common/file_path_watcher/file_path_watcher.cc |
diff --git a/content/common/file_path_watcher/file_path_watcher.cc b/content/common/file_path_watcher/file_path_watcher.cc |
index 19cee5fdea6995a65983945e6bdfbf3c85ca96d3..f40c8c85d4e6593ba1652d8d83d1f0e465ac919f 100644 |
--- a/content/common/file_path_watcher/file_path_watcher.cc |
+++ b/content/common/file_path_watcher/file_path_watcher.cc |
@@ -21,19 +21,10 @@ bool FilePathWatcher::Watch(const FilePath& path, |
return impl_->Watch(path, delegate, loop); |
} |
-FilePathWatcher::PlatformDelegate::PlatformDelegate() { |
+FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { |
} |
FilePathWatcher::PlatformDelegate::~PlatformDelegate() { |
+ DCHECK(is_cancelled()); |
} |
-void FilePathWatcher::DeletePlatformDelegate::Destruct( |
- const PlatformDelegate* delegate) { |
- scoped_refptr<base::MessageLoopProxy> loop = delegate->message_loop(); |
- if (loop.get() == NULL || loop->BelongsToCurrentThread()) { |
- delete delegate; |
- } else { |
- loop->PostNonNestableTask(FROM_HERE, |
- new DeleteTask<PlatformDelegate>(delegate)); |
- } |
-} |