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

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

Issue 2468233003: [DevTools] Migrate Accessibility, Log, Worker to new style (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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/InspectorLogAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLogAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLogAgent.cpp
index bae1b22a4c8ac500fa45dc79a5d869cddec20f0c..9e3e6f74d40e1cfb49488021f5fdd30b73864c01 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorLogAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorLogAgent.cpp
@@ -76,8 +76,7 @@ DEFINE_TRACE(InspectorLogAgent) {
void InspectorLogAgent::restore() {
if (!m_state->booleanProperty(LogAgentState::logEnabled, false))
return;
- ErrorString ignored;
- enable(&ignored);
+ enable();
}
void InspectorLogAgent::consoleMessageAdded(ConsoleMessage* message) {
@@ -109,9 +108,9 @@ void InspectorLogAgent::consoleMessageAdded(ConsoleMessage* message) {
frontend()->flush();
}
-void InspectorLogAgent::enable(ErrorString*) {
+Response InspectorLogAgent::enable() {
if (m_enabled)
- return;
+ return Response::OK();
m_instrumentingAgents->addInspectorLogAgent(this);
m_state->setBoolean(LogAgentState::logEnabled, true);
m_enabled = true;
@@ -130,18 +129,21 @@ void InspectorLogAgent::enable(ErrorString*) {
}
for (size_t i = 0; i < m_storage->size(); ++i)
consoleMessageAdded(m_storage->at(i));
+ return Response::OK();
}
-void InspectorLogAgent::disable(ErrorString*) {
+Response InspectorLogAgent::disable() {
if (!m_enabled)
- return;
+ return Response::OK();
m_state->setBoolean(LogAgentState::logEnabled, false);
m_enabled = false;
m_instrumentingAgents->removeInspectorLogAgent(this);
+ return Response::OK();
}
-void InspectorLogAgent::clear(ErrorString*) {
+Response InspectorLogAgent::clear() {
m_storage->clear();
+ return Response::OK();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698