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

Unified Diff: chrome/browser/media_galleries/fileapi/file_path_watcher_util.h

Issue 2518053002: Always delete media galleries FilePathWatchers on the FILE thread. (Closed)
Patch Set: fix build error 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/file_path_watcher_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/fileapi/file_path_watcher_util.h
diff --git a/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h b/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h
index cd3443dd1dd4969f75e385e8ed229a95417185c3..2fe080ee372801fca2b4f76266ddaf2d23755418 100644
--- a/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h
+++ b/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h
@@ -10,9 +10,13 @@
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/files/file_path_watcher.h"
+#include "content/public/browser/browser_thread.h"
-typedef base::Callback<void(std::unique_ptr<base::FilePathWatcher> watcher)>
- FileWatchStartedCallback;
+using MediaFilePathWatcherUniquePtr =
+ std::unique_ptr<base::FilePathWatcher,
+ content::BrowserThread::DeleteOnFileThread>;
+using FileWatchStartedCallback =
+ base::Callback<void(MediaFilePathWatcherUniquePtr watcher)>;
// Called on the MediaTaskRunner to begin a file watch.
// |watch_started_callback| is responsible for taking ownership of the
@@ -22,9 +26,4 @@ void StartFilePathWatchOnMediaTaskRunner(
const FileWatchStartedCallback& watch_started_callback,
const base::FilePathWatcher::Callback& path_changed_callback);
-// Stops a file path watch started by StartFilePathWatchOnMediaTaskRunner().
-// Must be called from the MediaTaskRunner.
-void StopFilePathWatchOnMediaTaskRunner(
- std::unique_ptr<base::FilePathWatcher> watcher);
-
#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_FILE_PATH_WATCHER_UTIL_H_
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/file_path_watcher_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698