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

Unified Diff: content/app/android/library_loader_hooks.cc

Issue 1315463002: [Startup Tracing] Add --trace-config-file flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix - blundell Created 5 years, 4 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: content/app/android/library_loader_hooks.cc
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc
index 39ef2b08f73a21e3fd0be44b3c958c4dbe0a488c..2a1a3dfd72a476bca7082b47d97dcd16f99891b2 100644
--- a/content/app/android/library_loader_hooks.cc
+++ b/content/app/android/library_loader_hooks.cc
@@ -16,7 +16,7 @@
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
#include "base/tracked_objects.h"
-#include "components/tracing/startup_tracing.h"
+#include "components/tracing/trace_config_file.h"
#include "components/tracing/tracing_switches.h"
#include "content/app/android/app_jni_registrar.h"
#include "content/browser/android/browser_jni_registrar.h"
@@ -94,7 +94,11 @@ bool LibraryLoaded(JNIEnv* env, jclass clazz) {
base::trace_event::TraceLog::GetInstance()->SetEnabled(
trace_config, base::trace_event::TraceLog::RECORDING_MODE);
} else {
- tracing::EnableStartupTracingIfConfigFileExists();
+ if (tracing::TraceConfigFile::GetInstance()->IsEnabled()) {
+ base::trace_event::TraceLog::GetInstance()->SetEnabled(
+ tracing::TraceConfigFile::GetInstance()->GetTraceConfig(),
+ base::trace_event::TraceLog::RECORDING_MODE);
+ }
}
// Android's main browser loop is custom so we set the browser

Powered by Google App Engine
This is Rietveld 408576698