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

Unified Diff: ios/web/navigation/legacy_navigation_manager_impl.mm

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Patch for landing Created 3 years, 6 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
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/navigation/navigation_manager_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/legacy_navigation_manager_impl.mm
diff --git a/ios/web/navigation/legacy_navigation_manager_impl.mm b/ios/web/navigation/legacy_navigation_manager_impl.mm
index ad44adc27ecfca0aeede9bf2ba0d012eb4a8dc54..10dd800567f591dc867e89732a362bbfcd632af5 100644
--- a/ios/web/navigation/legacy_navigation_manager_impl.mm
+++ b/ios/web/navigation/legacy_navigation_manager_impl.mm
@@ -25,52 +25,8 @@
#error "This file requires ARC support."
#endif
-namespace {
-
-// Checks whether or not two URL are an in-page navigation (differing only
-// in the fragment).
-bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
- if (existing_url == new_url || !new_url.has_ref())
- return false;
-
- return existing_url.EqualsIgnoringRef(new_url);
-}
-
-} // anonymous namespace
-
namespace web {
-NavigationManager::WebLoadParams::WebLoadParams(const GURL& url)
- : url(url),
- transition_type(ui::PAGE_TRANSITION_LINK),
- user_agent_override_option(UserAgentOverrideOption::INHERIT),
- is_renderer_initiated(false),
- post_data(nil) {}
-
-NavigationManager::WebLoadParams::~WebLoadParams() {}
-
-NavigationManager::WebLoadParams::WebLoadParams(const WebLoadParams& other)
- : url(other.url),
- referrer(other.referrer),
- transition_type(other.transition_type),
- user_agent_override_option(other.user_agent_override_option),
- is_renderer_initiated(other.is_renderer_initiated),
- extra_headers([other.extra_headers copy]),
- post_data([other.post_data copy]) {}
-
-NavigationManager::WebLoadParams& NavigationManager::WebLoadParams::operator=(
- const WebLoadParams& other) {
- url = other.url;
- referrer = other.referrer;
- is_renderer_initiated = other.is_renderer_initiated;
- transition_type = other.transition_type;
- user_agent_override_option = other.user_agent_override_option;
- extra_headers.reset([other.extra_headers copy]);
- post_data.reset([other.post_data copy]);
-
- return *this;
-}
-
LegacyNavigationManagerImpl::LegacyNavigationManagerImpl()
: delegate_(nullptr), browser_state_(nullptr) {}
@@ -125,8 +81,8 @@ void LegacyNavigationManagerImpl::OnNavigationItemCommitted() {
if (details.previous_item_index >= 0) {
DCHECK([session_controller_ previousItem]);
details.previous_url = [session_controller_ previousItem]->GetURL();
- details.is_in_page =
- AreURLsInPageNavigation(details.previous_url, details.item->GetURL());
+ details.is_in_page = AreUrlsFragmentChangeNavigation(
+ details.previous_url, details.item->GetURL());
} else {
details.previous_url = GURL();
details.is_in_page = NO;
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/navigation/navigation_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698