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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 964463004: <webview>: Removed ResolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 8b9bfb0391399deca42ff8a2b7724d372417e117..cae9063deabcf6e5a057c324540d323551723daa 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -880,9 +880,10 @@ void WebViewGuest::NavigateGuest(const std::string& src,
if (src.empty())
return;
- GURL url = ResolveURL(src);
-
- LoadURLWithParams(url, content::Referrer(),
+ // Resolve the |src| relative to the base URL of the owner.
+ GURL owner_base_url(GetOwnerSiteURL().GetWithEmptyPath());
+ LoadURLWithParams(owner_base_url.Resolve(src),
+ content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
force_navigation);
}
@@ -1251,16 +1252,6 @@ void WebViewGuest::RequestNewWindowPermission(
false /* allowed_by_default */);
}
-GURL WebViewGuest::ResolveURL(const std::string& src) {
- if (!in_extension())
- return GURL(src);
-
- GURL default_url(base::StringPrintf("%s://%s/",
- kExtensionScheme,
- owner_extension_id().c_str()));
- return default_url.Resolve(src);
-}
-
void WebViewGuest::OnWebViewNewWindowResponse(
int new_window_instance_id,
bool allow,
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698