| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" | 5 #include "chrome/browser/ui/android/chrome_http_auth_handler.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 15 #include "jni/ChromeHttpAuthHandler_jni.h" | 15 #include "jni/ChromeHttpAuthHandler_jni.h" |
| 16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
| 17 | 17 |
| 18 using base::android::AttachCurrentThread; | 18 using base::android::AttachCurrentThread; |
| 19 using base::android::CheckException; | 19 using base::android::CheckException; |
| 20 using base::android::ConvertJavaStringToUTF16; | 20 using base::android::ConvertJavaStringToUTF16; |
| 21 using base::android::ConvertUTF16ToJavaString; | 21 using base::android::ConvertUTF16ToJavaString; |
| 22 using base::android::ScopedJavaLocalRef; | 22 using base::android::ScopedJavaLocalRef; |
| 23 | 23 |
| 24 ChromeHttpAuthHandler::ChromeHttpAuthHandler(const base::string16& explanation) | 24 ChromeHttpAuthHandler::ChromeHttpAuthHandler(const base::string16& explanation) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 ScopedJavaLocalRef<jstring> ChromeHttpAuthHandler::GetCancelButtonText( | 109 ScopedJavaLocalRef<jstring> ChromeHttpAuthHandler::GetCancelButtonText( |
| 110 JNIEnv* env, jobject) { | 110 JNIEnv* env, jobject) { |
| 111 return ConvertUTF16ToJavaString(env, l10n_util::GetStringUTF16(IDS_CANCEL)); | 111 return ConvertUTF16ToJavaString(env, l10n_util::GetStringUTF16(IDS_CANCEL)); |
| 112 } | 112 } |
| 113 | 113 |
| 114 // static | 114 // static |
| 115 bool ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler(JNIEnv* env) { | 115 bool ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler(JNIEnv* env) { |
| 116 return RegisterNativesImpl(env); | 116 return RegisterNativesImpl(env); |
| 117 } | 117 } |
| OLD | NEW |