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

Issue 1314843007: Refactor connection_security into SecurityStateModel (Closed)

Created:
5 years, 3 months ago by estark
Modified:
5 years, 3 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, tfarina, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, James Su, felt
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor connection_security into SecurityStateModel This CL refactors the connection_security namespace (a namespace of statics) into SecurityStateModel, a class attached to a WebContents that drives the security UI for that WebContents. The SecurityStateModel provides high-level security information about a page or request, with the goal of reducing code duplication across various security UI elements. In this first CL, I've introduced the SecurityStateModel and am using it to drive the omnibox/lock icon, but have not yet adapted WebsiteSettings to use a SecurityStateModel. BUG=528034 TBR=sky@chromium.org Committed: https://crrev.com/83a81afbef8f265815cb6c6a48690511825a1ce5 Cr-Commit-Position: refs/heads/master@{#347775}

Patch Set 1 #

Patch Set 2 : check for passive mixed content in android connection strign #

Patch Set 3 : SecurityInfo tweaks #

Patch Set 4 : rebase #

Patch Set 5 : rebase fix up and other cleanups #

Total comments: 1

Patch Set 6 : fix browser test pulled in from rebase #

Patch Set 7 : add SecurityStateModel browser tests; update toolbar model unit tests #

Total comments: 14

Patch Set 8 : palmer comments #

Total comments: 6

Patch Set 9 : palmer comments #2 #

Total comments: 14

Patch Set 10 : rebase #

Patch Set 11 : pkasting comments #

Total comments: 10

Patch Set 12 : avi comments #

Total comments: 6

Patch Set 13 : rebase #

Patch Set 14 : tedchoc comments #

Patch Set 15 : rebase #

Patch Set 16 : rebase fixups #

Patch Set 17 : create SecurityStateModel for chromeos login webview #

