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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 181253003: Downgrade page security if an inline has invalid certificate. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 if (browser_plugin_embedder_.get()) 1799 if (browser_plugin_embedder_.get())
1800 browser_plugin_embedder_->DragSourceMovedTo(client_x, client_y, 1800 browser_plugin_embedder_->DragSourceMovedTo(client_x, client_y,
1801 screen_x, screen_y); 1801 screen_x, screen_y);
1802 if (GetRenderViewHost()) 1802 if (GetRenderViewHost())
1803 GetRenderViewHostImpl()->DragSourceMovedTo(client_x, client_y, 1803 GetRenderViewHostImpl()->DragSourceMovedTo(client_x, client_y,
1804 screen_x, screen_y); 1804 screen_x, screen_y);
1805 } 1805 }
1806 1806
1807 void WebContentsImpl::DidGetResourceResponseStart( 1807 void WebContentsImpl::DidGetResourceResponseStart(
1808 const ResourceRequestDetails& details) { 1808 const ResourceRequestDetails& details) {
1809 if (net::IsCertStatusError(details.ssl_cert_status)) {
1810 displayed_insecure_content_ = true;
Charlie Reis 2014/02/26 18:49:06 I don't know the SSL manager code very well, but i
abarth-chromium 2014/02/26 19:17:07 Yep
1811 }
1809 controller_.ssl_manager()->DidStartResourceResponse(details); 1812 controller_.ssl_manager()->DidStartResourceResponse(details);
1810 1813
1811 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 1814 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
1812 DidGetResourceResponseStart(details)); 1815 DidGetResourceResponseStart(details));
1813 1816
1814 // TODO(avi): Remove. http://crbug.com/170921 1817 // TODO(avi): Remove. http://crbug.com/170921
1815 NotificationService::current()->Notify( 1818 NotificationService::current()->Notify(
1816 NOTIFICATION_RESOURCE_RESPONSE_STARTED, 1819 NOTIFICATION_RESOURCE_RESPONSE_STARTED,
1817 Source<WebContents>(this), 1820 Source<WebContents>(this),
1818 Details<const ResourceRequestDetails>(&details)); 1821 Details<const ResourceRequestDetails>(&details));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 int connection_status = 0; 2082 int connection_status = 0;
2080 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; 2083 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
2081 DeserializeSecurityInfo(security_info, &cert_id, &cert_status, 2084 DeserializeSecurityInfo(security_info, &cert_id, &cert_status,
2082 &security_bits, &connection_status, 2085 &security_bits, &connection_status,
2083 &signed_certificate_timestamp_ids); 2086 &signed_certificate_timestamp_ids);
2084 // TODO(alcutter,eranm): Pass signed_certificate_timestamp_ids into details 2087 // TODO(alcutter,eranm): Pass signed_certificate_timestamp_ids into details
2085 LoadFromMemoryCacheDetails details( 2088 LoadFromMemoryCacheDetails details(
2086 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method, 2089 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method,
2087 mime_type, resource_type); 2090 mime_type, resource_type);
2088 2091
2092 if (net::IsCertStatusError(cert_status)) {
2093 displayed_insecure_content_ = true;
2094 }
2089 controller_.ssl_manager()->DidLoadFromMemoryCache(details); 2095 controller_.ssl_manager()->DidLoadFromMemoryCache(details);
2090 2096
2091 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2097 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2092 DidLoadResourceFromMemoryCache(details)); 2098 DidLoadResourceFromMemoryCache(details));
2093 2099
2094 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) { 2100 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) {
2095 scoped_refptr<net::URLRequestContextGetter> request_context( 2101 scoped_refptr<net::URLRequestContextGetter> request_context(
2096 resource_type == ResourceType::MEDIA ? 2102 resource_type == ResourceType::MEDIA ?
2097 GetBrowserContext()->GetMediaRequestContextForRenderProcess( 2103 GetBrowserContext()->GetMediaRequestContextForRenderProcess(
2098 GetRenderProcessHost()->GetID()) : 2104 GetRenderProcessHost()->GetID()) :
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 } 3736 }
3731 3737
3732 void WebContentsImpl::OnFrameRemoved( 3738 void WebContentsImpl::OnFrameRemoved(
3733 RenderViewHostImpl* render_view_host, 3739 RenderViewHostImpl* render_view_host,
3734 int64 frame_id) { 3740 int64 frame_id) {
3735 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3741 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3736 FrameDetached(render_view_host, frame_id)); 3742 FrameDetached(render_view_host, frame_id));
3737 } 3743 }
3738 3744
3739 } // namespace content 3745 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698