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

Unified Diff: chrome/browser/chromeos/fileapi/mtp_watcher_manager.cc

Issue 2712613002: Call WatcherManager functions on the IO thread. (Closed)
Patch Set: Addressed hidehiko's comments. Created 3 years, 10 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/chromeos/fileapi/mtp_watcher_manager.cc
diff --git a/chrome/browser/chromeos/fileapi/mtp_watcher_manager.cc b/chrome/browser/chromeos/fileapi/mtp_watcher_manager.cc
index 58439f8e1398013d68fcef49b24c13e38072737d..5eb3f5b1285471bc761a070577272388ca1ddfa8 100644
--- a/chrome/browser/chromeos/fileapi/mtp_watcher_manager.cc
+++ b/chrome/browser/chromeos/fileapi/mtp_watcher_manager.cc
@@ -4,6 +4,10 @@
#include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h"
+#include "content/public/browser/browser_thread.h"
+
+using content::BrowserThread;
+
namespace chromeos {
MTPWatcherManager::MTPWatcherManager(
@@ -20,6 +24,7 @@ void MTPWatcherManager::AddWatcher(
bool recursive,
const StatusCallback& callback,
const NotificationCallback& notification_callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
device_media_async_file_util_->AddWatcher(url, recursive, callback,
notification_callback);
}
@@ -27,6 +32,7 @@ void MTPWatcherManager::AddWatcher(
void MTPWatcherManager::RemoveWatcher(const storage::FileSystemURL& url,
bool recursive,
const StatusCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
device_media_async_file_util_->RemoveWatcher(url, recursive, callback);
}
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/fileapi/watcher_manager.cc ('k') | storage/browser/fileapi/watcher_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698