Index: extensions/renderer/script_context.h |
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h |
index bbfd2f6b90edb872edabb62abdf811c8597a2d5b..dd97ac90dc3871d8b7c8d095aec42e33eec09c66 100644 |
--- a/extensions/renderer/script_context.h |
+++ b/extensions/renderer/script_context.h |
@@ -5,6 +5,7 @@ |
#ifndef EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ |
#define EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ |
+#include <memory> |
#include <string> |
#include <utility> |
#include <vector> |
@@ -157,6 +158,13 @@ class ScriptContext : public RequestSender::Source { |
// The returned URL may be invalid. |
static GURL GetDataSourceURLForFrame(const blink::WebFrame* frame); |
+ // Similar to GetDataSourceURLForFrame, but only returns the data source URL |
+ // if the frame's document url is empty and the frame has a security origin |
+ // that allows access to the data source url. |
+ // TODO(asargent/devlin) - there may be places that should switch to using |
+ // this instead of GetDataSourceURLForFrame. |
+ static GURL GetAccessCheckedFrameURL(const blink::WebFrame* frame); |
+ |
// Returns the first non-about:-URL in the document hierarchy above and |
// including |frame|. The document hierarchy is only traversed if |
// |document_url| is an about:-URL and if |match_about_blank| is true. |