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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 { 33 {
34 } 34 }
35 35
36 void InspectorTracingAgent::restore() 36 void InspectorTracingAgent::restore()
37 { 37 {
38 emitMetadataEvents(); 38 emitMetadataEvents();
39 } 39 }
40 40
41 void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, co nst String&, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback) 41 void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, co nst String&, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback)
42 { 42 {
43 ASSERT(m_state->getString(TracingAgentState::sessionId) == String());
aandrey 2014/10/16 15:38:22 isEmpty()
loislo 2014/10/17 06:23:21 Done.
43 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI dentifier()); 44 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI dentifier());
44 m_client->enableTracing(categoryFilter); 45 m_client->enableTracing(categoryFilter);
45 emitMetadataEvents(); 46 emitMetadataEvents();
46 callback->sendSuccess(); 47 callback->sendSuccess();
47 } 48 }
48 49
49 void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr <EndCallback> callback) 50 void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr <EndCallback> callback)
50 { 51 {
51 m_client->disableTracing(); 52 m_client->disableTracing();
52 m_workerAgent->setTracingSessionId(String()); 53 m_workerAgent->setTracingSessionId(String());
(...skipping 17 matching lines...) Expand all
70 { 71 {
71 m_layerTreeId = layerTreeId; 72 m_layerTreeId = layerTreeId;
72 TRACE_EVENT_INSTANT2(devtoolsMetadataEventCategory, "SetLayerTreeId", "sessi onId", sessionId().utf8(), "layerTreeId", m_layerTreeId); 73 TRACE_EVENT_INSTANT2(devtoolsMetadataEventCategory, "SetLayerTreeId", "sessi onId", sessionId().utf8(), "layerTreeId", m_layerTreeId);
73 } 74 }
74 75
75 void InspectorTracingAgent::setFrontend(InspectorFrontend* frontend) 76 void InspectorTracingAgent::setFrontend(InspectorFrontend* frontend)
76 { 77 {
77 m_frontend = frontend->tracing(); 78 m_frontend = frontend->tracing();
78 } 79 }
79 80
81 void InspectorTracingAgent::clearFrontend()
82 {
83 m_state->setString(TracingAgentState::sessionId, String());
aandrey 2014/10/16 15:38:22 m_state->remove()
loislo 2014/10/17 06:23:21 Done.
80 } 84 }
85
86 }
OLDNEW
« 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