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 #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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 // are initiated by a javascript script, please see the IPC message | 270 // are initiated by a javascript script, please see the IPC message |
| 271 // ViewHostMsg_GoToEntryAtOffset. | 271 // ViewHostMsg_GoToEntryAtOffset. |
| 272 DCHECK(FrameMsg_Navigate_Type::IsReload(common_params.navigation_type) || | 272 DCHECK(FrameMsg_Navigate_Type::IsReload(common_params.navigation_type) || |
| 273 common_params.navigation_type == | 273 common_params.navigation_type == |
| 274 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT); | 274 FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT); |
| 275 | 275 |
| 276 // TODO(clamy): See how we should handle override of the user agent when the | 276 // TODO(clamy): See how we should handle override of the user agent when the |
| 277 // navigation may start in a renderer and commit in another one. | 277 // navigation may start in a renderer and commit in another one. |
| 278 // TODO(clamy): See if the navigation start time should be measured in the | 278 // TODO(clamy): See if the navigation start time should be measured in the |
| 279 // renderer and sent to the browser instead of being measured here. | 279 // renderer and sent to the browser instead of being measured here. |
| 280 // TODO(clamy): The pending history list offset should be properly set. | |
| 281 RequestNavigationParams request_params( | 280 RequestNavigationParams request_params( |
| 282 false, // is_overriding_user_agent | 281 false, // is_overriding_user_agent |
| 283 std::vector<GURL>(), // redirects | 282 std::vector<GURL>(), // redirects |
| 284 common_params.url, common_params.method, | 283 common_params.url, common_params.method, |
| 285 false, // can_load_local_resources | 284 false, // can_load_local_resources |
| 286 PageState(), // page_state | 285 PageState(), // page_state |
| 287 0, // nav_entry_id | 286 0, // nav_entry_id |
| 288 false, // is_history_navigation_in_new_child | 287 false, // is_history_navigation_in_new_child |
| 289 std::map<std::string, bool>(), // subframe_unique_names | 288 std::map<std::string, bool>(), // subframe_unique_names |
| 290 frame_tree_node->has_committed_real_load(), | 289 frame_tree_node->has_committed_real_load(), |
| 291 false, // intended_as_new_entry | 290 false, // intended_as_new_entry |
| 292 -1, // pending_history_list_offset | 291 -1, // |pending_history_list_offset| is set to -1 because |
| 292 // history-navigations doesn't use this path. See comments above. | |
|
nasko
2017/06/09 22:29:24
nit: s/doesn't/do not/ or if you prefer "don't".
| |
| 293 current_history_list_offset, current_history_list_length, | 293 current_history_list_offset, current_history_list_length, |
| 294 false, // is_view_source | 294 false, // is_view_source |
| 295 false, // should_clear_history_list | 295 false, // should_clear_history_list |
| 296 begin_params.has_user_gesture); | 296 begin_params.has_user_gesture); |
| 297 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 297 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
| 298 frame_tree_node, common_params, begin_params, request_params, | 298 frame_tree_node, common_params, begin_params, request_params, |
| 299 false, // browser_initiated | 299 false, // browser_initiated |
| 300 false, // may_transfer | 300 false, // may_transfer |
| 301 nullptr, entry)); | 301 nullptr, entry)); |
| 302 return navigation_request; | 302 return navigation_request; |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 946 if (parent->IsAllowedByCsp( | 946 if (parent->IsAllowedByCsp( |
| 947 CSPDirective::FrameSrc, common_params_.url, is_redirect, | 947 CSPDirective::FrameSrc, common_params_.url, is_redirect, |
| 948 common_params_.source_location.value_or(SourceLocation()))) { | 948 common_params_.source_location.value_or(SourceLocation()))) { |
| 949 return CONTENT_SECURITY_POLICY_CHECK_PASSED; | 949 return CONTENT_SECURITY_POLICY_CHECK_PASSED; |
| 950 } | 950 } |
| 951 | 951 |
| 952 return CONTENT_SECURITY_POLICY_CHECK_FAILED; | 952 return CONTENT_SECURITY_POLICY_CHECK_FAILED; |
| 953 } | 953 } |
| 954 | 954 |
| 955 } // namespace content | 955 } // namespace content |
| OLD | NEW |