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

Unified Diff: Source/core/inspector/InspectorTracingAgent.cpp

Issue 657383002: DevTools: clear session id. follow-up patch after r183608 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 6 years, 2 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
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTracingAgent.cpp
diff --git a/Source/core/inspector/InspectorTracingAgent.cpp b/Source/core/inspector/InspectorTracingAgent.cpp
index 8e8edac01e7a874a5244db6f0744005010bf7627..6930a940d76c5664eabc0e7cd0d0133b56aa0f7a 100644
--- a/Source/core/inspector/InspectorTracingAgent.cpp
+++ b/Source/core/inspector/InspectorTracingAgent.cpp
@@ -40,6 +40,7 @@ void InspectorTracingAgent::restore()
void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, const String&, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback)
{
+ ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty());
m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createIdentifier());
m_client->enableTracing(categoryFilter);
emitMetadataEvents();
@@ -49,7 +50,7 @@ void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, co
void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr<EndCallback> callback)
{
m_client->disableTracing();
- m_workerAgent->setTracingSessionId(String());
+ resetSessionId();
callback->sendSuccess();
}
@@ -77,4 +78,15 @@ void InspectorTracingAgent::setFrontend(InspectorFrontend* frontend)
m_frontend = frontend->tracing();
}
+void InspectorTracingAgent::clearFrontend()
+{
+ resetSessionId();
+}
+
+void InspectorTracingAgent::resetSessionId()
+{
+ m_state->remove(TracingAgentState::sessionId);
+ m_workerAgent->setTracingSessionId(sessionId());
+}
+
}
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698