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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2191113002: Remove usage of SSLStatus in RenderFrameImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't send for same origin so thattests pass because of favicon loading Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698