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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.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/InspectorPageAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index f742ce7fbaaf76feefb126d4bb79e505ed22bafa..dff07c5ee4400611942822ebd64fc79e11a92fc4 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -57,7 +57,6 @@
#include "core/inspector/InspectorDebuggerAgent.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorResourceContentLoader.h"
-#include "core/inspector/InspectorState.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
@@ -359,7 +358,7 @@ InspectorPageAgent::InspectorPageAgent(InspectedFrames* inspectedFrames, Client*
void InspectorPageAgent::restore()
{
- if (m_state->getBoolean(PageAgentState::pageAgentEnabled)) {
+ if (m_state->booleanProperty(PageAgentState::pageAgentEnabled, false)) {
ErrorString error;
enable(&error);
}
@@ -399,9 +398,6 @@ void InspectorPageAgent::addScriptToEvaluateOnLoad(ErrorString*, const String& s
*identifier = String::number(++m_lastScriptIdentifier);
} while (scripts->find(*identifier) != scripts->end());
scripts->setString(*identifier, source);
-
- // Force cookie serialization.
- m_state->setObject(PageAgentState::pageAgentScriptsToEvaluateOnLoad, scripts);
}
void InspectorPageAgent::removeScriptToEvaluateOnLoad(ErrorString* error, const String& identifier)
@@ -638,7 +634,7 @@ void InspectorPageAgent::frameDetachedFromParent(LocalFrame* frame)
bool InspectorPageAgent::screencastEnabled()
{
- return m_enabled && m_state->getBoolean(PageAgentState::screencastEnabled);
+ return m_enabled && m_state->booleanProperty(PageAgentState::screencastEnabled, false);
}
void InspectorPageAgent::frameStartedLoading(LocalFrame* frame)

Powered by Google App Engine
This is Rietveld 408576698