| 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 "base/files/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/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "build/build_config.h" |
| 12 | 13 |
| 13 #if defined(OS_MACOSX) && !defined(OS_IOS) | 14 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 14 #include "base/mac/mac_util.h" | 15 #include "base/mac/mac_util.h" |
| 15 #endif | 16 #endif |
| 16 | 17 |
| 17 namespace base { | 18 namespace base { |
| 18 | 19 |
| 19 FilePathWatcher::~FilePathWatcher() { | 20 FilePathWatcher::~FilePathWatcher() { |
| 20 impl_->Cancel(); | 21 impl_->Cancel(); |
| 21 } | 22 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 } | 48 } |
| 48 | 49 |
| 49 bool FilePathWatcher::Watch(const FilePath& path, | 50 bool FilePathWatcher::Watch(const FilePath& path, |
| 50 bool recursive, | 51 bool recursive, |
| 51 const Callback& callback) { | 52 const Callback& callback) { |
| 52 DCHECK(path.IsAbsolute()); | 53 DCHECK(path.IsAbsolute()); |
| 53 return impl_->Watch(path, recursive, callback); | 54 return impl_->Watch(path, recursive, callback); |
| 54 } | 55 } |
| 55 | 56 |
| 56 } // namespace base | 57 } // namespace base |
| OLD | NEW |