| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2912 } | 2912 } |
| 2913 } | 2913 } |
| 2914 } | 2914 } |
| 2915 | 2915 |
| 2916 if (content_initiated) { | 2916 if (content_initiated) { |
| 2917 const WebURLRequest& request = datasource->request(); | 2917 const WebURLRequest& request = datasource->request(); |
| 2918 switch (request.getCachePolicy()) { | 2918 switch (request.getCachePolicy()) { |
| 2919 case WebURLRequest::UseProtocolCachePolicy: // normal load. | 2919 case WebURLRequest::UseProtocolCachePolicy: // normal load. |
| 2920 document_state->set_load_type(DocumentState::LINK_LOAD_NORMAL); | 2920 document_state->set_load_type(DocumentState::LINK_LOAD_NORMAL); |
| 2921 break; | 2921 break; |
| 2922 case WebURLRequest::ReloadIgnoringCacheData: // reload. | 2922 case WebURLRequest::ValidatingCacheData: // reload. |
| 2923 case WebURLRequest::ReloadBypassingCache: // end-to-end reload. | 2923 case WebURLRequest::BypassingCache: // end-to-end reload. |
| 2924 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD); | 2924 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD); |
| 2925 break; | 2925 break; |
| 2926 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data. | 2926 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data. |
| 2927 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_STALE_OK); | 2927 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_STALE_OK); |
| 2928 break; | 2928 break; |
| 2929 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. | 2929 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. |
| 2930 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); | 2930 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); |
| 2931 break; | 2931 break; |
| 2932 default: | 2932 default: |
| 2933 NOTREACHED(); | 2933 NOTREACHED(); |
| (...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5229 frame_->setCommittedFirstRealLoad(); | 5229 frame_->setCommittedFirstRealLoad(); |
| 5230 | 5230 |
| 5231 bool no_current_entry = | 5231 bool no_current_entry = |
| 5232 SiteIsolationPolicy::UseSubframeNavigationEntries() | 5232 SiteIsolationPolicy::UseSubframeNavigationEntries() |
| 5233 ? current_history_item_.isNull() | 5233 ? current_history_item_.isNull() |
| 5234 : !render_view_->history_controller()->GetCurrentEntry(); | 5234 : !render_view_->history_controller()->GetCurrentEntry(); |
| 5235 if (is_reload && no_current_entry) { | 5235 if (is_reload && no_current_entry) { |
| 5236 // We cannot reload if we do not have any history state. This happens, for | 5236 // We cannot reload if we do not have any history state. This happens, for |
| 5237 // example, when recovering from a crash. | 5237 // example, when recovering from a crash. |
| 5238 is_reload = false; | 5238 is_reload = false; |
| 5239 cache_policy = WebURLRequest::ReloadIgnoringCacheData; | 5239 cache_policy = WebURLRequest::ValidatingCacheData; |
| 5240 } | 5240 } |
| 5241 | 5241 |
| 5242 // If the navigation is for "view source", the WebLocalFrame needs to be put | 5242 // If the navigation is for "view source", the WebLocalFrame needs to be put |
| 5243 // in a special mode. | 5243 // in a special mode. |
| 5244 if (request_params.is_view_source) | 5244 if (request_params.is_view_source) |
| 5245 frame_->enableViewSourceMode(true); | 5245 frame_->enableViewSourceMode(true); |
| 5246 | 5246 |
| 5247 pending_navigation_params_.reset( | 5247 pending_navigation_params_.reset( |
| 5248 new NavigationParams(common_params, start_params, request_params)); | 5248 new NavigationParams(common_params, start_params, request_params)); |
| 5249 | 5249 |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6013 int match_count, | 6013 int match_count, |
| 6014 int ordinal, | 6014 int ordinal, |
| 6015 const WebRect& selection_rect, | 6015 const WebRect& selection_rect, |
| 6016 bool final_status_update) { | 6016 bool final_status_update) { |
| 6017 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6017 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6018 selection_rect, ordinal, | 6018 selection_rect, ordinal, |
| 6019 final_status_update)); | 6019 final_status_update)); |
| 6020 } | 6020 } |
| 6021 | 6021 |
| 6022 } // namespace content | 6022 } // namespace content |
| OLD | NEW |