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

Unified Diff: content/child/fileapi/webfilesystem_impl.cc

Issue 2916303002: ThreadChecker instead of SequenceChecker in classes that use TLS. (Closed)
Patch Set: fix compile Created 3 years, 7 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
« no previous file with comments | « content/child/fileapi/webfilesystem_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/fileapi/webfilesystem_impl.cc
diff --git a/content/child/fileapi/webfilesystem_impl.cc b/content/child/fileapi/webfilesystem_impl.cc
index 8c55be97bf1d89a5c4a2d026b53fe8ca292e228b..f34ea12857abe941209c19925ee313ba02cbb217 100644
--- a/content/child/fileapi/webfilesystem_impl.cc
+++ b/content/child/fileapi/webfilesystem_impl.cc
@@ -97,7 +97,7 @@ void CallDispatcherOnMainThread(
const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_task_runner,
Method method, const Params& params,
WaitableCallbackResults* waitable_results) {
- if (!main_thread_task_runner->RunsTasksInCurrentSequence()) {
+ if (!main_thread_task_runner->BelongsToCurrentThread()) {
main_thread_task_runner->PostTask(
FROM_HERE,
base::Bind(&CallDispatcherOnMainThread<Method, Params>,
@@ -397,7 +397,7 @@ WebFileSystemImpl::WebFileSystemImpl(
}
WebFileSystemImpl::~WebFileSystemImpl() {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
g_webfilesystem_tls.Pointer()->Set(NULL);
}
@@ -655,21 +655,21 @@ bool WebFileSystemImpl::WaitForAdditionalResult(int callbacksId) {
int WebFileSystemImpl::RegisterCallbacks(
const WebFileSystemCallbacks& callbacks) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
int id = next_callbacks_id_++;
callbacks_[id] = callbacks;
return id;
}
WebFileSystemCallbacks WebFileSystemImpl::GetCallbacks(int callbacks_id) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
CallbacksMap::iterator found = callbacks_.find(callbacks_id);
DCHECK(found != callbacks_.end());
return found->second;
}
void WebFileSystemImpl::UnregisterCallbacks(int callbacks_id) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
CallbacksMap::iterator found = callbacks_.find(callbacks_id);
DCHECK(found != callbacks_.end());
callbacks_.erase(found);
« no previous file with comments | « content/child/fileapi/webfilesystem_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698