Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index 9c3d27cd842d5c8bf4f34ed516c1da89439a629a..5286b2063b454be37c27eefd04d85844f1de29f8 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -61,7 +61,6 @@ |
| #include "content/common/savable_subframe.h" |
| #include "content/common/service_worker/service_worker_types.h" |
| #include "content/common/site_isolation_policy.h" |
| -#include "content/common/ssl_status_serialization.h" |
| #include "content/common/swapped_out_messages.h" |
| #include "content/common/view_messages.h" |
| #include "content/public/common/bindings_policy.h" |
| @@ -785,14 +784,11 @@ class MHTMLPartsGenerationDelegate |
| }; |
| // Returns true if a subresource certificate error (described by |url| |
| -// and |security_info|) is "interesting" to the browser process. The |
| -// browser process is interested in certificate errors that differ from |
| -// certificate errors encountered while loading the main frame's main |
| -// resource. In other words, it would be confusing to mark a page as |
| -// having displayed/run insecure content when the whole page has already |
| -// been marked as insecure for the same reason, so subresources with the |
| -// same certificate errors as the main resource are not sent to the |
| -// browser process. |
| +// is "interesting" to the browser process. The browser process is interested |
| +// in certificate errors that differ from certificate errors encountered while |
| +// loading the main frame's main resource. In other words, it would be confusing |
| +// to mark a page as having displayed/run insecure content when the whole page |
| +// has already been marked as insecure for the same reason. |
| bool IsContentWithCertificateErrorsRelevantToUI( |
| blink::WebFrame* frame, |
| const blink::WebURL& url, |
| @@ -807,26 +803,11 @@ bool IsContentWithCertificateErrorsRelevantToUI( |
| return true; |
| WebDataSource* main_ds = main_frame->toWebLocalFrame()->dataSource(); |
| - content::SSLStatus ssl_status; |
| - content::SSLStatus main_resource_ssl_status; |
| - CHECK(DeserializeSecurityInfo(security_info, &ssl_status)); |
| - CHECK(DeserializeSecurityInfo(main_ds->response().securityInfo(), |
| - &main_resource_ssl_status)); |
| // Do not send subresource certificate errors if they are the same |
| - // as errors that occured during the main page load. This compares |
| - // most, but not all, fields of SSLStatus. For example, this check |
| - // does not compare |content_status| because the navigation entry |
| - // might have mixed content but also have the exact same SSL |
| - // connection properties as the subresource, thereby making the |
| - // subresource errors duplicative. |
| - return (!url::Origin(GURL(url)).IsSameOriginWith( |
| - url::Origin(GURL(main_ds->request().url()))) || |
| - main_resource_ssl_status.cert_id != ssl_status.cert_id || |
| - main_resource_ssl_status.cert_status != ssl_status.cert_status || |
| - main_resource_ssl_status.security_bits != ssl_status.security_bits || |
| - main_resource_ssl_status.connection_status != |
| - ssl_status.connection_status); |
| + // as errors that occured during the main page load. |
| + return !url::Origin(GURL(url)).IsSameOriginWith( |
| + url::Origin(GURL(main_ds->request().url()))); |
|
jam
2016/08/03 19:33:45
I've kept this check because otherwise three SSL b
estark
2016/08/03 22:31:37
Theoretically, checking only the origin could get
jam
2016/08/03 23:55:44
Thanks for the example, I updated the test and rem
|
| } |
| bool IsHttpPost(const blink::WebURLRequest& request) { |