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

Issue 2408393003: Manage insecure content flags in SSLManager, not WebContentsImpl (Closed)

Created:
4 years, 2 months ago by estark
Modified:
4 years, 2 months ago
Reviewers:
jam
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, nasko+codewatch_chromium.org, creis+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org, clamy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Manage insecure content flags in SSLManager, not WebContentsImpl Previously, WebContentsImpl managed various flags related to insecure content, and SSLManager::UpdateEntry() read these flags and transferred them on to the NavigationEntry's SSLStatus. Now, instead of managing state itself, WebContentsImpl simply passes on the relevant signals to SSLManager, which tweaks the flags on the SSLStatus directly rather than by reading them off the WebContents. This CL also does a related clean-up of making SSLManager::NotifySSLInternalStateChanged() private; it should not need to be called externally and I'm not sure why it ever was, since SSLManager calls it itself after making relevant internal state changes. The advantages of this are: 1. Simplifies the WebContents interface and removes unnecessary state on WebContentsImpl. 2. Fixes an odd, arguably buggy navigation flow. Previously, when a navigation committed, SSLManager::UpdateEntry() would read the flags from the WebContentsImpl which were still corresponding to the *previous* navigation entry. Only in a post-commit task would WebContentsImpl clear the flags and call UpdateEntry() again. This was probably never a visible bug because the oddity only existed between DidCommitProvisionalLoad() and post-commit tasks, but it was still weird to have any length of time in which the SSLStatus was influenced by the previous navigation's state. Now, when a navigation commits, we copy over the previous navigation's content status flags only when it makes sense (i.e. on non-main-frame navigations), instead of copying them and then later clearing them as we were doing before. BUG= TEST=essentially a refactor and should be covered by existing automated tests Committed: https://crrev.com/c227350dad3ca799c3f55457e9e974f839f0ad76 Cr-Commit-Position: refs/heads/master@{#424876}

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix test failure #

Patch Set 3 : fix test failure #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -155 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 4 chunks +17 lines, -7 lines 0 comments Download
M content/browser/ssl/ssl_manager.h View 1 4 chunks +27 lines, -11 lines 0 comments Download
M content/browser/ssl/ssl_manager.cc View 1 9 chunks +63 lines, -57 lines 1 comment Download
M content/browser/web_contents/web_contents_impl.h View 2 chunks +0 lines, -28 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 7 chunks +5 lines, -48 lines 0 comments Download

Messages

Total messages: 26 (17 generated)
estark
clamy, could you please review?
4 years, 2 months ago (2016-10-12 06:39:22 UTC) #4
estark
https://codereview.chromium.org/2408393003/diff/1/content/browser/ssl/ssl_manager.cc File content/browser/ssl/ssl_manager.cc (left): https://codereview.chromium.org/2408393003/diff/1/content/browser/ssl/ssl_manager.cc#oldcode374 content/browser/ssl/ssl_manager.cc:374: entry->GetSSL().content_status &= ~SSLStatus::DISPLAYED_INSECURE_CONTENT; You might notice here that we ...
4 years, 2 months ago (2016-10-12 07:01:19 UTC) #5
estark
Oops. There was a test failure that made me realize that this might not make ...
4 years, 2 months ago (2016-10-12 08:12:07 UTC) #8
estark
Ok, I think this is ready for review now. (I had missed the fact that ...
4 years, 2 months ago (2016-10-12 19:19:33 UTC) #16
estark
https://codereview.chromium.org/2408393003/diff/40001/content/browser/ssl/ssl_manager.cc File content/browser/ssl/ssl_manager.cc (right): https://codereview.chromium.org/2408393003/diff/40001/content/browser/ssl/ssl_manager.cc#newcode410 content/browser/ssl/ssl_manager.cc:410: void SSLManager::NotifySSLInternalStateChanged(BrowserContext* context) { A note about why this ...
4 years, 2 months ago (2016-10-12 19:21:26 UTC) #17
jam
lgtm
4 years, 2 months ago (2016-10-12 21:30:44 UTC) #18
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/2408393003/40001
4 years, 2 months ago (2016-10-12 21:56:18 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-12 22:03:36 UTC) #24
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 22:06:07 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/c227350dad3ca799c3f55457e9e974f839f0ad76
Cr-Commit-Position: refs/heads/master@{#424876}

Powered by Google App Engine
This is Rietveld 408576698