Commit 4381e1ba authored by Mason Freed's avatar Mason Freed Committed by Chromium LUCI CQ

Remove unused ReasonForCallingAllowPlugins enum

It appears that this state was used previously, but is no
longer needed.

This should cause no behavior changes.

Change-Id: I7a36dcdb735654d1ce87debeb82c71a4ccd129eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630286
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843790}
parent fd8c89c1
......@@ -136,8 +136,7 @@ DocumentInit::Type DocumentInit::ComputeDocumentType(
if (HTMLMediaElement::GetSupportsType(ContentType(mime_type)))
return Type::kMedia;
if (frame && frame->GetPage() &&
frame->Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) {
if (frame && frame->GetPage() && frame->Loader().AllowPlugins()) {
PluginData* plugin_data = GetPluginData(frame, url);
// Everything else except text/plain can be overridden by plugins.
......
......@@ -1809,7 +1809,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
}
PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
if (!Loader().AllowPlugins())
return nullptr;
return GetPage()->GetPluginData(
Tree().Top().GetSecurityContext()->GetSecurityOrigin());
......
......@@ -42,8 +42,7 @@ HTMLNoEmbedElement::HTMLNoEmbedElement(Document& document)
bool HTMLNoEmbedElement::LayoutObjectIsNeeded(
const ComputedStyle& style) const {
if (GetDocument().GetFrame()->Loader().AllowPlugins(
kNotAboutToInstantiatePlugin))
if (GetDocument().GetFrame()->Loader().AllowPlugins())
return false;
return Element::LayoutObjectIsNeeded(style);
}
......
......@@ -646,7 +646,7 @@ bool HTMLPlugInElement::LoadPlugin(const KURL& url,
return false;
LocalFrame* frame = GetDocument().GetFrame();
if (!frame->Loader().AllowPlugins(kAboutToInstantiatePlugin))
if (!frame->Loader().AllowPlugins())
return false;
auto* layout_object = GetLayoutEmbeddedObject();
......
......@@ -95,8 +95,7 @@ void PluginDocumentParser::CreateDocumentStructure() {
return;
// FIXME: Why does this check settings?
if (!frame->GetSettings() ||
!frame->Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
if (!frame->GetSettings() || !frame->Loader().AllowPlugins())
return;
auto* root_element = MakeGarbageCollected<HTMLHtmlElement>(*GetDocument());
......
......@@ -431,7 +431,7 @@ void FrameLoader::SetOpener(LocalFrame* opener) {
frame_->SetOpener(opener);
}
bool FrameLoader::AllowPlugins(ReasonForCallingAllowPlugins reason) {
bool FrameLoader::AllowPlugins() {
// With Oilpan, a FrameLoader might be accessed after the Page has been
// detached. FrameClient will not be accessible, so bail early.
if (!Client())
......
......@@ -196,7 +196,7 @@ class CORE_EXPORT FrameLoader final {
void DispatchUnloadEvent(SecurityOrigin* committing_origin,
base::Optional<Document::UnloadEventTiming>*);
bool AllowPlugins(ReasonForCallingAllowPlugins);
bool AllowPlugins();
void SaveScrollAnchor();
void SaveScrollState();
......
......@@ -33,11 +33,6 @@ namespace blink {
enum ShouldSendReferrer { kMaybeSendReferrer, kNeverSendReferrer };
enum ReasonForCallingAllowPlugins {
kAboutToInstantiatePlugin,
kNotAboutToInstantiatePlugin
};
enum LoadStartType {
kNavigationToDifferentDocument,
kNavigationWithinSameDocument
......
......@@ -65,8 +65,7 @@ DOMPlugin* DOMMimeType::enabledPlugin() const {
// FIXME: allowPlugins is just a client call. We should not need
// to bounce through the loader to get there.
// Something like: frame()->page()->client()->allowPlugins().
if (!DomWindow() || !DomWindow()->GetFrame()->Loader().AllowPlugins(
kNotAboutToInstantiatePlugin)) {
if (!DomWindow() || !DomWindow()->GetFrame()->Loader().AllowPlugins()) {
return nullptr;
}
......
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