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

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

Issue 2372513005: Remove FilePathWatcher::PlatformDelegate::CancelOnMessageLoopThread(). (Closed)
Patch Set: self-review Created 4 years, 2 months 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_linux.cc ('k') | base/files/file_path_watcher_stub.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/files/file_path_watcher_kqueue.h" 6 #include "base/files/file_path_watcher_kqueue.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if !defined(OS_IOS) 9 #if !defined(OS_IOS)
10 #include "base/files/file_path_watcher_fsevents.h" 10 #include "base/files/file_path_watcher_fsevents.h"
(...skipping 22 matching lines...) Expand all
33 DCHECK(impl_.get()); 33 DCHECK(impl_.get());
34 return impl_->Watch(path, recursive, callback); 34 return impl_->Watch(path, recursive, callback);
35 } 35 }
36 36
37 void Cancel() override { 37 void Cancel() override {
38 if (impl_.get()) 38 if (impl_.get())
39 impl_->Cancel(); 39 impl_->Cancel();
40 set_cancelled(); 40 set_cancelled();
41 } 41 }
42 42
43 void CancelOnMessageLoopThread() override {
44 if (impl_.get())
45 impl_->Cancel();
46 set_cancelled();
47 }
48
49 protected: 43 protected:
50 ~FilePathWatcherImpl() override {} 44 ~FilePathWatcherImpl() override {}
51 45
52 scoped_refptr<PlatformDelegate> impl_; 46 scoped_refptr<PlatformDelegate> impl_;
53 }; 47 };
54 48
55 } // namespace 49 } // namespace
56 50
57 FilePathWatcher::FilePathWatcher() { 51 FilePathWatcher::FilePathWatcher() {
58 impl_ = new FilePathWatcherImpl(); 52 impl_ = new FilePathWatcherImpl();
59 } 53 }
60 54
61 } // namespace base 55 } // namespace base
OLDNEW
« no previous file with comments | « base/files/file_path_watcher_linux.cc ('k') | base/files/file_path_watcher_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698