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

Unified Diff: content/renderer/dom_automation_controller.cc

Issue 2478803003: Remove DOMAutomationController::automation_id_ (Closed)
Patch Set: Rebasing... Created 3 years, 6 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: content/renderer/dom_automation_controller.cc
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
index 7973ba4e6699090ca5f968aca9e9b8f53e27c7bc..e3d35046c1eb41da4a8f7c0566d71a23ade55b25 100644
--- a/content/renderer/dom_automation_controller.cc
+++ b/content/renderer/dom_automation_controller.cc
@@ -42,7 +42,7 @@ void DomAutomationController::Install(RenderFrame* render_frame,
}
DomAutomationController::DomAutomationController(RenderFrame* render_frame)
- : RenderFrameObserver(render_frame), automation_id_(MSG_ROUTING_NONE) {}
+ : RenderFrameObserver(render_frame) {}
DomAutomationController::~DomAutomationController() {}
@@ -84,9 +84,6 @@ bool DomAutomationController::SendMsg(const gin::Arguments& args) {
if (!render_frame())
return false;
- if (automation_id_ == MSG_ROUTING_NONE)
- return false;
-
std::string json;
JSONStringValueSerializer serializer(&json);
std::unique_ptr<base::Value> value;
@@ -112,7 +109,6 @@ bool DomAutomationController::SendMsg(const gin::Arguments& args) {
bool succeeded = Send(new FrameHostMsg_DomOperationResponse(
routing_id(), json));
- automation_id_ = MSG_ROUTING_NONE;
return succeeded;
}
@@ -120,12 +116,9 @@ bool DomAutomationController::SendJSON(const std::string& json) {
if (!render_frame())
return false;
- if (automation_id_ == MSG_ROUTING_NONE)
- return false;
bool result = Send(new FrameHostMsg_DomOperationResponse(
routing_id(), json));
- automation_id_ = MSG_ROUTING_NONE;
return result;
}
@@ -138,7 +131,6 @@ bool DomAutomationController::SendWithId(int automation_id,
}
bool DomAutomationController::SetAutomationId(int automation_id) {
- automation_id_ = automation_id;
return true;
}
« content/public/test/browser_test_utils.cc ('K') | « content/renderer/dom_automation_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698