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

Issue 1123943002: Move SecurityLevel into a class of its own (Closed)

Created:
5 years, 7 months ago by estark
Modified:
5 years, 7 months ago
CC:
chromium-reviews, tfarina, James Su, lgarron, Ryan Sleevi, jdduke (slow), pasko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move SecurityLevel into a class of its own This CL moves |GetSecurityLevelForWebContents| and the |SecurityLevel| enum into a class of their own: |ConnectionSecurityHelper| in //chrome/browser/ssl (since it is applying Chrome-specific security policy to determine the security level of a page). Later, we will use the new |ConnectionSecurityHelper| class to compute a security level for a page to send to the DevTools Security panel. Specifically, we need to be able to calculate the security level for a given page, not just the WebContents for the active tab. BUG=484392 Committed: https://crrev.com/ca7c0a3374c21ab10c821f4f3a890afc79182acf Cr-Commit-Position: refs/heads/master@{#329591} Committed: https://crrev.com/f50c9b4834e151aa6b5538545a503614cb74f5f9 Cr-Commit-Position: refs/heads/master@{#329724}

Patch Set 1 #

Patch Set 2 : fix up android, chromeos, mac builds #

Patch Set 3 : more android build fixes #

Total comments: 25

Patch Set 4 : rebase #

Patch Set 5 : pkasting nits #

Total comments: 13

Patch Set 6 : android build test #

Patch Set 7 : remove unnecessary #includes, re-add TODO #

Patch Set 8 : remove SecurityLevel enum explicit values #

Total comments: 6

Patch Set 9 : pkasting nits #

Patch Set 10 : remove obsolete reference to ToolbarModel from TODO #

Patch Set 11 : revert GetSecurityLevelForNonSecureFieldTrial change #

Total comments: 8

Patch Set 12 : rebase #

Patch Set 13 : felt, rsleevi nits #

Total comments: 6

Patch Set 14 : bauerb comments; style fixes #

Patch Set 15 : rebase #

Patch Set 16 : rebase #

Patch Set 17 : testing: try to reproduce downstream android failure #

Patch Set 18 : add JNI registration for ConnectionSecurityHelper #

Patch Set 19 : register in chrome_jni_registrar #

