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..8323d22e7a6dffbbc10ee579b68b3f7f7eebe2c7 100644 |
--- a/content/shell/browser/shell_content_browser_client.cc |
+++ b/content/shell/browser/shell_content_browser_client.cc |
@@ -145,15 +145,19 @@ BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
bool ShellContentBrowserClient::DoesSiteRequireDedicatedProcess( |
BrowserContext* browser_context, |
- const GURL& effective_url) { |
+ const GURL& effective_site_url) { |
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
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_site_url); |
Charlie Reis
2016/09/09 21:18:24
origin?
ncarter (slow)
2016/09/09 21:56:32
Done.
|
+ CHECK_EQ(effective_url_origin.scheme(), effective_site_url.scheme()) |
+ << "|effective_site_url| was not a canonical site URL"; |
+ // Practically |effective_url_origin.Serialize()| is the same as |
+ // |effective_site_url.spec()|, except Origin serialization strips the |
+ // trailing "/", which makes for cleaner wildcard patterns. |
+ bool result = base::MatchPattern(effective_url_origin.Serialize(), pattern); |
Charlie Reis
2016/09/09 21:18:24
return base...
ncarter (slow)
2016/09/09 21:56:32
Done.
|
+ return result; |
} |
bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |