| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/files/file_path_watcher.h" | 5 #include "base/files/file_path_watcher.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/inotify.h> | 10 #include <sys/inotify.h> |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 for (size_t i = 0; i < watches_.size() - 1; ++i) { | 650 for (size_t i = 0; i < watches_.size() - 1; ++i) { |
| 651 if (watches_[i].subdir.empty()) | 651 if (watches_[i].subdir.empty()) |
| 652 return false; | 652 return false; |
| 653 } | 653 } |
| 654 return watches_.back().subdir.empty(); | 654 return watches_.back().subdir.empty(); |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace | 657 } // namespace |
| 658 | 658 |
| 659 FilePathWatcher::FilePathWatcher() { | 659 FilePathWatcher::FilePathWatcher() { |
| 660 sequence_checker_.DetachFromSequence(); |
| 660 impl_ = new FilePathWatcherImpl(); | 661 impl_ = new FilePathWatcherImpl(); |
| 661 } | 662 } |
| 662 | 663 |
| 663 } // namespace base | 664 } // namespace base |
| OLD | NEW |