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

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

Issue 1850123002: Rename WebFrameLoadType::ReloadFromOrigin to ReloadBypassingCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 5289 matching lines...) Expand 10 before | Expand all | Expand 10 after
5300 if (browser_side_navigation) 5300 if (browser_side_navigation)
5301 request.setCheckForBrowserSideNavigation(false); 5301 request.setCheckForBrowserSideNavigation(false);
5302 5302
5303 // If we are reloading, then use the history state of the current frame. 5303 // If we are reloading, then use the history state of the current frame.
5304 // Otherwise, if we have history state, then we need to navigate to it, which 5304 // Otherwise, if we have history state, then we need to navigate to it, which
5305 // corresponds to a back/forward navigation event. Update the parameters 5305 // corresponds to a back/forward navigation event. Update the parameters
5306 // depending on the navigation type. 5306 // depending on the navigation type.
5307 if (is_reload) { 5307 if (is_reload) {
5308 bool ignore_cache = (common_params.navigation_type == 5308 bool ignore_cache = (common_params.navigation_type ==
5309 FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE); 5309 FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE);
5310 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadFromOrigin 5310 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadBypassingCache
5311 : blink::WebFrameLoadType::Reload; 5311 : blink::WebFrameLoadType::Reload;
5312 5312
5313 if (!browser_side_navigation) { 5313 if (!browser_side_navigation) {
5314 const GURL override_url = 5314 const GURL override_url =
5315 (common_params.navigation_type == 5315 (common_params.navigation_type ==
5316 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) 5316 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL)
5317 ? common_params.url 5317 ? common_params.url
5318 : GURL(); 5318 : GURL();
5319 request = frame_->requestForReload(load_type, override_url); 5319 request = frame_->requestForReload(load_type, override_url);
5320 } 5320 }
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
5675 data_url = GURL(request_params.data_url_as_string); 5675 data_url = GURL(request_params.data_url_as_string);
5676 if (!data_url.is_valid() || !data_url.SchemeIs(url::kDataScheme)) { 5676 if (!data_url.is_valid() || !data_url.SchemeIs(url::kDataScheme)) {
5677 data_url = params.url; 5677 data_url = params.url;
5678 } 5678 }
5679 } 5679 }
5680 #endif 5680 #endif
5681 std::string mime_type, charset, data; 5681 std::string mime_type, charset, data;
5682 if (net::DataURL::Parse(data_url, &mime_type, &charset, &data)) { 5682 if (net::DataURL::Parse(data_url, &mime_type, &charset, &data)) {
5683 const GURL base_url = params.base_url_for_data_url.is_empty() ? 5683 const GURL base_url = params.base_url_for_data_url.is_empty() ?
5684 params.url : params.base_url_for_data_url; 5684 params.url : params.base_url_for_data_url;
5685 bool replace = load_type == blink::WebFrameLoadType::ReloadFromOrigin || 5685 bool replace = load_type == blink::WebFrameLoadType::ReloadBypassingCache ||
5686 load_type == blink::WebFrameLoadType::Reload; 5686 load_type == blink::WebFrameLoadType::Reload;
5687 5687
5688 frame->loadData( 5688 frame->loadData(
5689 WebData(data.c_str(), data.length()), WebString::fromUTF8(mime_type), 5689 WebData(data.c_str(), data.length()), WebString::fromUTF8(mime_type),
5690 WebString::fromUTF8(charset), base_url, 5690 WebString::fromUTF8(charset), base_url,
5691 // Needed so that history-url-only changes don't become reloads. 5691 // Needed so that history-url-only changes don't become reloads.
5692 params.history_url_for_data_url, replace, load_type, 5692 params.history_url_for_data_url, replace, load_type,
5693 item_for_history_navigation, history_load_type, is_client_redirect); 5693 item_for_history_navigation, history_load_type, is_client_redirect);
5694 } else { 5694 } else {
5695 CHECK(false) << "Invalid URL passed: " 5695 CHECK(false) << "Invalid URL passed: "
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
6031 int match_count, 6031 int match_count,
6032 int ordinal, 6032 int ordinal,
6033 const WebRect& selection_rect, 6033 const WebRect& selection_rect,
6034 bool final_status_update) { 6034 bool final_status_update) {
6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6036 selection_rect, ordinal, 6036 selection_rect, ordinal,
6037 final_status_update)); 6037 final_status_update));
6038 } 6038 }
6039 6039
6040 } // namespace content 6040 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698