Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2846)

Unified Diff: chrome/browser/net/url_fixer_upper.h

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and add extra crash URL checks. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/url_fixer_upper.h
diff --git a/chrome/browser/net/url_fixer_upper.h b/chrome/browser/net/url_fixer_upper.h
index e6096bb4cf9569445e3e20060b5df92a83e7e2e5..9e2b4e9eb941ed2b5dc6f10eb9be06552c8013ef 100644
--- a/chrome/browser/net/url_fixer_upper.h
+++ b/chrome/browser/net/url_fixer_upper.h
@@ -49,6 +49,14 @@ namespace URLFixerUpper {
// instead of ".com").
GURL FixupURL(const std::string& text, const std::string& desired_tld);
+ // Given |url| like about:foo, about://foo, chrome:foo, and chrome://foo, this
+ // returns the 'normalized' chrome://foo version of the URL. This chrome URL
+ // fixup probably shouldn't be performed in FixupURL, as that would break any
+ // extensions that perform URL overrides on the other chrome URL formats.
+ // Additionally, if the URL does not have a valid host, as in "about:", the
+ // returned URL will point to the host "version", as in "chrome://version".
+ GURL FixupChromeURL(const GURL& url);
+
// Converts |text| to a fixed-up URL, allowing it to be a relative path on
// the local filesystem. Begin searching in |base_dir|; if empty, use the
// current working directory. If this resolves to a file on disk, convert it

Powered by Google App Engine
This is Rietveld 408576698