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

Side by Side Diff: Source/core/inspector/InspectorTracingAgent.cpp

Issue 1307863003: Add support for returning traces as streams in DevTools protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698