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

Unified Diff: content/browser/indexed_db/indexed_db_database_callbacks.cc

Issue 1504033007: Move Indexed DB from dedicated thread to task scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timer
Patch Set: Tweak traits Created 3 years, 6 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: content/browser/indexed_db/indexed_db_database_callbacks.cc
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.cc b/content/browser/indexed_db/indexed_db_database_callbacks.cc
index d9a4981e4e9ded982a095514d7e6726d4eca5a38..51581e1521a228afc10e9ed3aa1bf7cfa5e4feef 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.cc
@@ -37,15 +37,15 @@ IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks(
: indexed_db_context_(std::move(context)),
io_helper_(new IOThreadHelper(std::move(callbacks_info))) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- thread_checker_.DetachFromThread();
+ DETACH_FROM_SEQUENCE(sequence_checker_);
}
IndexedDBDatabaseCallbacks::~IndexedDBDatabaseCallbacks() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
void IndexedDBDatabaseCallbacks::OnForcedClose() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (complete_)
return;
@@ -58,7 +58,7 @@ void IndexedDBDatabaseCallbacks::OnForcedClose() {
void IndexedDBDatabaseCallbacks::OnVersionChange(int64_t old_version,
int64_t new_version) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (complete_)
return;
@@ -72,7 +72,7 @@ void IndexedDBDatabaseCallbacks::OnVersionChange(int64_t old_version,
void IndexedDBDatabaseCallbacks::OnAbort(
const IndexedDBTransaction& transaction,
const IndexedDBDatabaseError& error) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (complete_)
return;
@@ -85,7 +85,7 @@ void IndexedDBDatabaseCallbacks::OnAbort(
void IndexedDBDatabaseCallbacks::OnComplete(
const IndexedDBTransaction& transaction) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (complete_)
return;
@@ -99,7 +99,7 @@ void IndexedDBDatabaseCallbacks::OnComplete(
void IndexedDBDatabaseCallbacks::OnDatabaseChange(
::indexed_db::mojom::ObserverChangesPtr changes) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(io_helper_);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_callbacks.h ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698