Home | History | Annotate | Download | only in browser

Lines Matching refs:url

17 static bool HandleViewSource(GURL* url, Profile* profile) {
18 if (url->SchemeIs(chrome::kViewSourceScheme)) {
19 // Load the inner URL instead.
20 *url = GURL(url->path());
23 // other kind of 'active' url scheme like 'javascript' or 'data'.
32 if (url->SchemeIs(allowed_sub_schemes[i])) {
39 *url = GURL(chrome::kAboutBlankURL);
48 // Turns a non view-source URL into the corresponding view-source URL.
49 static bool ReverseViewSource(GURL* url, Profile* profile) {
50 // No action necessary if the URL is already view-source:
51 if (url->SchemeIs(chrome::kViewSourceScheme))
57 repl.SetPath(url->spec().c_str(),
58 url_parse::Component(0, url->spec().size()));
59 *url = url->ReplaceComponents(repl);
64 static bool HandleWebUI(GURL* url, Profile* profile) {
65 if (!ChromeWebUIFactory::GetInstance()->UseWebUIForURL(profile, *url))
70 // sessions or bookmarks, so we say any URL with that scheme triggers the new
72 if (url->SchemeIs(chrome::kChromeInternalScheme)) {
73 // Rewrite it with the proper new tab URL.
74 *url = GURL(chrome::kChromeUINewTabURL);
96 // Add the default URL handlers.
109 void BrowserURLHandler::RewriteURLIfNecessary(GURL* url, Profile* profile,
114 if ((*url_handlers_[i].first)(url, profile)) {
123 GURL* url, const GURL& original, Profile* profile) {
128 return (*url_handlers_[i].second)(url, profile);