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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 2322673005: Fix process transfers for blob urls of sites requiring dedicated processes. (Closed)
Patch Set: Created 4 years, 3 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: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 5fe4483d0466b298b80cedd8bb3cac0c8e8d583b..8244fb7afca10ae0d144cab5cbd208258715d9a0 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -150,10 +150,14 @@ bool ShellContentBrowserClient::DoesSiteRequireDedicatedProcess(
DCHECK(command_line->HasSwitch(switches::kIsolateSitesForTesting));
std::string pattern =
command_line->GetSwitchValueASCII(switches::kIsolateSitesForTesting);
- // Practically |origin| is the same as |effective_url.spec()|, except Origin
- // serialization strips the trailing "/", which makes for cleaner patterns.
- std::string origin = url::Origin(effective_url).Serialize();
- return base::MatchPattern(origin, pattern);
+ url::Origin effective_url_origin(effective_url);
+ CHECK_EQ(effective_url_origin.scheme(), effective_url.scheme())
+ << "|effective_url| was not a canonical site URL";
+ // Practically |effective_url_origin.Serialize()| is the same as
+ // |effective_url.spec()|, except Origin serialization strips the trailing
+ // "/", which makes for cleaner wildcard patterns.
+ bool result = base::MatchPattern(effective_url_origin.Serialize(), pattern);
+ return result;
}
bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {

Powered by Google App Engine
This is Rietveld 408576698