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

Unified Diff: android_webview/native/aw_http_auth_handler.cc

Issue 1013843002: favor DCHECK_CURRENTLY_ON for better logs in android_webview/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change a few more 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: android_webview/native/aw_http_auth_handler.cc
diff --git a/android_webview/native/aw_http_auth_handler.cc b/android_webview/native/aw_http_auth_handler.cc
index 0c4fd92776eebff100ca188811e3c7482bd3a992..700270a78a4a73f40a32978be9274ca6d70871a0 100644
--- a/android_webview/native/aw_http_auth_handler.cc
+++ b/android_webview/native/aw_http_auth_handler.cc
@@ -14,6 +14,7 @@
#include "content/public/browser/web_contents.h"
using base::android::ConvertJavaStringToUTF16;
+using content::BrowserThread;
namespace android_webview {
@@ -23,7 +24,7 @@ AwHttpAuthHandler::AwHttpAuthHandler(AwLoginDelegate* login_delegate,
: login_delegate_(login_delegate),
host_(auth_info->challenger.host()),
realm_(auth_info->realm) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = base::android::AttachCurrentThread();
http_auth_handler_.Reset(
Java_AwHttpAuthHandler_create(
@@ -31,7 +32,7 @@ AwHttpAuthHandler::AwHttpAuthHandler(AwLoginDelegate* login_delegate,
}
AwHttpAuthHandler:: ~AwHttpAuthHandler() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Java_AwHttpAuthHandler_handlerDestroyed(base::android::AttachCurrentThread(),
http_auth_handler_.obj());
}
@@ -40,7 +41,7 @@ void AwHttpAuthHandler::Proceed(JNIEnv* env,
jobject obj,
jstring user,
jstring password) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (login_delegate_.get()) {
login_delegate_->Proceed(ConvertJavaStringToUTF16(env, user),
ConvertJavaStringToUTF16(env, password));
@@ -49,7 +50,7 @@ void AwHttpAuthHandler::Proceed(JNIEnv* env,
}
void AwHttpAuthHandler::Cancel(JNIEnv* env, jobject obj) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (login_delegate_.get()) {
login_delegate_->Cancel();
login_delegate_ = NULL;
@@ -58,7 +59,7 @@ void AwHttpAuthHandler::Cancel(JNIEnv* env, jobject obj) {
bool AwHttpAuthHandler::HandleOnUIThread(content::WebContents* web_contents) {
DCHECK(web_contents);
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
AwContents* aw_contents = AwContents::FromWebContents(web_contents);
return aw_contents->OnReceivedHttpAuthRequest(http_auth_handler_, host_,
« no previous file with comments | « android_webview/native/aw_contents_io_thread_client_impl.cc ('k') | android_webview/native/aw_pdf_exporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698