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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..83507325bad1a21ae614df94bd42cf9e303945d1 |
--- /dev/null |
+++ b/content/common/file_path_watcher/file_path_watcher.cc |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Cross platform methods for FilePathWatcher. See the various platform |
+// specific implementation files, too. |
+ |
+#include "content/common/file_path_watcher/file_path_watcher.h" |
+ |
+#include "base/logging.h" |
+#include "base/message_loop.h" |
+ |
+FilePathWatcher::~FilePathWatcher() { |
+ impl_->Cancel(); |
+} |
+ |
+bool FilePathWatcher::Watch(const FilePath& path, Delegate* delegate) { |
+ DCHECK(path.IsAbsolute()); |
+ return impl_->Watch(path, delegate); |
+} |
+ |
+FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { |
+} |
+ |
+FilePathWatcher::PlatformDelegate::~PlatformDelegate() { |
+ DCHECK(is_cancelled()); |
+} |