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

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

Issue 1621923002: [DevTools] Remove InspectorState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 11 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
Index: third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
index 20faf58a1d7be82a36076915755e90e010cea24e..978795f93d47ccec35dc43fceff43894fc707b23 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
@@ -9,7 +9,6 @@
#include "core/frame/LocalFrame.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectedFrames.h"
-#include "core/inspector/InspectorState.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/inspector/InspectorWorkerAgent.h"
#include "platform/TraceEvent.h"
@@ -47,7 +46,7 @@ void InspectorTracingAgent::restore()
void InspectorTracingAgent::start(ErrorString*, const String* categoryFilter, const String*, const double*, const String*, PassRefPtrWillBeRawPtr<StartCallback> callback)
{
- ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty());
+ ASSERT(sessionId().isEmpty());
m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createIdentifier());
m_client->enableTracing(categoryFilter ? *categoryFilter : String());
emitMetadataEvents();
@@ -63,7 +62,9 @@ void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr
String InspectorTracingAgent::sessionId()
{
- return m_state->getString(TracingAgentState::sessionId);
+ String result;
+ m_state->getString(TracingAgentState::sessionId, &result);
+ return result;
}
void InspectorTracingAgent::emitMetadataEvents()

Powered by Google App Engine
This is Rietveld 408576698