summaryrefslogtreecommitdiffstats
path: root/content/app
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 04:51:00 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 04:51:00 +0000
commita692b63a052426d0b0d6437803b0d60f225f2a5f (patch)
tree88b54af8df4671f102359070fc27379a6dce5c74 /content/app
parent787e639c1306ca968a4651145133e2b22919f893 (diff)
downloadchromium_src-a692b63a052426d0b0d6437803b0d60f225f2a5f.zip
chromium_src-a692b63a052426d0b0d6437803b0d60f225f2a5f.tar.gz
chromium_src-a692b63a052426d0b0d6437803b0d60f225f2a5f.tar.bz2
Add support for --enable-dcheck on Android
This allows release (non-official) builds to have dchecks enabled. BUG= Review URL: https://chromiumcodereview.appspot.com/11644093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r--content/app/android/library_loader_hooks.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc
index a60155f..346a0ed 100644
--- a/content/app/android/library_loader_hooks.cc
+++ b/content/app/android/library_loader_hooks.cc
@@ -9,6 +9,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/at_exit.h"
+#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/file_path.h"
@@ -48,11 +49,18 @@ static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
// Can only use event tracing after setting up the command line.
TRACE_EVENT0("jni", "JNI_OnLoad continuation");
+ // Note: because logging is setup here right after copying the command line
+ // array from java to native up top of this method, any code that adds the
+ // --enable-dcheck switch must do so on the Java side.
+ logging::DcheckState dcheck_state =
+ command_line->HasSwitch(switches::kEnableDCHECK) ?
+ logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
logging::InitLogging(NULL,
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
logging::DONT_LOCK_LOG_FILE,
logging::DELETE_OLD_LOG_FILE,
- logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+ dcheck_state);
// To view log output with IDs and timestamps use "adb logcat -v threadtime".
logging::SetLogItems(false, // Process ID
false, // Thread ID