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

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)

Created:
4 years, 2 months ago by estark
Modified:
4 years, 2 months ago
Reviewers:
felt, jam, meacer
CC:
chromium-reviews, tzik, nasko+codewatch_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, darin-cc_chromium.org, loading-reviews_chromium.org, android-webview-reviews_chromium.org, blink-worker-reviews_chromium.org, creis+watch_chromium.org, rouslan+autofill_chromium.org, Randy Smith (Not in Mondays), nhiroki, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, sdefresne+watch_chromium.org, michaeln, shimazu+serviceworker_chromium.org, serviceworker-reviews, jdonnelly+autofillwatch_chromium.org, kinuko+serviceworker, horo+watch_chromium.org, mmenke, lgarron
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove SSLStatus::security_style member and content::SecurityStyle Previously, //content used SSLStatus::security_style to express an opinion about the overall security state of the page. SecurityStateModel/ChromeSecurityStateModelClient used this SecurityStyle as a starting point, applying Chrome-specific policies such as SHA1 deprecation to produce a SecurityLevel, which corresponds to the lock icon. Then, for conveying the security state of a page back to DevTools, the SecurityLevel would get converted back into a SecurityStyle (often a different SecurityStyle than what //content assigned in SSLStatus::security_style). Additionally, SecurityStyles are used to convey per-request security info to DevTools. This CL removes SSLStatus::security_style, so that //content no longer assigns an overall security state to a page. This means that SecurityStyles are now only used to convey security information (per-page or per-request) to DevTools. We only convert from SecurityLevels to SecurityStyles, and never the other way around. Since content::SecurityStyle no longer serves any purpose besides ferrying information to devtools, I removed content::SecurityStyle and just use blink::WebSecurityStyle everywhere (which has been pulled out into its own file, from blink::WebURLResponse::SecurityStyle). This should hopefully make SecurityLevel/SecurityStyle less confusing, and remove the temptation to use SSLStatus::security_style as an indicator of overall page security state instead of the embedder-specific SecurityLevel. BUG=648326 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/47ba9c7d92885d137c51b462d8af87e3f3a6ecdd Cr-Commit-Position: refs/heads/master@{#424436}

Patch Set 1 #

Total comments: 16

Patch Set 2 : rebase #

Total comments: 2

Patch Set 3 : build and test fixes; felt comments #

Total comments: 5

Patch Set 4 : jam comment: remove unnecessary translation #

Patch Set 5 : content::SecurityStyle is dead, long live blink::WebSecurityStyle #

Patch Set 6 : rebase #

Patch Set 7 : rebase fix #

Total comments: 2

Patch Set 8 : fix captive portal browser tests #

Patch Set 9 : more curly braces #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -468 lines) Patch
M android_webview/native/aw_autofill_client.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/policy/policy_auditor.cc View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -22 lines 0 comments Download
M chrome/browser/ssl/bad_clock_blocking_page.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ssl/captive_portal_blocking_page.cc View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ssl/chrome_security_state_model_client.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ssl/chrome_security_state_model_client.cc View 1 2 3 4 7 chunks +11 lines, -49 lines 0 comments Download
M chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc View 1 2 3 4 5 10 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/ssl/ssl_blocking_page.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 17 chunks +54 lines, -31 lines 0 comments Download
M chrome/browser/ui/autofill/chrome_autofill_client.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/security_state/security_state_model.h View 1 chunk +1 line, -3 lines 0 comments Download
M components/security_state/security_state_model.cc View 10 chunks +73 lines, -95 lines 0 comments Download
M components/security_state/security_state_model_client.h View 1 chunk +0 lines, -3 lines 0 comments Download
M components/security_state/security_state_model_unittest.cc View 10 chunks +1 line, -17 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/devtools/protocol/security_handler.h View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/devtools/protocol/security_handler.cc View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_resource_handler.cc View 2 chunks +1 line, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/ssl/ssl_manager.cc View 1 2 3 4 5 5 chunks +4 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 chunks +31 lines, -29 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
D content/common/security_style_util.h View 1 chunk +0 lines, -24 lines 0 comments Download
D content/common/security_style_util.cc View 1 chunk +0 lines, -31 lines 0 comments Download
M content/public/browser/security_style_explanations.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M content/public/browser/security_style_explanations.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/browser/ssl_status.h View 3 chunks +5 lines, -7 lines 0 comments Download
M content/public/browser/ssl_status.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M content/public/browser/web_contents_observer.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/common/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
D content/public/common/security_style.h View 1 2 3 4 1 chunk +0 lines, -44 lines 0 comments Download
M ios/chrome/browser/ssl/ios_chrome_security_state_model_client.h View 1 chunk +0 lines, -1 line 0 comments Download
M ios/chrome/browser/ssl/ios_chrome_security_state_model_client.mm View 2 chunks +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebURLResponse.cpp View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebSecurityStyle.h View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebURLResponse.h View 1 2 3 4 3 chunks +3 lines, -9 lines 0 comments Download

Messages