Unified diffs Side-by-side diffs Delta from patch set Stats (+420 lines, -292 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/Tab.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +16 lines, -15 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java View 1 2 3 4 5 3 chunks +10 lines, -9 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/ssl/ConnectionSecurityHelper.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +29 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +0 lines, -15 lines 0 comments Download
M chrome/android/javatests_shell/src/org/chromium/chrome/browser/TabTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/android/javatests_shell/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +19 lines, -28 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/browser/ssl/connection_security_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/ssl/connection_security_helper.cc View 1 2 3 4 5 9 10 1 chunk +130 lines, -0 lines 0 comments Download
A chrome/browser/ssl/connection_security_helper_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/browser/ssl/connection_security_helper_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/toolbar/toolbar_model_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm View 1 2 3 4 5 6 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.h View 1 2 3 4 5 6 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.cc View 1 2 3 4 5 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model.h View 1 2 3 4 5 4 chunks +5 lines, -33 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +31 lines, -126 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 7 chunks +18 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 3 4 5 4 chunks +8 lines, -5 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 51 (17 generated)
estark
felt, pkasting: could you please take a look? This CL is required for the DevTools ...
5 years, 7 months ago (2015-05-07 05:15:12 UTC) #2
estark
+pkasting@chromium.org, -pkasting@google.com
5 years, 7 months ago (2015-05-07 05:16:17 UTC) #4
felt
https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h#newcode13 chrome/browser/ssl/security_level_policy.h:13: class SecurityLevelPolicy { While this is being moved anyway: ...
5 years, 7 months ago (2015-05-07 20:10:18 UTC) #5
Peter Kasting
https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.cc File chrome/browser/ssl/security_level_policy.cc (right): https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.cc#newcode30 chrome/browser/ssl/security_level_policy.cc:30: using content::SSLStatus; Nit: Avoid this unless is significantly improves ...
5 years, 7 months ago (2015-05-07 21:35:38 UTC) #6
Ryan Sleevi
https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h#newcode19 chrome/browser/ssl/security_level_policy.h:19: // needs to be refined into three levels: warning, ...
5 years, 7 months ago (2015-05-08 00:24:24 UTC) #7
felt
https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h#newcode19 chrome/browser/ssl/security_level_policy.h:19: // needs to be refined into three levels: warning, ...
5 years, 7 months ago (2015-05-08 00:27:23 UTC) #8
estark
Thanks for the comments, everyone. I'm not ready for another round of review yet but ...
5 years, 7 months ago (2015-05-08 04:54:33 UTC) #9
Peter Kasting
https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h#newcode13 chrome/browser/ssl/security_level_policy.h:13: class SecurityLevelPolicy { On 2015/05/08 04:54:32, estark wrote: > ...
5 years, 7 months ago (2015-05-08 06:38:01 UTC) #10
estark
https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h#newcode13 chrome/browser/ssl/security_level_policy.h:13: class SecurityLevelPolicy { On 2015/05/08 06:38:00, Peter Kasting wrote: ...
5 years, 7 months ago (2015-05-08 14:16:00 UTC) #11
Peter Kasting
On 2015/05/08 14:16:00, estark wrote: > https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h > File chrome/browser/ssl/security_level_policy.h (right): > > https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.h#newcode13 > ...
5 years, 7 months ago (2015-05-08 21:32:53 UTC) #13
estark
Ok, I think this is ready for another look now, please. https://codereview.chromium.org/1123943002/diff/40001/chrome/browser/ssl/security_level_policy.cc File chrome/browser/ssl/security_level_policy.cc (right): ...
5 years, 7 months ago (2015-05-09 02:29:09 UTC) #17
Peter Kasting
LGTM https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc File chrome/browser/ssl/connection_security_helper.cc (right): https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc#newcode35 chrome/browser/ssl/connection_security_helper.cc:35: std::string choice = Nit: There are two ways ...
5 years, 7 months ago (2015-05-09 04:34:57 UTC) #18
estark
Thanks pkasting. felt: can you please take a look at //c/b/ssl? After that I'll add ...
5 years, 7 months ago (2015-05-11 01:59:26 UTC) #19
Peter Kasting
https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc File chrome/browser/ssl/connection_security_helper.cc (right): https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc#newcode35 chrome/browser/ssl/connection_security_helper.cc:35: std::string choice = On 2015/05/11 01:59:25, estark wrote: > ...
5 years, 7 months ago (2015-05-11 19:15:46 UTC) #20
estark
https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc File chrome/browser/ssl/connection_security_helper.cc (right): https://codereview.chromium.org/1123943002/diff/210001/chrome/browser/ssl/connection_security_helper.cc#newcode35 chrome/browser/ssl/connection_security_helper.cc:35: std::string choice = On 2015/05/11 19:15:46, Peter Kasting wrote: ...
5 years, 7 months ago (2015-05-11 19:20:09 UTC) #21
felt
c/b/ssl lgtm https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h File chrome/browser/ssl/security_level_policy.h (right): https://codereview.chromium.org/1123943002/diff/80001/chrome/browser/ssl/security_level_policy.h#newcode24 chrome/browser/ssl/security_level_policy.h:24: enum SecurityLevel { On 2015/05/09 02:29:08, estark ...
5 years, 7 months ago (2015-05-12 00:01:27 UTC) #22
Ryan Sleevi
LGTM, although a few nits. I do have an allergic reaction to *Helper classes, much ...
5 years, 7 months ago (2015-05-12 01:03:29 UTC) #24
estark
Thanks felt, rsleevi. bauerb: can you please take a look at changes in //chrome/android? rsleevi: ...
5 years, 7 months ago (2015-05-12 04:37:48 UTC) #26
Bernhard Bauer
Android LGTM with nits: https://codereview.chromium.org/1123943002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java File chrome/android/java/src/org/chromium/chrome/browser/Tab.java (right): https://codereview.chromium.org/1123943002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java#newcode1147 chrome/android/java/src/org/chromium/chrome/browser/Tab.java:1147: * @return The current {ConnectionSecurityHelperSecurityLevel} ...
5 years, 7 months ago (2015-05-12 10:09:41 UTC) #27
estark
Thanks bauerb. sky@: can you please review chrome/chrome.gyp? https://codereview.chromium.org/1123943002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java File chrome/android/java/src/org/chromium/chrome/browser/Tab.java (right): https://codereview.chromium.org/1123943002/diff/310001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java#newcode1147 chrome/android/java/src/org/chromium/chrome/browser/Tab.java:1147: * ...
5 years, 7 months ago (2015-05-12 17:07:50 UTC) #29
sky
LGTM
5 years, 7 months ago (2015-05-12 19:33:02 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1123943002/350001
5 years, 7 months ago (2015-05-13 04:36:24 UTC) #33
estark
https://codereview.chromium.org/1123943002/diff/270001/chrome/browser/ssl/connection_security_helper.cc File chrome/browser/ssl/connection_security_helper.cc (right): https://codereview.chromium.org/1123943002/diff/270001/chrome/browser/ssl/connection_security_helper.cc#newcode76 chrome/browser/ssl/connection_security_helper.cc:76: if (url.SchemeIs(url::kHttpScheme) || url.SchemeIs(url::kFtpScheme)) On 2015/05/12 04:37:48, estark wrote: ...
5 years, 7 months ago (2015-05-13 04:37:15 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/24399) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 7 months ago (2015-05-13 04:40:02 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1123943002/370001
5 years, 7 months ago (2015-05-13 04:46:23 UTC) #39
commit-bot: I haz the power
Committed patchset #16 (id:370001)
5 years, 7 months ago (2015-05-13 05:37:49 UTC) #40
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/ca7c0a3374c21ab10c821f4f3a890afc79182acf Cr-Commit-Position: refs/heads/master@{#329591}
5 years, 7 months ago (2015-05-13 05:38:36 UTC) #41
estark
A revert of this CL (patchset #16 id:370001) has been created in https://codereview.chromium.org/1138473003/ by estark@chromium.org. ...
5 years, 7 months ago (2015-05-13 16:33:39 UTC) #42
estark
tedchoc: could you please take a look at the JNI registration for ConnectionSecurityHelper? I also ...
5 years, 7 months ago (2015-05-13 20:08:08 UTC) #44
Ted C
On 2015/05/13 20:08:08, estark wrote: > tedchoc: could you please take a look at the ...
5 years, 7 months ago (2015-05-13 20:19:39 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1123943002/420001
5 years, 7 months ago (2015-05-13 20:23:07 UTC) #48
commit-bot: I haz the power
Committed patchset #19 (id:420001)
5 years, 7 months ago (2015-05-13 22:02:47 UTC) #49
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/f50c9b4834e151aa6b5538545a503614cb74f5f9 Cr-Commit-Position: refs/heads/master@{#329724}
5 years, 7 months ago (2015-05-13 22:03:42 UTC) #50
sergeyv
5 years, 7 months ago (2015-05-14 10:54:25 UTC) #51
Message was sent while issue was closed.
A revert of this CL (patchset #19 id:420001) has been created in
https://codereview.chromium.org/1135373003/ by sergeyv@chromium.org.

The reason for reverting is: Android Tests dbg bot is failing:
http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20(dbg)

Failure example:
http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%...
.

Powered by Google App Engine
This is Rietveld 408576698