+#if defined(OS_CHROMEOS)
+ if (is_system_tracing_) {
+ // Disable system tracing now that the local trace has shutdown.
+ // This must be done last because we potentially need to push event
+ // records into the system event log for synchronizing system event
+ // timestamps with chrome event timestamps--and since the system event
+ // log is a ring-buffer (on linux) adding them at the end is the only
+ // way we're confident we'll have them in the final result.
+ is_system_tracing_ = false;
+ chromeos::DBusThreadManager::Get()->GetDebugDaemonClient()->
+ RequestStopSystemTracing(
+ base::Bind(&TracingControllerImpl::OnEndSystemTracingAcked,
+ base::Unretained(this)));
+ return;
+ }
+#endif
+