Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2398613002: [HttpCache] LOAD_ONLY_FROM_CACHE should not imply LOAD_PREFERRING_CACHE (Closed)
Patch Set: Nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 6140 matching lines...) Expand 10 before | Expand all | Expand 10 after
6151 document_state->set_request_time( 6151 document_state->set_request_time(
6152 pending_navigation_params_->request_params.request_time); 6152 pending_navigation_params_->request_params.request_time);
6153 6153
6154 InternalDocumentStateData* internal_data = 6154 InternalDocumentStateData* internal_data =
6155 InternalDocumentStateData::FromDocumentState(document_state); 6155 InternalDocumentStateData::FromDocumentState(document_state);
6156 6156
6157 if (!pending_navigation_params_->common_params.url.SchemeIs( 6157 if (!pending_navigation_params_->common_params.url.SchemeIs(
6158 url::kJavaScriptScheme) && 6158 url::kJavaScriptScheme) &&
6159 pending_navigation_params_->common_params.navigation_type == 6159 pending_navigation_params_->common_params.navigation_type ==
6160 FrameMsg_Navigate_Type::RESTORE) { 6160 FrameMsg_Navigate_Type::RESTORE) {
6161 // We're doing a load of a page that was restored from the last session. By 6161 // We're doing a load of a page that was restored from the last session.
6162 // default this prefers the cache over loading (LOAD_PREFERRING_CACHE) which 6162 // By default this prefers the cache over loading
6163 // can result in stale data for pages that are set to expire. We explicitly 6163 // (LOAD_SKIP_CACHE_VALIDATION) which can result in stale data for pages
6164 // override that by setting the policy here so that as necessary we load 6164 // that are set to expire. We explicitly override that by setting the
6165 // from the network. 6165 // policy here so that as necessary we load from the network.
6166 // 6166 //
6167 // TODO(davidben): Remove this in favor of passing a cache policy to the 6167 // TODO(davidben): Remove this in favor of passing a cache policy to the
6168 // loadHistoryItem call in OnNavigate. That requires not overloading 6168 // loadHistoryItem call in OnNavigate. That requires not overloading
6169 // UseProtocolCachePolicy to mean both "normal load" and "determine cache 6169 // UseProtocolCachePolicy to mean both "normal load" and "determine cache
6170 // policy based on load type, etc". 6170 // policy based on load type, etc".
6171 internal_data->set_cache_policy_override( 6171 internal_data->set_cache_policy_override(
6172 WebCachePolicy::UseProtocolCachePolicy); 6172 WebCachePolicy::UseProtocolCachePolicy);
6173 } 6173 }
6174 6174
6175 if (IsReload(pending_navigation_params_->common_params.navigation_type)) 6175 if (IsReload(pending_navigation_params_->common_params.navigation_type))
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
6491 // event target. Potentially a Pepper plugin will receive the event. 6491 // event target. Potentially a Pepper plugin will receive the event.
6492 // In order to tell whether a plugin gets the last mouse event and which it 6492 // In order to tell whether a plugin gets the last mouse event and which it
6493 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6493 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6494 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6494 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6495 // |pepper_last_mouse_event_target_|. 6495 // |pepper_last_mouse_event_target_|.
6496 pepper_last_mouse_event_target_ = nullptr; 6496 pepper_last_mouse_event_target_ = nullptr;
6497 #endif 6497 #endif
6498 } 6498 }
6499 6499
6500 } // namespace content 6500 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698