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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.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/InspectorInspectorAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
index 64e02eddd03a1a97b6636eb98a3f8efd928db9ea..f63dbc5c7550dff628c1e7adec510493342cd96c 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp
@@ -37,7 +37,6 @@
#include "core/frame/LocalFrame.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InjectedScriptManager.h"
-#include "core/inspector/InspectorState.h"
#include "core/loader/DocumentLoader.h"
#include "core/page/Page.h"
#include "platform/weborigin/SecurityOrigin.h"
@@ -85,7 +84,7 @@ void InspectorInspectorAgent::didCommitLoadForLocalFrame(LocalFrame* frame)
void InspectorInspectorAgent::restore()
{
- if (m_state->getBoolean(InspectorAgentState::inspectorAgentEnabled)) {
+ if (m_state->booleanProperty(InspectorAgentState::inspectorAgentEnabled, false)) {
ErrorString error;
enable(&error);
}
@@ -93,7 +92,7 @@ void InspectorInspectorAgent::restore()
void InspectorInspectorAgent::evaluateForTestInFrontend(long callId, const String& script)
{
- if (m_state->getBoolean(InspectorAgentState::inspectorAgentEnabled)) {
+ if (m_state->booleanProperty(InspectorAgentState::inspectorAgentEnabled, false)) {
frontend()->evaluateForTestInFrontend(static_cast<int>(callId), script);
frontend()->flush();
} else {
@@ -103,7 +102,7 @@ void InspectorInspectorAgent::evaluateForTestInFrontend(long callId, const Strin
void InspectorInspectorAgent::inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<JSONObject> hints)
{
- if (frontend() && m_state->getBoolean(InspectorAgentState::inspectorAgentEnabled))
+ if (frontend() && m_state->booleanProperty(InspectorAgentState::inspectorAgentEnabled, false))
frontend()->inspect(objectToInspect, hints);
}

Powered by Google App Engine
This is Rietveld 408576698