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

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

Issue 1936593002: [DevTools] Remove state from v8 agent wrappers, remove unnecessary classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-everything-from-agents
Patch Set: rebased Created 4 years, 7 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/InspectorProfilerAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
index 9da590350b09e42b48a43705883f2432682db586..ff1e039bcad7a1e37d22578b58cbeb91b81f55cb 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
@@ -35,10 +35,6 @@
namespace blink {
-namespace ProfilerAgentState {
-static const char profilerEnabled[] = "profilerEnabled";
-}
-
InspectorProfilerAgent::InspectorProfilerAgent(V8ProfilerAgent* agent)
: InspectorBaseAgent<InspectorProfilerAgent, protocol::Frontend::Profiler>("Profiler")
, m_v8ProfilerAgent(agent)
@@ -65,22 +61,16 @@ void InspectorProfilerAgent::dispose()
void InspectorProfilerAgent::restore()
{
- if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false))
- return;
m_v8ProfilerAgent->restore();
- ErrorString errorString;
- enable(&errorString);
}
void InspectorProfilerAgent::enable(ErrorString* errorString)
{
m_v8ProfilerAgent->enable(errorString);
- m_state->setBoolean(ProfilerAgentState::profilerEnabled, true);
}
void InspectorProfilerAgent::disable(ErrorString* errorString)
{
- m_state->setBoolean(ProfilerAgentState::profilerEnabled, false);
m_v8ProfilerAgent->disable(errorString);
}

Powered by Google App Engine
This is Rietveld 408576698