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

Unified Diff: extensions/browser/value_store/value_store_frontend.cc

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « extensions/browser/value_store/leveldb_value_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/value_store/value_store_frontend.cc
diff --git a/extensions/browser/value_store/value_store_frontend.cc b/extensions/browser/value_store/value_store_frontend.cc
index 6ef11ccecb509c7cbfde44ac951081f9460e1f8b..73b6aff2af4a13a8f10512fcd0a3ef2461dcd2ac 100644
--- a/extensions/browser/value_store/value_store_frontend.cc
+++ b/extensions/browser/value_store/value_store_frontend.cc
@@ -18,7 +18,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
Backend() : storage_(NULL) {}
void Init(const base::FilePath& db_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!storage_);
TRACE_EVENT0("ValueStoreFrontend::Backend", "Init");
db_path_ = db_path;
@@ -27,14 +27,14 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
// This variant is useful for testing (using a mock ValueStore).
void InitWithStore(scoped_ptr<ValueStore> storage) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!storage_);
storage_ = storage.release();
}
void Get(const std::string& key,
const ValueStoreFrontend::ReadCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
ValueStore::ReadResult result = storage_->Get(key);
// Extract the value from the ReadResult and pass ownership of it to the
@@ -53,14 +53,14 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
}
void Set(const std::string& key, scoped_ptr<base::Value> value) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// We don't need the old value, so skip generating changes.
storage_->Set(ValueStore::IGNORE_QUOTA | ValueStore::NO_GENERATE_CHANGES,
key, *value.get());
}
void Remove(const std::string& key) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
storage_->Remove(key);
}
@@ -77,7 +77,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
void RunCallback(const ValueStoreFrontend::ReadCallback& callback,
scoped_ptr<base::Value> value) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
callback.Run(value.Pass());
}
« no previous file with comments | « extensions/browser/value_store/leveldb_value_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698