De-client tracing.TraceController interface

The tracing service logically provides one service, TraceCoordinator, which can
start and stop tracing sessions. It also can connect to any number of
TraceControllers each of which can supply tracing information on demand.

Whenever an app connects to the tracing service, the tracing service attempts to
connect to that app's TraceController interface. If the app provides this
interface then tracing data will be requested whenever tracing starts. If the
app doesn't, then the pipe just closes. Thus apps that want to be traced can do
so by creating however many connections to the tracing service they want and
registering a TraceController implementation on each outgoing connection.

The shell connects in a similar fashion by connecting to the tracing service and
providing a TraceController implementation. The code looks a bit different since
the shell is special.

BUG=451319
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/791493006
This commit is contained in:
James Robinson 2015-02-02 16:56:34 -08:00
parent 01245cc95b
commit c45dfa0e8d

View File

@ -15,7 +15,8 @@ TraceCollector::~TraceCollector() {
} }
void TraceCollector::GetTrace(TraceCallback callback) { void TraceCollector::GetTrace(TraceCallback callback) {
DCHECK(!callback_.is_null()); DCHECK(callback_.is_null());
DCHECK(!callback.is_null());
if (is_complete_) { if (is_complete_) {
callback.Run(GetTraceAsString()); callback.Run(GetTraceAsString());
return; return;