summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function.h
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 21:01:39 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 21:01:39 +0000
commitbb64b5128f1641cba1e802ae7d0768be955ffdc5 (patch)
tree155aa1198f32f57dbdce887dd49a0d7b892fd283 /chrome/browser/extensions/extension_function.h
parentdb163f8b20b0a6c512e1ad21bab9af15a8c9c218 (diff)
downloadchromium_src-bb64b5128f1641cba1e802ae7d0768be955ffdc5.zip
chromium_src-bb64b5128f1641cba1e802ae7d0768be955ffdc5.tar.gz
chromium_src-bb64b5128f1641cba1e802ae7d0768be955ffdc5.tar.bz2
Add calling frame's source_url to extension and dom ui requests.
Additionally, in the extension and tabs api, compute & report UMA histogram data for relative URL use in API calls so we can decide if it's possible to change the behavior of relative url resolution to use the calling frame's url rather than the extension's base url. Review URL: http://codereview.chromium.org/1605005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function.h')
-rw-r--r--chrome/browser/extensions/extension_function.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index 8e1ab8f..272d6c1 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -71,6 +71,9 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> {
void set_request_id(int request_id) { request_id_ = request_id; }
int request_id() { return request_id_; }
+ void set_source_url(const GURL& source_url) { source_url_ = source_url; }
+ const GURL& source_url() { return source_url_; }
+
void set_has_callback(bool has_callback) { has_callback_ = has_callback; }
bool has_callback() { return has_callback_; }
@@ -126,6 +129,9 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> {
// The name of this function.
std::string name_;
+ // The URL of the frame which is making this request
+ GURL source_url_;
+
// True if the js caller provides a callback function to receive the response
// of this call.
bool has_callback_;