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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 2424913003: Avoid unnecessary URL parsing for GURL comparisons in //content (Closed)
Patch Set: rebase on dependent PS Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 } 672 }
673 673
674 delegate_->DidNavigateAnyFramePostCommit( 674 delegate_->DidNavigateAnyFramePostCommit(
675 render_frame_host, details, params); 675 render_frame_host, details, params);
676 } 676 }
677 } 677 }
678 678
679 bool NavigatorImpl::ShouldAssignSiteForURL(const GURL& url) { 679 bool NavigatorImpl::ShouldAssignSiteForURL(const GURL& url) {
680 // about:blank should not "use up" a new SiteInstance. The SiteInstance can 680 // about:blank should not "use up" a new SiteInstance. The SiteInstance can
681 // still be used for a normal web site. 681 // still be used for a normal web site.
682 if (url == GURL(url::kAboutBlankURL)) 682 if (url == url::kAboutBlankURL)
683 return false; 683 return false;
684 684
685 // The embedder will then have the opportunity to determine if the URL 685 // The embedder will then have the opportunity to determine if the URL
686 // should "use up" the SiteInstance. 686 // should "use up" the SiteInstance.
687 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); 687 return GetContentClient()->browser()->ShouldAssignSiteForURL(url);
688 } 688 }
689 689
690 void NavigatorImpl::RequestOpenURL( 690 void NavigatorImpl::RequestOpenURL(
691 RenderFrameHostImpl* render_frame_host, 691 RenderFrameHostImpl* render_frame_host,
692 const GURL& url, 692 const GURL& url,
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 if (navigation_handle) 1237 if (navigation_handle)
1238 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); 1238 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID());
1239 1239
1240 controller_->SetPendingEntry(std::move(entry)); 1240 controller_->SetPendingEntry(std::move(entry));
1241 if (delegate_) 1241 if (delegate_)
1242 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1242 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1243 } 1243 }
1244 } 1244 }
1245 1245
1246 } // namespace content 1246 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698