Commit 03345ced authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Use host_piece() when comparing web store URL

This change avoids allocating an additional std::string by using the
host_piece() method on GURL instead of using host() when comparing
against another GURL.

Bug: 663729
Change-Id: I3afd3aeccc0ecca4c04a77543adbdb856a78940e
Reviewed-on: https://chromium-review.googlesource.com/1036444
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554914}
parent 0cf1e814
...@@ -638,7 +638,7 @@ void ChromeResourceDispatcherHostDelegate::OnResponseStarted( ...@@ -638,7 +638,7 @@ void ChromeResourceDispatcherHostDelegate::OnResponseStarted(
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
GURL webstore_url(extension_urls::GetWebstoreLaunchURL()); GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
if (request->url().SchemeIsHTTPOrHTTPS() && if (request->url().SchemeIsHTTPOrHTTPS() &&
request->url().DomainIs(webstore_url.host().c_str())) { request->url().DomainIs(webstore_url.host_piece())) {
net::HttpResponseHeaders* response_headers = request->response_headers(); net::HttpResponseHeaders* response_headers = request->response_headers();
if (response_headers && if (response_headers &&
!response_headers->HasHeaderValue("x-frame-options", "deny") && !response_headers->HasHeaderValue("x-frame-options", "deny") &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment