| 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 "content/browser/devtools/render_frame_devtools_agent_host.h" | 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Returns the net load flags to use based on the navigation type. | 37 // Returns the net load flags to use based on the navigation type. |
| 38 // TODO(clamy): unify the code with what is happening on the renderer side. | 38 // TODO(clamy): unify the code with what is happening on the renderer side. |
| 39 int LoadFlagFromNavigationType(FrameMsg_Navigate_Type::Value navigation_type) { | 39 int LoadFlagFromNavigationType(FrameMsg_Navigate_Type::Value navigation_type) { |
| 40 int load_flags = net::LOAD_NORMAL; | 40 int load_flags = net::LOAD_NORMAL; |
| 41 switch (navigation_type) { | 41 switch (navigation_type) { |
| 42 case FrameMsg_Navigate_Type::RELOAD: | 42 case FrameMsg_Navigate_Type::RELOAD: |
| 43 case FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL: | 43 case FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL: |
| 44 load_flags |= net::LOAD_VALIDATE_CACHE; | 44 load_flags |= net::LOAD_VALIDATE_CACHE; |
| 45 break; | 45 break; |
| 46 case FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE: | 46 case FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE: |
| 47 load_flags |= net::LOAD_BYPASS_CACHE; | 47 load_flags |= net::LOAD_BYPASS_CACHE; |
| 48 break; | 48 break; |
| 49 case FrameMsg_Navigate_Type::RESTORE: | 49 case FrameMsg_Navigate_Type::RESTORE: |
| 50 load_flags |= net::LOAD_PREFERRING_CACHE; | 50 load_flags |= net::LOAD_PREFERRING_CACHE; |
| 51 break; | 51 break; |
| 52 case FrameMsg_Navigate_Type::RESTORE_WITH_POST: | 52 case FrameMsg_Navigate_Type::RESTORE_WITH_POST: |
| 53 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 53 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
| 54 break; | 54 break; |
| 55 case FrameMsg_Navigate_Type::NORMAL: | 55 case FrameMsg_Navigate_Type::NORMAL: |
| 56 default: | 56 default: |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 browser_context, navigating_frame_host->GetSiteInstance()); | 454 browser_context, navigating_frame_host->GetSiteInstance()); |
| 455 DCHECK(partition); | 455 DCHECK(partition); |
| 456 | 456 |
| 457 ServiceWorkerContextWrapper* service_worker_context = | 457 ServiceWorkerContextWrapper* service_worker_context = |
| 458 static_cast<ServiceWorkerContextWrapper*>( | 458 static_cast<ServiceWorkerContextWrapper*>( |
| 459 partition->GetServiceWorkerContext()); | 459 partition->GetServiceWorkerContext()); |
| 460 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 460 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace content | 463 } // namespace content |
| OLD | NEW |