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

Issue 1440303002: Componentize SecurityStateModel (Closed)

Created:
5 years, 1 month ago by estark
Modified:
4 years, 11 months ago
Reviewers:
blundell
CC:
chromium-reviews, extensions-reviews_chromium.org, msramek+watch_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org, tfarina, dzhioev+watch_chromium.org, achuith+watch_chromium.org, raymes+watch_chromium.org, oshima+watch_chromium.org, blundell+watchlist_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_, James Su, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Componentize SecurityStateModel This CL componentizes SecurityStateModel so that some of its logic can eventually be used on iOS. SecurityStateModel has a delegate interface to provide information that it needs to compute the security info for a page or request. ChromeSecurityStateModelDelegate, in chrome/browser/ssl, is associated with a WebContents and uses that WebContents to implement the delegate interface. ChromeSecurityStateModelDelegate also exposes the SecurityStateModel's main method, GetSecurityInfo(), so that WebContents consumers can access the security info for a WebContents. BUG=515071

Patch Set 1 : more fixes... #

Patch Set 2 : build fixes #

Patch Set 3 : rebase #

Patch Set 4 : BUILD.gn #

Patch Set 5 : refactor to reduce number of files touched in this CL #

Patch Set 6 : rebase #

Patch Set 7 : android fixes #

Patch Set 8 : set delegate #

Patch Set 9 : rebase #

Patch Set 10 : android/cros fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1147 lines, -1380 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
A chrome/browser/ssl/chrome_security_state_model_delegate.h View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/ssl/chrome_security_state_model_delegate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +168 lines, -0 lines 0 comments Download
A + chrome/browser/ssl/chrome_security_state_model_delegate_browser_tests.cc View 1 2 3 4 26 chunks +83 lines, -101 lines 0 comments Download
D chrome/browser/ssl/security_state_model.h View 1 2 3 4 2 chunks +9 lines, -116 lines 0 comments Download
D chrome/browser/ssl/security_state_model.cc View 1 chunk +0 lines, -271 lines 0 comments Download
M chrome/browser/ssl/security_state_model_android.cc View 1 2 3 4 5 6 7 8 9 4 chunks +20 lines, -17 lines 0 comments Download
D chrome/browser/ssl/security_state_model_browser_tests.cc View 1 chunk +0 lines, -503 lines 0 comments Download
D chrome/browser/ssl/security_state_model_unittest.cc View 1 chunk +0 lines, -154 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 3 chunks +13 lines, -7 lines 0 comments Download
M chrome/browser/ui/android/bluetooth_chooser_android.cc View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/android/connection_info_popup_android.cc View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/android/website_settings_popup_android.cc View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 7 chunks +27 lines, -24 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/extensions/hosted_app_browser_controller.cc View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.cc View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/frame/web_app_left_header_view_ash.cc View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/page_info_helper.cc View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings.h View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings.cc View 8 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_unittest.cc View 20 chunks +23 lines, -27 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 6 7 8 14 chunks +77 lines, -74 lines 0 comments Download
M components/components.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
A + components/security_state.gypi View 1 chunk +6 lines, -8 lines 0 comments Download
A + components/security_state/BUILD.gn View 2 chunks +5 lines, -8 lines 0 comments Download
A + components/security_state/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
A components/security_state/OWNERS View 1 chunk +3 lines, -0 lines 0 comments Download
A components/security_state/security_state_model.h View 1 chunk +146 lines, -0 lines 0 comments Download
A components/security_state/security_state_model.cc View 1 chunk +185 lines, -0 lines 0 comments Download
A components/security_state/security_state_model_delegate.h View 1 1 chunk +55 lines, -0 lines 0 comments Download
A components/security_state/security_state_model_unittest.cc View 1 chunk +177 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (7 generated)
estark
blundell, could you please take a preliminary look at this? Here are some additional caveats: ...
5 years, 1 month ago (2015-11-20 01:07:56 UTC) #8
blundell
Hi Emily, I scanned this CL, and at a high level, it looks great. It's ...
5 years, 1 month ago (2015-11-20 10:58:53 UTC) #9
estark
5 years, 1 month ago (2015-11-20 22:01:34 UTC) #10
On 2015/11/20 10:58:53, blundell wrote:
> Hi Emily,
> 
> I scanned this CL, and at a high level, it looks great. It's quite large and
> doing several things; I'd prefer to see it split up into several CLs to be
able
> to really drill down into the details effectively and make sure we're not
> introducing any regressions during the refactoring. Here's the split that I
> would suggest:
> 
> (1) Introduction of security_state_model_delegate.h with one or two methods
and
> chrome_security_state_model_delegate.* with implementations of those methods.
In
> this CL SecurityStateModel can simply have a
> scoped_ptr<SecurityStateModelDelegate> that it internally populates with a
> ChromeSecurityStateModelDelegate instance.
> 
> (2) Change of the ownership structure so that ChromeSecurityStateModelDelegate
> is the WebContentsUserData and SecurityStateModel is owned by it instead of
> owning it, eliminating the knowledge of SecurityStateModel about
> ChromeSecurityStateModelDelegate.
> 
> (3) CL (or CLs, depending on how large an amount of work it is) moving all of
> the problematic dependencies out of SecurityStateModel into
> ChromeSecurityStateModelDelegate via the SecurityStateModelDelegate interface.
> 
> (4) Componentization of SecurityStateModel, which should be trivial once
you've
> gotten to this point.
> 
> How does that sound?

That sounds totally reasonable, thanks!

Powered by Google App Engine
This is Rietveld 408576698