Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ios/web/navigation/navigation_item_impl.h" | 5 #import "ios/web/navigation/navigation_item_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 | 39 |
| 40 NavigationItemImpl::NavigationItemImpl() | 40 NavigationItemImpl::NavigationItemImpl() |
| 41 : unique_id_(GetUniqueIDInConstructor()), | 41 : unique_id_(GetUniqueIDInConstructor()), |
| 42 transition_type_(ui::PAGE_TRANSITION_LINK), | 42 transition_type_(ui::PAGE_TRANSITION_LINK), |
| 43 is_overriding_user_agent_(false), | 43 is_overriding_user_agent_(false), |
| 44 is_created_from_push_state_(false), | 44 is_created_from_push_state_(false), |
| 45 has_state_been_replaced_(false), | 45 has_state_been_replaced_(false), |
| 46 is_created_from_hash_change_(false), | 46 is_created_from_hash_change_(false), |
| 47 should_skip_repost_form_confirmation_(false), | 47 should_skip_repost_form_confirmation_(false), |
| 48 navigation_initiation_type_( | 48 navigation_initiation_type_( |
| 49 web::NavigationInitiationType::USER_INITIATED), | 49 web::NavigationInitiationType::RENDERER_INITIATED), |
| 50 is_unsafe_(false), | 50 is_unsafe_(false), |
| 51 facade_delegate_(nullptr) {} | 51 facade_delegate_(nullptr) {} |
| 52 | 52 |
| 53 NavigationItemImpl::~NavigationItemImpl() { | 53 NavigationItemImpl::~NavigationItemImpl() { |
| 54 } | 54 } |
| 55 | 55 |
| 56 NavigationItemImpl::NavigationItemImpl(const NavigationItemImpl& item) | 56 NavigationItemImpl::NavigationItemImpl(const NavigationItemImpl& item) |
| 57 : unique_id_(item.unique_id_), | 57 : unique_id_(item.unique_id_), |
| 58 original_request_url_(item.original_request_url_), | 58 original_request_url_(item.original_request_url_), |
| 59 url_(item.url_), | 59 url_(item.url_), |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 http_request_headers_.reset(); | 301 http_request_headers_.reset(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void NavigationItemImpl::ResetHttpRequestHeaders() { | 304 void NavigationItemImpl::ResetHttpRequestHeaders() { |
| 305 http_request_headers_.reset(); | 305 http_request_headers_.reset(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void NavigationItemImpl::ResetForCommit() { | 308 void NavigationItemImpl::ResetForCommit() { |
| 309 // Any state that only matters when a navigation item is pending should be | 309 // Any state that only matters when a navigation item is pending should be |
| 310 // cleared here. | 310 // cleared here. |
| 311 SetNavigationInitiationType(web::NavigationInitiationType::USER_INITIATED); | 311 SetNavigationInitiationType( |
| 312 web::NavigationInitiationType::RENDERER_INITIATED); | |
|
kkhorimoto
2017/02/21 18:53:19
This should remain as USER_INITIATED. Once a REND
Eugene But (OOO till 7-30)
2017/02/21 19:03:40
Is this actually true? During back forward navigat
kkhorimoto
2017/02/21 19:28:11
That was at least the intention of this function w
Eugene But (OOO till 7-30)
2017/02/21 19:33:29
NavigationEntry also marks the entry as user-initi
liaoyuke
2017/02/21 22:56:17
Got it! Thank you for explaining!
| |
| 312 } | 313 } |
| 313 | 314 |
| 314 } // namespace web | 315 } // namespace web |
| OLD | NEW |