| 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/debug/dump_without_crashing.h" | 9 #include "base/debug/dump_without_crashing.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 blink::WebSandboxFlags::kOrigin) != blink::WebSandboxFlags::kOrigin; | 715 blink::WebSandboxFlags::kOrigin) != blink::WebSandboxFlags::kOrigin; |
| 716 request_params_.should_create_service_worker = can_create_service_worker; | 716 request_params_.should_create_service_worker = can_create_service_worker; |
| 717 if (can_create_service_worker) { | 717 if (can_create_service_worker) { |
| 718 ServiceWorkerContextWrapper* service_worker_context = | 718 ServiceWorkerContextWrapper* service_worker_context = |
| 719 static_cast<ServiceWorkerContextWrapper*>( | 719 static_cast<ServiceWorkerContextWrapper*>( |
| 720 partition->GetServiceWorkerContext()); | 720 partition->GetServiceWorkerContext()); |
| 721 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 721 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 722 } | 722 } |
| 723 | 723 |
| 724 if (IsSchemeSupportedForAppCache(common_params_.url)) { | 724 if (IsSchemeSupportedForAppCache(common_params_.url)) { |
| 725 RenderFrameHostImpl* render_frame_host = | 725 if (navigating_frame_host->GetRenderViewHost() |
| 726 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); | |
| 727 if (render_frame_host->GetRenderViewHost() | |
| 728 ->GetWebkitPreferences() | 726 ->GetWebkitPreferences() |
| 729 .application_cache_enabled) { | 727 .application_cache_enabled) { |
| 730 navigation_handle_->InitAppCacheHandle( | 728 navigation_handle_->InitAppCacheHandle( |
| 731 static_cast<ChromeAppCacheService*>(partition->GetAppCacheService())); | 729 static_cast<ChromeAppCacheService*>(partition->GetAppCacheService())); |
| 732 } | 730 } |
| 733 } | 731 } |
| 734 | 732 |
| 735 // Mark the fetch_start (Navigation Timing API). | 733 // Mark the fetch_start (Navigation Timing API). |
| 736 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); | 734 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); |
| 737 | 735 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 847 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
| 850 | 848 |
| 851 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 849 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
| 852 std::move(handle_), common_params_, | 850 std::move(handle_), common_params_, |
| 853 request_params_, is_view_source_); | 851 request_params_, is_view_source_); |
| 854 | 852 |
| 855 frame_tree_node_->ResetNavigationRequest(true, true); | 853 frame_tree_node_->ResetNavigationRequest(true, true); |
| 856 } | 854 } |
| 857 | 855 |
| 858 } // namespace content | 856 } // namespace content |
| OLD | NEW |