Index: chrome/browser/google/google_util.cc |
=================================================================== |
--- chrome/browser/google/google_util.cc (revision 206485) |
+++ chrome/browser/google/google_util.cc (working copy) |
@@ -155,25 +155,10 @@ |
bool IsGoogleDomainUrl(const std::string& url, |
Jered
2013/06/25 16:30:39
All the callers turn a GURL into a string, then we
Peter Kasting
2013/06/25 23:06:36
Done. For consistency I also switched IsGoogleHom
|
SubdomainPermission subdomain_permission, |
PortPermission port_permission) { |
- GURL original_url(url); |
- if (!original_url.is_valid() || |
- !(original_url.SchemeIs("http") || original_url.SchemeIs("https"))) |
- return false; |
- |
- // If we have the Instant URL overridden with a command line flag, accept |
- // its domain/port combination as well. |
- const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kInstantURL)) { |
- GURL custom_instant_url( |
- command_line.GetSwitchValueASCII(switches::kInstantURL)); |
- if (original_url.host() == custom_instant_url.host() && |
- original_url.port() == custom_instant_url.port()) |
- return true; |
- } |
- |
- return (original_url.port().empty() || |
- port_permission == ALLOW_NON_STANDARD_PORTS) && |
- google_util::IsGoogleHostname(original_url.host(), subdomain_permission); |
+ GURL gurl(url); |
+ return gurl.is_valid() && (gurl.SchemeIs("http") || gurl.SchemeIs("https")) && |
+ (gurl.port().empty() || (port_permission == ALLOW_NON_STANDARD_PORTS)) && |
+ google_util::IsGoogleHostname(gurl.host(), subdomain_permission); |
} |
bool IsGoogleHostname(const std::string& host, |