| OLD | NEW |
| 1 // | 1 // |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 // | 5 // |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 | 8 |
| 9 #include "core/inspector/InspectorTracingAgent.h" | 9 #include "core/inspector/InspectorTracingAgent.h" |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 void InspectorTracingAgent::start(ErrorString*, const String* categoryFilter, co
nst String*, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback) | 50 void InspectorTracingAgent::start(ErrorString*, const String* categoryFilter, co
nst String*, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback) |
| 51 { | 51 { |
| 52 ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty()); | 52 ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty()); |
| 53 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI
dentifier()); | 53 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI
dentifier()); |
| 54 m_client->enableTracing(categoryFilter ? *categoryFilter : String()); | 54 m_client->enableTracing(categoryFilter ? *categoryFilter : String()); |
| 55 emitMetadataEvents(); | 55 emitMetadataEvents(); |
| 56 callback->sendSuccess(); | 56 callback->sendSuccess(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr
<EndCallback> callback) | 59 void InspectorTracingAgent::end(ErrorString* errorString, const bool*, PassRefPt
rWillBeRawPtr<EndCallback> callback) |
| 60 { | 60 { |
| 61 m_client->disableTracing(); | 61 m_client->disableTracing(); |
| 62 resetSessionId(); | 62 resetSessionId(); |
| 63 callback->sendSuccess(); | 63 callback->sendSuccess(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 String InspectorTracingAgent::sessionId() | 66 String InspectorTracingAgent::sessionId() |
| 67 { | 67 { |
| 68 return m_state->getString(TracingAgentState::sessionId); | 68 return m_state->getString(TracingAgentState::sessionId); |
| 69 } | 69 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 87 resetSessionId(); | 87 resetSessionId(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void InspectorTracingAgent::resetSessionId() | 90 void InspectorTracingAgent::resetSessionId() |
| 91 { | 91 { |
| 92 m_state->remove(TracingAgentState::sessionId); | 92 m_state->remove(TracingAgentState::sessionId); |
| 93 m_workerAgent->setTracingSessionId(sessionId()); | 93 m_workerAgent->setTracingSessionId(sessionId()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } | 96 } |
| OLD | NEW |