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

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

Issue 10500012: Removed file_path_watcher_mac.cc, which isn't used anymore. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 6 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
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 // This module provides a way to monitor a file or directory for changes. 5 // This module provides a way to monitor a file or directory for changes.
6 6
7 #ifndef BASE_FILES_FILE_PATH_WATCHER_H_ 7 #ifndef BASE_FILES_FILE_PATH_WATCHER_H_
8 #define BASE_FILES_FILE_PATH_WATCHER_H_ 8 #define BASE_FILES_FILE_PATH_WATCHER_H_
9 #pragma once 9 #pragma once
10 10
11 #include "base/base_export.h" 11 #include "base/base_export.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/message_loop_proxy.h" 15 #include "base/message_loop_proxy.h"
16 16
17 namespace base { 17 namespace base {
18 namespace files { 18 namespace files {
19 19
20 // This class lets you register interest in changes on a FilePath. 20 // This class lets you register interest in changes on a FilePath.
21 // The delegate will get called whenever the file or directory referenced by the 21 // The delegate will get called whenever the file or directory referenced by the
22 // FilePath is changed, including created or deleted. Due to limitations in the 22 // FilePath is changed, including created or deleted. Due to limitations in the
23 // underlying OS APIs, FilePathWatcher has slightly different semantics on OS X 23 // underlying OS APIs, FilePathWatcher has slightly different semantics on OS X
24 // than on Windows or Linux. FilePathWatcher on Linux and Windows will detect 24 // than on Windows or Linux. FilePathWatcher on Linux and Windows will detect
25 // modifications to files in a watched directory. FilePathWatcher on Mac will 25 // modifications to files in a watched directory. FilePathWatcher on Mac will
26 // detect the creation and deletion of files in a watched directory, but will 26 // detect the creation and deletion of files in a watched directory, but will
27 // not detect modifications to those files. See file_path_watcher_mac.cc for 27 // not detect modifications to those files. See file_path_watcher_kqueue.cc for
28 // details. 28 // details.
29 class BASE_EXPORT FilePathWatcher { 29 class BASE_EXPORT FilePathWatcher {
30 public: 30 public:
31 // Declares the callback client code implements to receive notifications. Note 31 // Declares the callback client code implements to receive notifications. Note
32 // that implementations of this interface should not keep a reference to the 32 // that implementations of this interface should not keep a reference to the
33 // corresponding FileWatcher object to prevent a reference cycle. 33 // corresponding FileWatcher object to prevent a reference cycle.
34 class Delegate : public base::RefCountedThreadSafe<Delegate> { 34 class Delegate : public base::RefCountedThreadSafe<Delegate> {
35 public: 35 public:
36 virtual void OnFilePathChanged(const FilePath& path) = 0; 36 virtual void OnFilePathChanged(const FilePath& path) = 0;
37 // Called when platform specific code detected an error. The watcher will 37 // Called when platform specific code detected an error. The watcher will
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 private: 110 private:
111 scoped_refptr<PlatformDelegate> impl_; 111 scoped_refptr<PlatformDelegate> impl_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(FilePathWatcher); 113 DISALLOW_COPY_AND_ASSIGN(FilePathWatcher);
114 }; 114 };
115 115
116 } // namespace files 116 } // namespace files
117 } // namespace base 117 } // namespace base
118 118
119 #endif // BASE_FILES_FILE_PATH_WATCHER_H_ 119 #endif // BASE_FILES_FILE_PATH_WATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | base/files/file_path_watcher_kqueue.cc » ('j') | base/files/file_path_watcher_kqueue.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698