Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.h

Issue 1645313002: Don't apply the SandboxPlugins flag until we know a plugin will be used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Side-effecting assert == bad Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.h b/third_party/WebKit/Source/core/html/HTMLPlugInElement.h
index e42c201323ebfc0538eeb349c9fa8f3059a23ef9..131caae828f662699a9356b0a38e7a58bff4edc9 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.h
@@ -129,7 +129,11 @@ private:
virtual void updateWidgetInternal() = 0;
bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayoutObject);
- bool pluginIsLoadable(const KURL&, const String& mimeType);
+ // Perform checks after we have determined that a plugin will be used to
+ // show the object (i.e after allowedToLoadObject).
+ bool allowedToLoadPlugin(const KURL&, const String& mimeType);
+ // Perform checks based on the URL and MIME-type of the object to load.
+ bool allowedToLoadObject(const KURL&, const String& mimeType);
bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType);
void setPersistedPluginWidget(Widget*);

Powered by Google App Engine