Total messages: 63 (44 generated)
estark
felt, could you do a first pass over this before I send to owners? (I ...
4 years, 2 months ago (2016-10-06 22:00:18 UTC) #10
felt
https://codereview.chromium.org/2400673003/diff/1/android_webview/native/aw_autofill_client.cc File android_webview/native/aw_autofill_client.cc (right): https://codereview.chromium.org/2400673003/diff/1/android_webview/native/aw_autofill_client.cc#newcode199 android_webview/native/aw_autofill_client.cc:199: return navigation_entry->GetURL().SchemeIsCryptographic() && On 2016/10/06 22:00:17, estark wrote: > ...
4 years, 2 months ago (2016-10-07 03:30:48 UTC) #13
felt
https://codereview.chromium.org/2400673003/diff/20001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/2400673003/diff/20001/content/child/web_url_loader_impl.cc#newcode107 content/child/web_url_loader_impl.cc:107: // differently if they use SHA1 signatures.) https://crbug.com/648326 Leaving ...
4 years, 2 months ago (2016-10-07 03:33:29 UTC) #14
estark
Thanks felt. https://codereview.chromium.org/2400673003/diff/1/android_webview/native/aw_autofill_client.cc File android_webview/native/aw_autofill_client.cc (right): https://codereview.chromium.org/2400673003/diff/1/android_webview/native/aw_autofill_client.cc#newcode199 android_webview/native/aw_autofill_client.cc:199: return navigation_entry->GetURL().SchemeIsCryptographic() && On 2016/10/07 03:30:47, felt ...
4 years, 2 months ago (2016-10-07 06:34:31 UTC) #17
felt
approach looks good, on balance i think this is an improvement https://codereview.chromium.org/2400673003/diff/1/android_webview/native/aw_autofill_client.cc File android_webview/native/aw_autofill_client.cc (right): ...
4 years, 2 months ago (2016-10-07 15:08:10 UTC) #20
estark
jam: another clean-up for you to take a look at, please! I tried to explain ...
4 years, 2 months ago (2016-10-07 19:14:57 UTC) #22
jam
https://codereview.chromium.org/2400673003/diff/40001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/2400673003/diff/40001/content/child/web_url_loader_impl.cc#newcode100 content/child/web_url_loader_impl.cc:100: // TODO(estark): Figure out a way for the embedder ...
4 years, 2 months ago (2016-10-10 15:59:01 UTC) #23
estark
https://codereview.chromium.org/2400673003/diff/40001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/2400673003/diff/40001/content/child/web_url_loader_impl.cc#newcode100 content/child/web_url_loader_impl.cc:100: // TODO(estark): Figure out a way for the embedder ...
4 years, 2 months ago (2016-10-10 18:20:40 UTC) #26
jam
lgtm I found these multiple enums confusing when I was working in this area, so ...
4 years, 2 months ago (2016-10-10 20:13:21 UTC) #29
estark
On 2016/10/10 20:13:21, jam wrote: > lgtm > > I found these multiple enums confusing ...
4 years, 2 months ago (2016-10-10 22:58:27 UTC) #36
estark
+meacer: can you please review content/public/common/common_param_traits_macros.h? (Lucky you, only one file out of this disgustingly ...
4 years, 2 months ago (2016-10-10 23:01:47 UTC) #39
meacer
common_param_traits_macros.h lgtm. https://codereview.chromium.org/2400673003/diff/120001/chrome/browser/android/policy/policy_auditor.cc File chrome/browser/android/policy/policy_auditor.cc (right): https://codereview.chromium.org/2400673003/diff/120001/chrome/browser/android/policy/policy_auditor.cc#newcode53 chrome/browser/android/policy/policy_auditor.cc:53: return CERTIFICATE_FAIL_UNSPECIFIED; nit: maybe it's me, but ...
4 years, 2 months ago (2016-10-10 23:43:17 UTC) #44
estark
https://codereview.chromium.org/2400673003/diff/120001/chrome/browser/android/policy/policy_auditor.cc File chrome/browser/android/policy/policy_auditor.cc (right): https://codereview.chromium.org/2400673003/diff/120001/chrome/browser/android/policy/policy_auditor.cc#newcode53 chrome/browser/android/policy/policy_auditor.cc:53: return CERTIFICATE_FAIL_UNSPECIFIED; On 2016/10/10 23:43:17, Mustafa Emre Acer wrote: ...
4 years, 2 months ago (2016-10-11 01:16:28 UTC) #50
felt
still lgtm
4 years, 2 months ago (2016-10-11 13:45:26 UTC) #54
jam
lgtm
4 years, 2 months ago (2016-10-11 15:31:27 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2400673003/160001
4 years, 2 months ago (2016-10-11 15:33:55 UTC) #58
estark
cc lgarron since your WARNING CL will conflict with this, sorry :(
4 years, 2 months ago (2016-10-11 15:34:18 UTC) #59
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-11 15:40:38 UTC) #61
commit-bot: I haz the power
4 years, 2 months ago (2016-10-11 15:43:33 UTC) #63
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/47ba9c7d92885d137c51b462d8af87e3f3a6ecdd
Cr-Commit-Position: refs/heads/master@{#424436}

Powered by Google App Engine
This is Rietveld 408576698