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

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

Issue 303423004: Assert that all Blink cache policies are covered (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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 case WebURLRequest::ReloadIgnoringCacheData: // reload. 2036 case WebURLRequest::ReloadIgnoringCacheData: // reload.
2037 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD); 2037 document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD);
2038 break; 2038 break;
2039 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data. 2039 case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data.
2040 document_state->set_load_type( 2040 document_state->set_load_type(
2041 DocumentState::LINK_LOAD_CACHE_STALE_OK); 2041 DocumentState::LINK_LOAD_CACHE_STALE_OK);
2042 break; 2042 break;
2043 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. 2043 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post.
2044 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); 2044 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY);
2045 break; 2045 break;
2046 default:
2047 NOTREACHED();
2046 } 2048 }
2047 } 2049 }
2048 2050
2049 FOR_EACH_OBSERVER( 2051 FOR_EACH_OBSERVER(
2050 RenderViewObserver, observers_, DidCreateDataSource(frame, ds)); 2052 RenderViewObserver, observers_, DidCreateDataSource(frame, ds));
2051 } 2053 }
2052 2054
2053 void RenderViewImpl::PopulateDocumentStateFromPending( 2055 void RenderViewImpl::PopulateDocumentStateFromPending(
2054 DocumentState* document_state) { 2056 DocumentState* document_state) {
2055 const FrameMsg_Navigate_Params& params = *pending_navigation_params_.get(); 2057 const FrameMsg_Navigate_Params& params = *pending_navigation_params_.get();
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 std::vector<gfx::Size> sizes; 4051 std::vector<gfx::Size> sizes;
4050 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4052 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4051 if (!url.isEmpty()) 4053 if (!url.isEmpty())
4052 urls.push_back( 4054 urls.push_back(
4053 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4055 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4054 } 4056 }
4055 SendUpdateFaviconURL(urls); 4057 SendUpdateFaviconURL(urls);
4056 } 4058 }
4057 4059
4058 } // namespace content 4060 } // 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