Commit a4301fc2 authored by Jens Widell's avatar Jens Widell Committed by Commit Bot

Drop conflicting `kIgnoreRoutingId` constant

In jumbo/unity builds, it conflicts with another constant in bindings/
api_event_listeners.cc (that has a different value.)

This particular constant didn't seem to add too much. It was only used in
one place; in a function with a comment that talks about the constant's
value. It could be argued that the code is easier to follow if the (very
simple) function implementation then uses the value directly. (In
particular since the "value" is in fact the name of another constant.)

Change-Id: I728a34b0a8b43382e742c6b640ace3baadc4d2db
Reviewed-on: https://chromium-review.googlesource.com/897489Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534008}
parent c20a3370
...@@ -32,8 +32,6 @@ namespace extensions { ...@@ -32,8 +32,6 @@ namespace extensions {
namespace { namespace {
const int kIgnoreRoutingId = MSG_ROUTING_NONE;
// Returns the routing id to use for matching filtered events. // Returns the routing id to use for matching filtered events.
// Used for routing events to the correct RenderFrame. This doesn't apply to // Used for routing events to the correct RenderFrame. This doesn't apply to
// Extension Service Worker events as there is no RenderFrame to target an event // Extension Service Worker events as there is no RenderFrame to target an event
...@@ -41,7 +39,7 @@ const int kIgnoreRoutingId = MSG_ROUTING_NONE; ...@@ -41,7 +39,7 @@ const int kIgnoreRoutingId = MSG_ROUTING_NONE;
// essentially ignoring routing id for worker events. // essentially ignoring routing id for worker events.
int GetRoutingIDForFilteredEvents(ScriptContext* script_context) { int GetRoutingIDForFilteredEvents(ScriptContext* script_context) {
return script_context->context_type() == Feature::SERVICE_WORKER_CONTEXT return script_context->context_type() == Feature::SERVICE_WORKER_CONTEXT
? kIgnoreRoutingId ? MSG_ROUTING_NONE
: script_context->GetRenderFrame()->GetRoutingID(); : script_context->GetRenderFrame()->GetRoutingID();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment