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

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 2780353005: Fix history navigations in PlzNavigate to use the proper load flags. (Closed)
Patch Set: Add missing s Created 3 years, 8 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 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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/browser/appcache/appcache_navigation_handle.h" 10 #include "content/browser/appcache/appcache_navigation_handle.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 case FrameMsg_Navigate_Type::SAME_DOCUMENT: 80 case FrameMsg_Navigate_Type::SAME_DOCUMENT:
81 case FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT: 81 case FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT:
82 if (is_post) 82 if (is_post)
83 *load_flags |= net::LOAD_VALIDATE_CACHE; 83 *load_flags |= net::LOAD_VALIDATE_CACHE;
84 break; 84 break;
85 case FrameMsg_Navigate_Type::HISTORY_SAME_DOCUMENT: 85 case FrameMsg_Navigate_Type::HISTORY_SAME_DOCUMENT:
86 case FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT: 86 case FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT:
87 if (is_post) { 87 if (is_post) {
88 *load_flags |= 88 *load_flags |=
89 net::LOAD_ONLY_FROM_CACHE | net::LOAD_SKIP_CACHE_VALIDATION; 89 net::LOAD_ONLY_FROM_CACHE | net::LOAD_SKIP_CACHE_VALIDATION;
90 } else {
91 *load_flags |= net::LOAD_SKIP_CACHE_VALIDATION;
90 } 92 }
91 break; 93 break;
92 } 94 }
93 } 95 }
94 96
95 // TODO(clamy): This should be function in FrameTreeNode. 97 // TODO(clamy): This should be function in FrameTreeNode.
96 bool IsSecureFrame(FrameTreeNode* frame) { 98 bool IsSecureFrame(FrameTreeNode* frame) {
97 while (frame) { 99 while (frame) {
98 if (!IsPotentiallyTrustworthyOrigin(frame->current_origin())) 100 if (!IsPotentiallyTrustworthyOrigin(frame->current_origin()))
99 return false; 101 return false;
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 835 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
834 836
835 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 837 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
836 common_params_, request_params_, 838 common_params_, request_params_,
837 is_view_source_); 839 is_view_source_);
838 840
839 frame_tree_node_->ResetNavigationRequest(true, true); 841 frame_tree_node_->ResetNavigationRequest(true, true);
840 } 842 }
841 843
842 } // namespace content 844 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698