OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Cross platform methods for FilePathWatcher. See the various platform | 5 // Cross platform methods for FilePathWatcher. See the various platform |
6 // specific implementation files, too. | 6 // specific implementation files, too. |
7 | 7 |
8 #include "content/common/file_path_watcher/file_path_watcher.h" | 8 #include "base/files/file_path_watcher.h" |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 | 12 |
| 13 namespace base { |
| 14 namespace files { |
| 15 |
13 FilePathWatcher::~FilePathWatcher() { | 16 FilePathWatcher::~FilePathWatcher() { |
14 impl_->Cancel(); | 17 impl_->Cancel(); |
15 } | 18 } |
16 | 19 |
17 bool FilePathWatcher::Watch(const FilePath& path, Delegate* delegate) { | 20 bool FilePathWatcher::Watch(const FilePath& path, Delegate* delegate) { |
18 DCHECK(path.IsAbsolute()); | 21 DCHECK(path.IsAbsolute()); |
19 return impl_->Watch(path, delegate); | 22 return impl_->Watch(path, delegate); |
20 } | 23 } |
21 | 24 |
22 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { | 25 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { |
23 } | 26 } |
24 | 27 |
25 FilePathWatcher::PlatformDelegate::~PlatformDelegate() { | 28 FilePathWatcher::PlatformDelegate::~PlatformDelegate() { |
26 DCHECK(is_cancelled()); | 29 DCHECK(is_cancelled()); |
27 } | 30 } |
28 | 31 |
| 32 } // namespace files |
| 33 } // namespace base |
OLD | NEW |