summaryrefslogtreecommitdiffstats
path: root/chrome/browser/file_path_watcher_mac.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 02:45:52 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 02:45:52 +0000
commitf8b3ef8aab85985cb74d748112a1a3ec8e2b7ed8 (patch)
tree3bca9c7a2c36af1c29ae37e0668be3ee1849356a /chrome/browser/file_path_watcher_mac.cc
parentad27b85ef15c7446744911b776a733842f8e9206 (diff)
downloadchromium_src-f8b3ef8aab85985cb74d748112a1a3ec8e2b7ed8.zip
chromium_src-f8b3ef8aab85985cb74d748112a1a3ec8e2b7ed8.tar.gz
chromium_src-f8b3ef8aab85985cb74d748112a1a3ec8e2b7ed8.tar.bz2
Rename ChromeThread to BrowserThread Part15:
- Rename entries in more 40 files under chrome/browser. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3704001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/file_path_watcher_mac.cc')
-rw-r--r--chrome/browser/file_path_watcher_mac.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/file_path_watcher_mac.cc b/chrome/browser/file_path_watcher_mac.cc
index b95992c..ddcfd41 100644
--- a/chrome/browser/file_path_watcher_mac.cc
+++ b/chrome/browser/file_path_watcher_mac.cc
@@ -68,7 +68,7 @@ void FSEventsCallback(ConstFSEventStreamRef stream,
void* event_watcher, size_t num_events,
void* event_paths, const FSEventStreamEventFlags flags[],
const FSEventStreamEventId event_ids[]) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FilePathWatcherImpl* watcher =
reinterpret_cast<FilePathWatcherImpl*>(event_watcher);
@@ -87,12 +87,12 @@ void FSEventsCallback(ConstFSEventStreamRef stream,
if (root_changed) {
// Resetting the event stream from within the callback fails (FSEvents spews
// bad file descriptor errors), so post a task to do the reset.
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(watcher, &FilePathWatcherImpl::UpdateEventStream,
root_change_at));
}
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(watcher, &FilePathWatcherImpl::OnFilePathChanged));
}
@@ -104,7 +104,7 @@ FilePathWatcherImpl::FilePathWatcherImpl()
}
void FilePathWatcherImpl::OnFilePathChanged() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(!target_.empty());
base::PlatformFileInfo file_info;
@@ -156,7 +156,7 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
first_notification_ = base::Time::Now();
}
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &FilePathWatcherImpl::UpdateEventStream,
start_event));
@@ -165,8 +165,8 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
void FilePathWatcherImpl::Cancel() {
// Switch to the UI thread if necessary, so we can tear down the event stream.
- if (!ChromeThread::CurrentlyOn(ChromeThread::UI)) {
- ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &FilePathWatcherImpl::Cancel));
return;
}
@@ -177,7 +177,7 @@ void FilePathWatcherImpl::Cancel() {
}
void FilePathWatcherImpl::UpdateEventStream(FSEventStreamEventId start_event) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// It can happen that the watcher gets canceled while tasks that call this
// function are still in flight, so abort if this situation is detected.
@@ -211,14 +211,14 @@ void FilePathWatcherImpl::UpdateEventStream(FSEventStreamEventId start_event) {
FSEventStreamScheduleWithRunLoop(fsevent_stream_, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode);
if (!FSEventStreamStart(fsevent_stream_)) {
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(delegate_.get(),
&FilePathWatcher::Delegate::OnError));
}
}
void FilePathWatcherImpl::DestroyEventStream() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FSEventStreamStop(fsevent_stream_);
FSEventStreamInvalidate(fsevent_stream_);
FSEventStreamRelease(fsevent_stream_);