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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h" 5 #include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h"
6 6
7 #include "content/public/browser/browser_thread.h"
8
9 using content::BrowserThread;
10
7 namespace chromeos { 11 namespace chromeos {
8 12
9 MTPWatcherManager::MTPWatcherManager( 13 MTPWatcherManager::MTPWatcherManager(
10 DeviceMediaAsyncFileUtil* device_media_async_file_util) 14 DeviceMediaAsyncFileUtil* device_media_async_file_util)
11 : device_media_async_file_util_(device_media_async_file_util) { 15 : device_media_async_file_util_(device_media_async_file_util) {
12 DCHECK(device_media_async_file_util != NULL); 16 DCHECK(device_media_async_file_util != NULL);
13 } 17 }
14 18
15 MTPWatcherManager::~MTPWatcherManager() { 19 MTPWatcherManager::~MTPWatcherManager() {
16 } 20 }
17 21
18 void MTPWatcherManager::AddWatcher( 22 void MTPWatcherManager::AddWatcher(
19 const storage::FileSystemURL& url, 23 const storage::FileSystemURL& url,
20 bool recursive, 24 bool recursive,
21 const StatusCallback& callback, 25 const StatusCallback& callback,
22 const NotificationCallback& notification_callback) { 26 const NotificationCallback& notification_callback) {
27 DCHECK_CURRENTLY_ON(BrowserThread::IO);
23 device_media_async_file_util_->AddWatcher(url, recursive, callback, 28 device_media_async_file_util_->AddWatcher(url, recursive, callback,
24 notification_callback); 29 notification_callback);
25 } 30 }
26 31
27 void MTPWatcherManager::RemoveWatcher(const storage::FileSystemURL& url, 32 void MTPWatcherManager::RemoveWatcher(const storage::FileSystemURL& url,
28 bool recursive, 33 bool recursive,
29 const StatusCallback& callback) { 34 const StatusCallback& callback) {
35 DCHECK_CURRENTLY_ON(BrowserThread::IO);
30 device_media_async_file_util_->RemoveWatcher(url, recursive, callback); 36 device_media_async_file_util_->RemoveWatcher(url, recursive, callback);
31 } 37 }
32 38
33 } // namespace chromeos 39 } // namespace chromeos
OLDNEW
« 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