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

Side by Side Diff: content/app/android/library_loader_hooks.cc

Issue 189603007: Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/public/app/android_library_loader_hooks.h" 5 #include "content/public/app/android_library_loader_hooks.h"
6 6
7 #include "base/android/base_jni_registrar.h" 7 #include "base/android/base_jni_registrar.h"
8 #include "base/android/command_line_android.h" 8 #include "base/android/command_line_android.h"
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_registrar.h" 10 #include "base/android/jni_registrar.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Android's main browser loop is custom so we set the browser 88 // Android's main browser loop is custom so we set the browser
89 // name here as early as possible. 89 // name here as early as possible.
90 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, ""); 90 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, "");
91 base::debug::TraceLog::GetInstance()->SetProcessName("Browser"); 91 base::debug::TraceLog::GetInstance()->SetProcessName("Browser");
92 base::debug::TraceLog::GetInstance()->SetProcessSortIndex( 92 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
93 kTraceEventBrowserProcessSortIndex); 93 kTraceEventBrowserProcessSortIndex);
94 94
95 // Can only use event tracing after setting up the command line. 95 // Can only use event tracing after setting up the command line.
96 TRACE_EVENT0("jni", "JNI_OnLoad continuation"); 96 TRACE_EVENT0("jni", "JNI_OnLoad continuation");
97 97
98 // Note: because logging is setup here right after copying the command line
99 // array from java to native up top of this method, any code that adds the
100 // --enable-dcheck switch must do so on the Java side.
101 logging::LoggingSettings settings; 98 logging::LoggingSettings settings;
102 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 99 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
103 settings.dcheck_state =
104 command_line->HasSwitch(switches::kEnableDCHECK) ?
105 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
106 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
107 logging::InitLogging(settings); 100 logging::InitLogging(settings);
108 // To view log output with IDs and timestamps use "adb logcat -v threadtime". 101 // To view log output with IDs and timestamps use "adb logcat -v threadtime".
109 logging::SetLogItems(false, // Process ID 102 logging::SetLogItems(false, // Process ID
110 false, // Thread ID 103 false, // Thread ID
111 false, // Timestamp 104 false, // Timestamp
112 false); // Tick count 105 false); // Tick count
113 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() 106 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel()
114 << ", default verbosity = " << logging::GetVlogVerbosity(); 107 << ", default verbosity = " << logging::GetVlogVerbosity();
115 108
116 return EnsureJniRegistered(env); 109 return EnsureJniRegistered(env);
117 } 110 }
118 111
119 } // namespace content 112 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698