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

Unified Diff: chrome/browser/android/most_visited_sites.cc

Issue 1016473003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/android/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/android/most_visited_sites.cc
diff --git a/chrome/browser/android/most_visited_sites.cc b/chrome/browser/android/most_visited_sites.cc
index 288ae84878f23fe9be8d8ca4a6714dafc5bfb752..71bc6a15be688a540df8807621fae0e71f9cdad8 100644
--- a/chrome/browser/android/most_visited_sites.cc
+++ b/chrome/browser/android/most_visited_sites.cc
@@ -102,7 +102,7 @@ SkBitmap ExtractThumbnail(const base::RefCountedMemory& image_data) {
void AddForcedURLOnUIThread(scoped_refptr<history::TopSites> top_sites,
const GURL& url) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
top_sites->AddForcedURL(url, base::Time::Now());
}
@@ -244,7 +244,7 @@ void MostVisitedSites::GetURLThumbnail(JNIEnv* env,
jobject obj,
jstring url,
jobject j_callback_obj) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
ScopedJavaGlobalRef<jobject>* j_callback =
new ScopedJavaGlobalRef<jobject>();
j_callback->Reset(env, j_callback_obj);
@@ -448,7 +448,7 @@ void MostVisitedSites::OnSuggestionsProfileAvailable(
void MostVisitedSites::OnObtainedThumbnail(
ScopedJavaGlobalRef<jobject>* bitmap,
ScopedJavaGlobalRef<jobject>* j_callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
if (bitmap->obj()) {
num_local_thumbs_++;
@@ -474,7 +474,7 @@ void MostVisitedSites::OnSuggestionsThumbnailAvailable(
ScopedJavaGlobalRef<jobject>* j_callback,
const GURL& url,
const SkBitmap* bitmap) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
ScopedJavaGlobalRef<jobject>* j_bitmap_ref =

Powered by Google App Engine
This is Rietveld 408576698