Unified diffs Side-by-side diffs Delta from patch set Stats (+922 lines, -699 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 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 14 15 5 chunks +14 lines, -9 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/ssl/ConnectionSecurity.java View 1 chunk +0 lines, -29 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +49 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java View 2 chunks +0 lines, -11 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 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/android/chrome_web_contents_delegate_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_web_contents_delegate_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -0 lines 0 comments Download
D chrome/browser/ssl/connection_security.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -121 lines 0 comments Download
D chrome/browser/ssl/connection_security.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -238 lines 0 comments Download
D chrome/browser/ssl/connection_security_android.h View 1 chunk +0 lines, -12 lines 0 comments Download
D chrome/browser/ssl/connection_security_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -26 lines 0 comments Download
A chrome/browser/ssl/security_state_model.h View 1 2 3 4 5 6 7 1 chunk +152 lines, -0 lines 0 comments Download
A + chrome/browser/ssl/security_state_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +109 lines, -98 lines 0 comments Download
A chrome/browser/ssl/security_state_model_android.h View 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/browser/ssl/security_state_model_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/ssl/security_state_model_browser_tests.cc View 1 2 3 4 5 6 1 chunk +331 lines, -0 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -13 lines 0 comments Download
M chrome/browser/ui/android/bluetooth_chooser_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -2 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 12 13 14 1 chunk +0 lines, -35 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +50 lines, -17 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 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 7 8 9 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/extensions/hosted_app_browser_controller.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/chrome_toolbar_model.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.h View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.h View 2 chunks +2 lines, -2 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 5 chunks +23 lines, -16 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_unittest.cc View 1 2 3 4 5 6 4 chunks +16 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 7 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 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 6 7 8 9 4 chunks +5 lines, -6 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 1 chunk +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 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.h View 1 chunk +1 line, -1 line 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/frame_host/interstitial_page_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 40 (13 generated)
estark
palmer, lgarron: could you please take a preliminary look at this unfortunately giant CL? A ...
5 years, 3 months ago (2015-08-31 19:24:09 UTC) #2
estark
Added some SecurityStateModel browser tests and updated/fixed some other pre-existing tests
5 years, 3 months ago (2015-08-31 23:11:29 UTC) #3
palmer
(will look more later) https://codereview.chromium.org/1314843007/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java File chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java (right): https://codereview.chromium.org/1314843007/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java#newcode270 chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java:270: // Whether the security level ...
5 years, 3 months ago (2015-09-01 17:39:41 UTC) #4
estark
https://codereview.chromium.org/1314843007/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java File chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java (right): https://codereview.chromium.org/1314843007/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java#newcode270 chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java:270: // Whether the security level of the page was ...
5 years, 3 months ago (2015-09-02 16:27:20 UTC) #5
palmer
> I think I haven't yet seen anywhere that Android UI does anything special with ...
5 years, 3 months ago (2015-09-02 20:21:11 UTC) #6
palmer
LGTM % nits. https://codereview.chromium.org/1314843007/diff/140001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/1314843007/diff/140001/chrome/browser/ui/browser.cc#newcode258 chrome/browser/ui/browser.cc:258: // Note: This is a lossy ...
5 years, 3 months ago (2015-09-02 20:37:05 UTC) #7
estark
Thanks palmer! https://codereview.chromium.org/1314843007/diff/140001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/1314843007/diff/140001/chrome/browser/ui/browser.cc#newcode258 chrome/browser/ui/browser.cc:258: // Note: This is a lossy operation. ...
5 years, 3 months ago (2015-09-02 21:46:43 UTC) #8
estark
pkasting, could you please take a look at chrome/browser/ui? Most of the changes in there ...
5 years, 3 months ago (2015-09-02 22:05:27 UTC) #10
Peter Kasting
LGTM https://codereview.chromium.org/1314843007/diff/160001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/1314843007/diff/160001/chrome/browser/ui/browser.cc#newcode276 chrome/browser/ui/browser.cc:276: return content::SECURITY_STYLE_UNKNOWN; Nit: If this is supposed to ...
5 years, 3 months ago (2015-09-03 18:25:53 UTC) #11
estark
Thanks, Peter. tedchoc: could you please review chrome/android, chrome/browser/android, and components/web_contents_delegate_android? Please see my first ...
5 years, 3 months ago (2015-09-03 22:11:58 UTC) #14
Avi (use Gerrit)
This seems slightly suboptimal. Why not attach the SSM with all the other tab helpers? ...
5 years, 3 months ago (2015-09-03 22:57:36 UTC) #15
estark
Thanks avi, I had somehow missed the existence of tab_helpers.cc, so I put the SecurityStateModel ...
5 years, 3 months ago (2015-09-03 23:16:40 UTC) #16
Avi (use Gerrit)
lgtm Make it so. https://codereview.chromium.org/1314843007/diff/220001/chrome/browser/ui/toolbar/toolbar_model_impl.cc File chrome/browser/ui/toolbar/toolbar_model_impl.cc (right): https://codereview.chromium.org/1314843007/diff/220001/chrome/browser/ui/toolbar/toolbar_model_impl.cc#newcode121 chrome/browser/ui/toolbar/toolbar_model_impl.cc:121: // not yet been called), ...
5 years, 3 months ago (2015-09-03 23:21:11 UTC) #17
Ted C
https://codereview.chromium.org/1314843007/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java File chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java (right): https://codereview.chromium.org/1314843007/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java#newcode13 chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java:13: /** Notify that the security state has changed for ...
5 years, 3 months ago (2015-09-04 00:36:50 UTC) #18
estark
https://codereview.chromium.org/1314843007/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java File chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java (right): https://codereview.chromium.org/1314843007/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java#newcode13 chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java:13: /** Notify that the security state has changed for ...
5 years, 3 months ago (2015-09-04 16:53:09 UTC) #19
Ted C
On 2015/09/04 16:53:09, estark wrote: > https://codereview.chromium.org/1314843007/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java > File > chrome/android/java/src/org/chromium/chrome/browser/ssl/SecurityStateModel.java > (right): > > ...
5 years, 3 months ago (2015-09-04 17:53:45 UTC) #20
estark
Thanks tedchoc! sky: I'm going to TBR the small change to chrome/chrome.gyp, PTAL when you ...
5 years, 3 months ago (2015-09-04 20:02:56 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1314843007/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1314843007/320001
5 years, 3 months ago (2015-09-04 20:03:30 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/99780)
5 years, 3 months ago (2015-09-04 21:44:57 UTC) #27
estark
dzhioev: can you please review chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc? This CL creates a SecurityStateModel class that the ToolbarModel ...
5 years, 3 months ago (2015-09-05 00:06:58 UTC) #30
sky
chrome.gyp LGTM
5 years, 3 months ago (2015-09-08 16:18:03 UTC) #31
dzhioev (left Google)
On 2015/09/05 00:06:58, estark wrote: > dzhioev: can you please review > chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc? chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc LGTM
5 years, 3 months ago (2015-09-08 18:45:47 UTC) #32
estark
On 2015/09/08 18:45:47, dzhioev wrote: > On 2015/09/05 00:06:58, estark wrote: > > dzhioev: can ...
5 years, 3 months ago (2015-09-08 18:47:39 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1314843007/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1314843007/360001
5 years, 3 months ago (2015-09-08 18:50:09 UTC) #36
commit-bot: I haz the power
Committed patchset #17 (id:360001)
5 years, 3 months ago (2015-09-08 20:07:49 UTC) #37
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/83a81afbef8f265815cb6c6a48690511825a1ce5 Cr-Commit-Position: refs/heads/master@{#347775}
5 years, 3 months ago (2015-09-08 20:08:43 UTC) #38
estark
5 years, 3 months ago (2015-09-09 19:36:07 UTC) #39
Message was sent while issue was closed.
A revert of this CL (patchset #17 id:360001) has been created in
https://codereview.chromium.org/1324293003/ by estark@chromium.org.

The reason for reverting is: We need to call SecurityStateChanged() in a few
more places to avoid a crash and some UI bugs. See bugs 529664 and 529872..

Powered by Google App Engine
This is Rietveld 408576698