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

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

Issue 19224003: Use a direct include of the message_loop header in base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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.h" 11 #include "base/message_loop/message_loop.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 FilePathWatcher::~FilePathWatcher() { 15 FilePathWatcher::~FilePathWatcher() {
16 impl_->Cancel(); 16 impl_->Cancel();
17 } 17 }
18 18
19 // static 19 // static
20 void FilePathWatcher::CancelWatch( 20 void FilePathWatcher::CancelWatch(
21 const scoped_refptr<PlatformDelegate>& delegate) { 21 const scoped_refptr<PlatformDelegate>& delegate) {
22 delegate->CancelOnMessageLoopThread(); 22 delegate->CancelOnMessageLoopThread();
23 } 23 }
24 24
25 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { 25 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
26 } 26 }
27 27
28 FilePathWatcher::PlatformDelegate::~PlatformDelegate() { 28 FilePathWatcher::PlatformDelegate::~PlatformDelegate() {
29 DCHECK(is_cancelled()); 29 DCHECK(is_cancelled());
30 } 30 }
31 31
32 bool FilePathWatcher::Watch(const FilePath& path, 32 bool FilePathWatcher::Watch(const FilePath& path,
33 bool recursive, 33 bool recursive,
34 const Callback& callback) { 34 const Callback& callback) {
35 DCHECK(path.IsAbsolute()); 35 DCHECK(path.IsAbsolute());
36 return impl_->Watch(path, recursive, callback); 36 return impl_->Watch(path, recursive, callback);
37 } 37 }
38 38
39 } // namespace base 39 } // namespace base
OLDNEW
« no previous file with comments | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/files/file_path_watcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698