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

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

Issue 2698773002: [iOS] Refactoring web CRWSessionController user agent code. (Closed)
Patch Set: Fix unit tests and rebase 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
« no previous file with comments | « ios/web/navigation/navigation_item_impl.h ('k') | ios/web/navigation/navigation_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b626905bf54a05d7ae07076c217ee09eccac42a..1757cd998998640c6f9a0b5764aa0e8032c41445 100644
--- a/ios/web/navigation/navigation_item_impl.mm
+++ b/ios/web/navigation/navigation_item_impl.mm
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "components/url_formatter/url_formatter.h"
+#import "ios/web/navigation/navigation_manager_impl.h"
#include "ui/base/page_transition_types.h"
#include "ui/gfx/text_elider.h"
@@ -44,7 +45,8 @@ static int GetUniqueIDInConstructor() {
has_state_been_replaced_(false),
is_created_from_hash_change_(false),
should_skip_repost_form_confirmation_(false),
- is_renderer_initiated_(false),
+ navigation_initiation_type_(
+ web::NavigationInitiationType::USER_INITIATED),
is_unsafe_(false),
facade_delegate_(nullptr) {}
@@ -72,7 +74,7 @@ static int GetUniqueIDInConstructor() {
should_skip_repost_form_confirmation_(
item.should_skip_repost_form_confirmation_),
post_data_([item.post_data_ copy]),
- is_renderer_initiated_(item.is_renderer_initiated_),
+ navigation_initiation_type_(item.navigation_initiation_type_),
is_unsafe_(item.is_unsafe_),
cached_display_title_(item.cached_display_title_),
facade_delegate_(nullptr) {}
@@ -250,6 +252,16 @@ static int GetUniqueIDInConstructor() {
return is_created_from_push_state_;
}
+void NavigationItemImpl::SetNavigationInitiationType(
+ web::NavigationInitiationType navigation_initiation_type) {
+ navigation_initiation_type_ = navigation_initiation_type;
+}
+
+web::NavigationInitiationType NavigationItemImpl::NavigationInitiationType()
+ const {
+ return navigation_initiation_type_;
+}
+
void NavigationItemImpl::SetHasStateBeenReplaced(bool replace_state) {
has_state_been_replaced_ = replace_state;
}
@@ -296,7 +308,7 @@ static int GetUniqueIDInConstructor() {
void NavigationItemImpl::ResetForCommit() {
// Any state that only matters when a navigation item is pending should be
// cleared here.
- set_is_renderer_initiated(false);
+ SetNavigationInitiationType(web::NavigationInitiationType::USER_INITIATED);
}
} // namespace web
« no previous file with comments | « ios/web/navigation/navigation_item_impl.h ('k') | ios/web/navigation/navigation_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698