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

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

Issue 308083009: Set the right load flag for ResourceRequests on end-to-end reloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 } 2027 }
2028 } 2028 }
2029 2029
2030 if (content_initiated) { 2030 if (content_initiated) {
2031 const WebURLRequest& request = ds->request(); 2031 const WebURLRequest& request = ds->request();
2032 switch (request.cachePolicy()) { 2032 switch (request.cachePolicy()) {
2033 case WebURLRequest::UseProtocolCachePolicy: // normal load. 2033 case WebURLRequest::UseProtocolCachePolicy: // normal load.
2034 document_state->set_load_type(DocumentState::LINK_LOAD_NORMAL); 2034 document_state->set_load_type(DocumentState::LINK_LOAD_NORMAL);
2035 break; 2035 break;
2036 case WebURLRequest::ReloadIgnoringCacheData: // reload. 2036 case WebURLRequest::ReloadIgnoringCacheData: // reload.
2037 case WebURLRequest::ReloadBypassingCache: // end-to-end reload.
2037 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD); 2038 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD);
2038 break; 2039 break;
2039 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data. 2040 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data.
2040 document_state->set_load_type( 2041 document_state->set_load_type(
2041 DocumentState::LINK_LOAD_CACHE_STALE_OK); 2042 DocumentState::LINK_LOAD_CACHE_STALE_OK);
2042 break; 2043 break;
2043 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. 2044 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post.
2044 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); 2045 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY);
2045 break; 2046 break;
2046 } 2047 }
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 std::vector<gfx::Size> sizes; 4050 std::vector<gfx::Size> sizes;
4050 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4051 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4051 if (!url.isEmpty()) 4052 if (!url.isEmpty())
4052 urls.push_back( 4053 urls.push_back(
4053 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4054 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4054 } 4055 }
4055 SendUpdateFaviconURL(urls); 4056 SendUpdateFaviconURL(urls);
4056 } 4057 }
4057 4058
4058 } // namespace content 4059 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698