| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // are initiated by a javascript script, please see the IPC message | 271 // are initiated by a javascript script, please see the IPC message |
| 272 // ViewHostMsg_GoToEntryAtOffset. | 272 // ViewHostMsg_GoToEntryAtOffset. |
| 273 DCHECK(FrameMsg_Navigate_Type::IsReload(common_params.navigation_type) || | 273 DCHECK(FrameMsg_Navigate_Type::IsReload(common_params.navigation_type) || |
| 274 common_params.navigation_type == | 274 common_params.navigation_type == |
| 275 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT); | 275 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT); |
| 276 | 276 |
| 277 // TODO(clamy): See how we should handle override of the user agent when the | 277 // TODO(clamy): See how we should handle override of the user agent when the |
| 278 // navigation may start in a renderer and commit in another one. | 278 // navigation may start in a renderer and commit in another one. |
| 279 // TODO(clamy): See if the navigation start time should be measured in the | 279 // TODO(clamy): See if the navigation start time should be measured in the |
| 280 // renderer and sent to the browser instead of being measured here. | 280 // renderer and sent to the browser instead of being measured here. |
| 281 // TODO(clamy): The pending history list offset should be properly set. | |
| 282 RequestNavigationParams request_params( | 281 RequestNavigationParams request_params( |
| 283 false, // is_overriding_user_agent | 282 false, // is_overriding_user_agent |
| 284 std::vector<GURL>(), // redirects | 283 std::vector<GURL>(), // redirects |
| 285 common_params.url, common_params.method, | 284 common_params.url, common_params.method, |
| 286 false, // can_load_local_resources | 285 false, // can_load_local_resources |
| 287 PageState(), // page_state | 286 PageState(), // page_state |
| 288 0, // nav_entry_id | 287 0, // nav_entry_id |
| 289 false, // is_history_navigation_in_new_child | 288 false, // is_history_navigation_in_new_child |
| 290 std::map<std::string, bool>(), // subframe_unique_names | 289 std::map<std::string, bool>(), // subframe_unique_names |
| 291 frame_tree_node->has_committed_real_load(), | 290 frame_tree_node->has_committed_real_load(), |
| 292 false, // intended_as_new_entry | 291 false, // intended_as_new_entry |
| 293 -1, // pending_history_list_offset | 292 -1, // |pending_history_list_offset| is set to -1 because |
| 293 // history-navigations do not use this path. See comments above. |
| 294 current_history_list_offset, current_history_list_length, | 294 current_history_list_offset, current_history_list_length, |
| 295 false, // is_view_source | 295 false, // is_view_source |
| 296 false, // should_clear_history_list | 296 false, // should_clear_history_list |
| 297 begin_params.has_user_gesture); | 297 begin_params.has_user_gesture); |
| 298 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 298 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
| 299 frame_tree_node, common_params, begin_params, request_params, | 299 frame_tree_node, common_params, begin_params, request_params, |
| 300 false, // browser_initiated | 300 false, // browser_initiated |
| 301 false, // may_transfer | 301 false, // may_transfer |
| 302 nullptr, entry)); | 302 nullptr, entry)); |
| 303 return navigation_request; | 303 return navigation_request; |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 CSPDirective::FrameSrc, common_params_.url, is_redirect, | 987 CSPDirective::FrameSrc, common_params_.url, is_redirect, |
| 988 common_params_.source_location.value_or(SourceLocation()), | 988 common_params_.source_location.value_or(SourceLocation()), |
| 989 CSPContext::CHECK_ENFORCED_CSP)) { | 989 CSPContext::CHECK_ENFORCED_CSP)) { |
| 990 return CONTENT_SECURITY_POLICY_CHECK_PASSED; | 990 return CONTENT_SECURITY_POLICY_CHECK_PASSED; |
| 991 } | 991 } |
| 992 | 992 |
| 993 return CONTENT_SECURITY_POLICY_CHECK_FAILED; | 993 return CONTENT_SECURITY_POLICY_CHECK_FAILED; |
| 994 } | 994 } |
| 995 | 995 |
| 996 } // namespace content | 996 } // namespace content |
| OLD | NEW |