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

Unified Diff: chrome/browser/extensions/blob_reader.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
Index: chrome/browser/extensions/blob_reader.cc
diff --git a/chrome/browser/extensions/blob_reader.cc b/chrome/browser/extensions/blob_reader.cc
index 3b4fde61993655be79667d5adc7cc4cac18a8622..bab8634de851fc9f357f8f07104a4f66df520f70 100644
--- a/chrome/browser/extensions/blob_reader.cc
+++ b/chrome/browser/extensions/blob_reader.cc
@@ -19,7 +19,7 @@ BlobReader::BlobReader(Profile* profile,
const std::string& blob_uuid,
BlobReadCallback callback)
: callback_(callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
GURL blob_url;
if (StartsWithASCII(blob_uuid, "blob:blobinternal", true)) {
// TODO(michaeln): remove support for deprecated blob urls
@@ -34,12 +34,10 @@ BlobReader::BlobReader(Profile* profile,
fetcher_->SetRequestContext(profile->GetRequestContext());
}
-BlobReader::~BlobReader() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
-}
+BlobReader::~BlobReader() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); }
void BlobReader::SetByteRange(int64 offset, int64 length) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
CHECK_GE(offset, 0);
CHECK_GT(length, 0);
CHECK_LE(offset, kint64max - length);
@@ -53,13 +51,13 @@ void BlobReader::SetByteRange(int64 offset, int64 length) {
}
void BlobReader::Start() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
fetcher_->Start();
}
// Overridden from net::URLFetcherDelegate.
void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
scoped_ptr<std::string> response(new std::string);
int64 first = 0, last = 0, length = 0;
source->GetResponseAsString(response.get());
« no previous file with comments | « chrome/browser/extensions/blacklist_state_fetcher.cc ('k') | chrome/browser/extensions/browser_permissions_policy_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698