Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Side by Side Diff: base/files/file_path_watcher_linux.cc

Issue 2438913003: Require FilePathWatcher destructor to be called in sequence with Watch(). (Closed)
Patch Set: CR thestig #36 (fix comment) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/files/file_path_watcher.cc ('k') | base/files/file_path_watcher_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/files/file_path_watcher.cc ('k') | base/files/file_path_watcher_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698