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

Issue 2220603003: Remove unnecessary |result| argument from AllowCertificateError() (Closed)

Created:
4 years, 4 months ago by estark
Modified:
4 years, 4 months ago
Reviewers:
alokp, boliu, nasko, Dan Beam
CC:
chromium-reviews, lcwu+watch_chromium.org, jam, darin-cc_chromium.org, halliwell+watch_chromium.org, alokp+watch_chromium.org, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove unnecessary |result| argument from AllowCertificateError() ContentBrowserClient::AllowCertificateError() previously took a |result| argument, which looks like it was basically a shortcut to save embedders from having to call the callback. When an embedder set the |result| argument, SSLPolicy would call the appropriate SSLCertErrorHandler method to continue or cancel the request. If the embedder didn't set the |result| argument, then the embedder was responsible for calling the callback, which would in turn call the appropriate SSLCertErrorHandler method. This CL removes the |result| argument and changes the |callback| argument from a bool to an enum so that the embedder has a little bit more control over how the callback cancels the request. In addition to being a general clean-up/simplification, this change paves the way for making SSLErrorHandler not-refcounted. A follow-up CL will make SSLErrorHandler live on the UI thread only, and AllowCertificateError()'s |callback| will take ownership of the SSLErrorHandler. (Right now, the SSLErrorHandler is shared between SSLPolicy and the callback. Removing the |result| argument means that SSLPolicy no longer needs to retain a reference to the SSLErrorHandler.) BUG=558491 Committed: https://crrev.com/719dde5b353db3cf9af7e030f79eb1bc4fb9b84b Cr-Commit-Position: refs/heads/master@{#410560}

Patch Set 1 #

Patch Set 2 : android fix #

Total comments: 6

Patch Set 3 : nasko comments #

Total comments: 2

Patch Set 4 : remove unnecessary include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -129 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M android_webview/browser/aw_contents_client_bridge_base.h View 1 2 chunks +8 lines, -5 lines 0 comments Download
M android_webview/native/aw_contents_client_bridge.h View 2 chunks +9 lines, -6 lines 0 comments Download
M android_webview/native/aw_contents_client_bridge.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ssl/bad_clock_blocking_page.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ssl/bad_clock_blocking_page.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ssl/captive_portal_blocking_page.h View 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ssl/captive_portal_blocking_page.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ssl/ssl_blocking_page.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ssl/ssl_blocking_page.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_error_handler.h View 3 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/ssl/ssl_error_handler.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ssl/ssl_error_handler_unittest.cc View 1 chunk +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/interstitials/interstitial_ui.cc View 4 chunks +12 lines, -8 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/ssl/ssl_policy.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/ssl/ssl_policy.cc View 2 chunks +25 lines, -35 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 chunk +11 lines, -13 lines 0 comments Download

Messages

Total messages: 24 (13 generated)
estark
Hi Nasko, this the first of two CLs that clean up content::SSLErrorHandler and make it ...
4 years, 4 months ago (2016-08-08 17:02:29 UTC) #10
estark
On 2016/08/08 17:02:29, estark wrote: > Hi Nasko, this the first of two CLs that ...
4 years, 4 months ago (2016-08-08 17:42:22 UTC) #11
nasko
Thanks for working on this! LGTM https://codereview.chromium.org/2220603003/diff/20001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/2220603003/diff/20001/android_webview/browser/aw_content_browser_client.cc#newcode366 android_webview/browser/aw_content_browser_client.cc:366: if (cancel_request) { ...
4 years, 4 months ago (2016-08-08 18:32:04 UTC) #12
estark
Thanks Nasko! alokp, can you please review chromecast/? dbeam, can you please review chrome/browser/ui/webui? boliu, ...
4 years, 4 months ago (2016-08-08 20:00:13 UTC) #14
boliu
lgtm % include suggest making base::Callback<void(CertificateRequestResultType)> an alias in content, so all the clients don't ...
4 years, 4 months ago (2016-08-08 20:15:49 UTC) #15
alokp
chromecast/ lgtm
4 years, 4 months ago (2016-08-08 21:33:00 UTC) #16
Dan Beam
rs lgtm
4 years, 4 months ago (2016-08-09 01:37:58 UTC) #17
estark
Thanks all. boliu I like your suggestion to alias the callback and filed a bug ...
4 years, 4 months ago (2016-08-09 02:16:49 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/2220603003/60001
4 years, 4 months ago (2016-08-09 02:17:57 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-09 03:17:20 UTC) #22
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 03:20:26 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/719dde5b353db3cf9af7e030f79eb1bc4fb9b84b
Cr-Commit-Position: refs/heads/master@{#410560}

Powered by Google App Engine
This is Rietveld 408576698