Commit f1c4c94b authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Narrowed scope of a UrlWithoutFragment method

In jumbo builds many files are compiled in the same
translation unit and then their anonymous namespaces will also
be one and the same. In blink/inspector two (identical)
UrlWithoutFragment functions end up colliding. This patch
changes it so that one of them has a more narrow scope.

The patch also removes the special casing of these files
from the build system.

Bug: 713137
Change-Id: If0b8bfb8a13c1191aa4e1c07d2aa1472ed168f29
Reviewed-on: https://chromium-review.googlesource.com/985978Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547653}
parent 2f792d17
......@@ -102,15 +102,6 @@ blink_core_sources("inspector") {
"WorkerThreadDebugger.cpp",
"WorkerThreadDebugger.h",
]
jumbo_excluded_sources = [
# Collides with InspectorPageAgent.cpp and
# NetworkResourcesData.cpp (patch incoming)
"InspectorNetworkAgent.cpp",
# Collides with InspectorPageAgent.cpp (patch incoming)
"MainThreadDebugger.cpp",
]
}
# inspector protocol -----------------------------------------------------------
......
......@@ -91,12 +91,6 @@ static const char kLifecycleEventsEnabled[] = "lifecycleEventsEnabled";
namespace {
KURL UrlWithoutFragment(const KURL& url) {
KURL result = url;
result.RemoveFragmentIdentifier();
return result;
}
String ScheduledNavigationReasonToProtocol(ScheduledNavigation::Reason reason) {
using ReasonEnum =
protocol::Page::FrameScheduledNavigationNotification::ReasonEnum;
......@@ -279,6 +273,13 @@ static void MaybeEncodeTextContent(const String& text_content,
flat_buffer.size(), result, base64_encoded);
}
// static
KURL InspectorPageAgent::UrlWithoutFragment(const KURL& url) {
KURL result = url;
result.RemoveFragmentIdentifier();
return result;
}
// static
bool InspectorPageAgent::SharedBufferContent(
scoped_refptr<const SharedBuffer> buffer,
......
......@@ -205,11 +205,7 @@ class CORE_EXPORT InspectorPageAgent final
bool is_regex,
std::unique_ptr<SearchInResourceCallback>);
static bool DataContent(const char* data,
unsigned size,
const String& text_encoding_name,
bool with_base64_encode,
String* result);
static KURL UrlWithoutFragment(const KURL&);
void PageLayoutInvalidated(bool resized);
......
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