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

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

Issue 2706173003: change navigation initiation type default value to RENDERER_INITIATED (Closed)
Patch Set: Add NONE to NavigationInitiationType Created 3 years, 10 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
Index: ios/web/navigation/navigation_item_impl.mm
diff --git a/ios/web/navigation/navigation_item_impl.mm b/ios/web/navigation/navigation_item_impl.mm
index 1757cd998998640c6f9a0b5764aa0e8032c41445..31f357566080a0b3b5613312130691500edc34bc 100644
--- a/ios/web/navigation/navigation_item_impl.mm
+++ b/ios/web/navigation/navigation_item_impl.mm
@@ -45,8 +45,7 @@ static int GetUniqueIDInConstructor() {
has_state_been_replaced_(false),
is_created_from_hash_change_(false),
should_skip_repost_form_confirmation_(false),
- navigation_initiation_type_(
- web::NavigationInitiationType::USER_INITIATED),
+ navigation_initiation_type_(web::NavigationInitiationType::NONE),
is_unsafe_(false),
facade_delegate_(nullptr) {}
@@ -306,9 +305,9 @@ static int GetUniqueIDInConstructor() {
}
void NavigationItemImpl::ResetForCommit() {
- // Any state that only matters when a navigation item is pending should be
- // cleared here.
- SetNavigationInitiationType(web::NavigationInitiationType::USER_INITIATED);
+ // Navigation initiation type is only valid for pending navigations, thus
+ // always reset to NONE after the item is committed.
+ SetNavigationInitiationType(web::NavigationInitiationType::NONE);
}
} // namespace web
« no previous file with comments | « no previous file | ios/web/navigation/navigation_manager_impl.h » ('j') | ios/web/navigation/navigation_manager_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698