| 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 #include "content/browser/frame_host/navigation_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "content/browser/appcache/appcache_navigation_handle.h" | 10 #include "content/browser/appcache/appcache_navigation_handle.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // While the navigation was started via the LoadURL path it may have come from | 212 // While the navigation was started via the LoadURL path it may have come from |
| 213 // the renderer in the first place as part of OpenURL. | 213 // the renderer in the first place as part of OpenURL. |
| 214 bool browser_initiated = !entry.is_renderer_initiated(); | 214 bool browser_initiated = !entry.is_renderer_initiated(); |
| 215 | 215 |
| 216 CommonNavigationParams common_params = entry.ConstructCommonNavigationParams( | 216 CommonNavigationParams common_params = entry.ConstructCommonNavigationParams( |
| 217 frame_entry, request_body, dest_url, dest_referrer, navigation_type, | 217 frame_entry, request_body, dest_url, dest_referrer, navigation_type, |
| 218 previews_state, navigation_start); | 218 previews_state, navigation_start); |
| 219 | 219 |
| 220 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 220 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
| 221 frame_tree_node, common_params, | 221 frame_tree_node, common_params, |
| 222 BeginNavigationParams(entry.extra_headers(), net::LOAD_NORMAL, | 222 BeginNavigationParams( |
| 223 false, // has_user_gestures | 223 entry.extra_headers(), net::LOAD_NORMAL, |
| 224 false, // skip_service_worker | 224 false, // has_user_gestures |
| 225 REQUEST_CONTEXT_TYPE_LOCATION, | 225 false, // skip_service_worker |
| 226 blink::WebMixedContentContextType::Blockable, | 226 REQUEST_CONTEXT_TYPE_LOCATION, |
| 227 // TODO(arthursonzogni): It can be true for form | 227 blink::WebMixedContentContextType::Blockable, |
| 228 // resubmission when the user reloads the page. This | 228 // TODO(arthursonzogni): It can be true for form |
| 229 // needs to be fixed. | 229 // resubmission when the user reloads the page. This |
| 230 false, // is_form_submission | 230 // needs to be fixed. |
| 231 initiator), | 231 false, // is_form_submission |
| 232 initiator, |
| 233 kInvalidRenderNavigationId), // renderer_navigation_id |
| 232 entry.ConstructRequestNavigationParams( | 234 entry.ConstructRequestNavigationParams( |
| 233 frame_entry, common_params.url, common_params.method, | 235 frame_entry, common_params.url, common_params.method, |
| 234 is_history_navigation_in_new_child, | 236 is_history_navigation_in_new_child, |
| 235 entry.GetSubframeUniqueNames(frame_tree_node), | 237 entry.GetSubframeUniqueNames(frame_tree_node), |
| 236 frame_tree_node->has_committed_real_load(), | 238 frame_tree_node->has_committed_real_load(), |
| 237 controller->GetPendingEntryIndex() == -1, | 239 controller->GetPendingEntryIndex() == -1, |
| 238 controller->GetIndexOfEntry(&entry), | 240 controller->GetIndexOfEntry(&entry), |
| 239 controller->GetLastCommittedEntryIndex(), | 241 controller->GetLastCommittedEntryIndex(), |
| 240 controller->GetEntryCount()), | 242 controller->GetEntryCount()), |
| 241 browser_initiated, | 243 browser_initiated, |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 825 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
| 824 | 826 |
| 825 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 827 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
| 826 common_params_, request_params_, | 828 common_params_, request_params_, |
| 827 is_view_source_); | 829 is_view_source_); |
| 828 | 830 |
| 829 frame_tree_node_->ResetNavigationRequest(true, true); | 831 frame_tree_node_->ResetNavigationRequest(true, true); |
| 830 } | 832 } |
| 831 | 833 |
| 832 } // namespace content | 834 } // namespace content |
| OLD | NEW |