| 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 6139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6150 document_state->set_request_time( | 6150 document_state->set_request_time( |
| 6151 pending_navigation_params_->request_params.request_time); | 6151 pending_navigation_params_->request_params.request_time); |
| 6152 | 6152 |
| 6153 InternalDocumentStateData* internal_data = | 6153 InternalDocumentStateData* internal_data = |
| 6154 InternalDocumentStateData::FromDocumentState(document_state); | 6154 InternalDocumentStateData::FromDocumentState(document_state); |
| 6155 | 6155 |
| 6156 if (!pending_navigation_params_->common_params.url.SchemeIs( | 6156 if (!pending_navigation_params_->common_params.url.SchemeIs( |
| 6157 url::kJavaScriptScheme) && | 6157 url::kJavaScriptScheme) && |
| 6158 pending_navigation_params_->common_params.navigation_type == | 6158 pending_navigation_params_->common_params.navigation_type == |
| 6159 FrameMsg_Navigate_Type::RESTORE) { | 6159 FrameMsg_Navigate_Type::RESTORE) { |
| 6160 // We're doing a load of a page that was restored from the last session. By | 6160 // We're doing a load of a page that was restored from the last session. |
| 6161 // default this prefers the cache over loading (LOAD_PREFERRING_CACHE) which | 6161 // By default this prefers the cache over loading |
| 6162 // can result in stale data for pages that are set to expire. We explicitly | 6162 // (LOAD_SKIP_CACHE_VALIDATION) which can result in stale data for pages |
| 6163 // override that by setting the policy here so that as necessary we load | 6163 // that are set to expire. We explicitly override that by setting the |
| 6164 // from the network. | 6164 // policy here so that as necessary we load from the network. |
| 6165 // | 6165 // |
| 6166 // TODO(davidben): Remove this in favor of passing a cache policy to the | 6166 // TODO(davidben): Remove this in favor of passing a cache policy to the |
| 6167 // loadHistoryItem call in OnNavigate. That requires not overloading | 6167 // loadHistoryItem call in OnNavigate. That requires not overloading |
| 6168 // UseProtocolCachePolicy to mean both "normal load" and "determine cache | 6168 // UseProtocolCachePolicy to mean both "normal load" and "determine cache |
| 6169 // policy based on load type, etc". | 6169 // policy based on load type, etc". |
| 6170 internal_data->set_cache_policy_override( | 6170 internal_data->set_cache_policy_override( |
| 6171 WebCachePolicy::UseProtocolCachePolicy); | 6171 WebCachePolicy::UseProtocolCachePolicy); |
| 6172 } | 6172 } |
| 6173 | 6173 |
| 6174 if (IsReload(pending_navigation_params_->common_params.navigation_type)) | 6174 if (IsReload(pending_navigation_params_->common_params.navigation_type)) |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6490 // event target. Potentially a Pepper plugin will receive the event. | 6490 // event target. Potentially a Pepper plugin will receive the event. |
| 6491 // In order to tell whether a plugin gets the last mouse event and which it | 6491 // In order to tell whether a plugin gets the last mouse event and which it |
| 6492 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6492 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6493 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6493 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6494 // |pepper_last_mouse_event_target_|. | 6494 // |pepper_last_mouse_event_target_|. |
| 6495 pepper_last_mouse_event_target_ = nullptr; | 6495 pepper_last_mouse_event_target_ = nullptr; |
| 6496 #endif | 6496 #endif |
| 6497 } | 6497 } |
| 6498 | 6498 |
| 6499 } // namespace content | 6499 } // namespace content |
| OLD | NEW |