OLD | NEW |
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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 void RenderFrameImpl::didLoadResourceFromMemoryCache( | 2895 void RenderFrameImpl::didLoadResourceFromMemoryCache( |
2896 blink::WebLocalFrame* frame, | 2896 blink::WebLocalFrame* frame, |
2897 const blink::WebURLRequest& request, | 2897 const blink::WebURLRequest& request, |
2898 const blink::WebURLResponse& response) { | 2898 const blink::WebURLResponse& response) { |
2899 DCHECK(!frame_ || frame_ == frame); | 2899 DCHECK(!frame_ || frame_ == frame); |
2900 // The recipients of this message have no use for data: URLs: they don't | 2900 // The recipients of this message have no use for data: URLs: they don't |
2901 // affect the page's insecure content list and are not in the disk cache. To | 2901 // affect the page's insecure content list and are not in the disk cache. To |
2902 // prevent large (1M+) data: URLs from crashing in the IPC system, we simply | 2902 // prevent large (1M+) data: URLs from crashing in the IPC system, we simply |
2903 // filter them out here. | 2903 // filter them out here. |
2904 GURL url(request.url()); | 2904 GURL url(request.url()); |
2905 if (url.SchemeIs("data")) | 2905 if (url.SchemeIs(url::kDataScheme)) |
2906 return; | 2906 return; |
2907 | 2907 |
2908 // Let the browser know we loaded a resource from the memory cache. This | 2908 // Let the browser know we loaded a resource from the memory cache. This |
2909 // message is needed to display the correct SSL indicators. | 2909 // message is needed to display the correct SSL indicators. |
2910 render_view_->Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( | 2910 render_view_->Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( |
2911 render_view_->GetRoutingID(), | 2911 render_view_->GetRoutingID(), |
2912 url, | 2912 url, |
2913 response.securityInfo(), | 2913 response.securityInfo(), |
2914 request.httpMethod().utf8(), | 2914 request.httpMethod().utf8(), |
2915 response.mimeType().utf8(), | 2915 response.mimeType().utf8(), |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3923 | 3923 |
3924 #if defined(ENABLE_BROWSER_CDMS) | 3924 #if defined(ENABLE_BROWSER_CDMS) |
3925 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3925 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3926 if (!cdm_manager_) | 3926 if (!cdm_manager_) |
3927 cdm_manager_ = new RendererCdmManager(this); | 3927 cdm_manager_ = new RendererCdmManager(this); |
3928 return cdm_manager_; | 3928 return cdm_manager_; |
3929 } | 3929 } |
3930 #endif // defined(ENABLE_BROWSER_CDMS) | 3930 #endif // defined(ENABLE_BROWSER_CDMS) |
3931 | 3931 |
3932 } // namespace content | 3932 } // namespace content |
OLD | NEW |