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

Unified Diff: android_webview/native/aw_debug.cc

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)
Patch Set: Naming webview whitelist array. Created 3 years, 10 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_debug.cc
diff --git a/android_webview/native/aw_debug.cc b/android_webview/native/aw_debug.cc
index b7d83b6fb28aa218eebe252ccf74965fb6d20725..1a0ffd69edc59966a19fa03da1946db564f28642 100644
--- a/android_webview/native/aw_debug.cc
+++ b/android_webview/native/aw_debug.cc
@@ -5,8 +5,10 @@
#include "android_webview/native/aw_debug.h"
#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
+#include "android_webview/common/crash_reporter/crash_keys.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
+#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
@@ -36,6 +38,19 @@ static jboolean DumpWithoutCrashing(JNIEnv* env,
return crash_reporter::DumpWithoutCrashingToFd(target.TakePlatformFile());
}
+static void InitCrashKeysForWebViewTesting(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz) {
+ crash_keys::InitCrashKeysForWebViewTesting();
+}
+
+static void SetCrashKeyValue(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jstring>& key,
+ const JavaParamRef<jstring>& value) {
+ base::debug::SetCrashKeyValue(ConvertJavaStringToUTF8(env, key),
+ ConvertJavaStringToUTF8(env, value));
+}
+
bool RegisterAwDebug(JNIEnv* env) {
return RegisterNativesImpl(env);
}
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwDebugTest.java ('k') | chrome/common/crash_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698