diff options
Diffstat (limited to 'chrome/browser/extensions/extension_tab_util.h')
-rw-r--r-- | chrome/browser/extensions/extension_tab_util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h index 5a2fe77..ed11e2c 100644 --- a/chrome/browser/extensions/extension_tab_util.h +++ b/chrome/browser/extensions/extension_tab_util.h @@ -9,6 +9,8 @@ #include <string> class Browser; +class Extension; +class GURL; class Profile; class TabContents; class TabContentsWrapper; @@ -62,6 +64,20 @@ class ExtensionTabUtil { TabStripModel** tab_strip, TabContentsWrapper** contents, int* tab_index); + + // Takes |url_string| and returns a GURL which is either valid and absolute + // or invalid. If |url_string| is not directly interpretable as a valid (it is + // likely a relative URL) an attempt is made to resolve it. |extension| is + // provided so it can be resolved relative to its extension base + // (chrome-extension://<id>/). Using the source frame url would be more + // correct, but because the api shipped with urls resolved relative to their + // extension base, we decided it wasn't worth breaking existing extensions to + // fix. + static GURL ResolvePossiblyRelativeURL(const std::string& url_string, + const Extension* extension); + + // Returns true if |url| is used for testing crashes. + static bool IsCrashURL(const GURL& url); }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ |