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

Unified Diff: chrome/browser/file_path_watcher/file_path_watcher.h

Issue 6697020: Fixed shutdown concurrency issues in FilePathWatcher. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/file_path_watcher/file_path_watcher.h
diff --git a/chrome/browser/file_path_watcher/file_path_watcher.h b/chrome/browser/file_path_watcher/file_path_watcher.h
index 530962e3e8ee6da239d8a8d3e762b833b4f1f731..c6e89b6a81609134f22fb6f3250499fc92aa9fa3 100644
--- a/chrome/browser/file_path_watcher/file_path_watcher.h
+++ b/chrome/browser/file_path_watcher/file_path_watcher.h
@@ -11,7 +11,6 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/ref_counted.h"
-#include "content/browser/browser_thread.h"
// This class lets you register interest in changes on a FilePath.
// The delegate will get called whenever the file or directory referenced by the
@@ -40,9 +39,7 @@ class FilePathWatcher {
bool Watch(const FilePath& path, Delegate* delegate) WARN_UNUSED_RESULT;
// Used internally to encapsulate different members on different platforms.
- class PlatformDelegate
- : public base::RefCountedThreadSafe<PlatformDelegate,
- BrowserThread::DeleteOnFileThread> {
+ class PlatformDelegate: public base::RefCountedThreadSafe<PlatformDelegate> {
public:
// Start watching for the given |path| and notify |delegate| about changes.
virtual bool Watch(const FilePath& path, Delegate* delegate)
@@ -53,8 +50,7 @@ class FilePathWatcher {
virtual void Cancel() {}
protected:
- friend struct BrowserThread::DeleteOnThread<BrowserThread::FILE>;
- friend class DeleteTask<PlatformDelegate>;
+ friend struct base::RefCountedThreadSafe<PlatformDelegate>;
virtual ~PlatformDelegate() {}
};

Powered by Google App Engine
This is Rietveld 408576698