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

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

Issue 665123008: [DevTools] Make all parameters of Tracing.start optional. (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') | Source/devtools/protocol.json » ('j') | 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 20 matching lines...) Expand all
31 , m_frontend(0) 31 , m_frontend(0)
32 , m_workerAgent(workerAgent) 32 , m_workerAgent(workerAgent)
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).isEmpty()); 43 ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty());
44 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI dentifier()); 44 m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createI dentifier());
45 m_client->enableTracing(categoryFilter); 45 m_client->enableTracing(categoryFilter ? *categoryFilter : String());
46 emitMetadataEvents(); 46 emitMetadataEvents();
47 callback->sendSuccess(); 47 callback->sendSuccess();
48 } 48 }
49 49
50 void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr <EndCallback> callback) 50 void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr <EndCallback> callback)
51 { 51 {
52 m_client->disableTracing(); 52 m_client->disableTracing();
53 resetSessionId(); 53 resetSessionId();
54 callback->sendSuccess(); 54 callback->sendSuccess();
55 } 55 }
(...skipping 27 matching lines...) Expand all
83 resetSessionId(); 83 resetSessionId();
84 } 84 }
85 85
86 void InspectorTracingAgent::resetSessionId() 86 void InspectorTracingAgent::resetSessionId()
87 { 87 {
88 m_state->remove(TracingAgentState::sessionId); 88 m_state->remove(TracingAgentState::sessionId);
89 m_workerAgent->setTracingSessionId(sessionId()); 89 m_workerAgent->setTracingSessionId(sessionId());
90 } 90 }
91 91
92 } 92 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.h ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698