Re-revert of "Remove SSLClientAuthHandler's RDH dependency." (https://codereview...
commit78fee7dab63602d70b5fe3f58ee114d2968187a6
authordavidben <davidben@chromium.org>
Wed, 3 Dec 2014 19:41:51 +0000 (3 11:41 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 3 Dec 2014 19:42:30 +0000 (3 19:42 +0000)
treec06da125d52b7d39029512389f6cbb9005c68c60
parent426c5c108f7d63cfe388a0442c31cd1e7f006e34
Re-revert of "Remove SSLClientAuthHandler's RDH dependency." (https://codereview.chromium.org/596873002)

Reason for revert:
Causes browser crash if URL request is cancelled during client cert loading.

This is a reland of https://codereview.chromium.org/766463002/ which reverted
https://codereview.chromium.org/596873002. The revert was reverted because it
introduced a memory leak.

The source of this memory leak was a reference cycle in
chrome/browser/chromeos/net/client_cert_filter_chromeos.cc whose fix is
included in this CL. If InitIfSlotsAvailable returns true (synchronously), the
callback should not be retained. This was not a problem before as the code in
question was introduced after https://codereview.chromium.org/596873002 which
unrefcounted an object.

After this is merged into M-40, https://codereview.chromium.org/596873002
should be reworked with the crash fixed as this reference cycle is too subtle
and the object really needn't be reference-counted.

TBR=mmenke@chromium.org,benm@chromium.org,jam@chromium.org

BUG=422765, 427844, 376003

Review URL: https://codereview.chromium.org/773003004

Cr-Commit-Position: refs/heads/master@{#306649}
26 files changed:
android_webview/browser/aw_content_browser_client.cc
android_webview/browser/aw_content_browser_client.h
chrome/browser/chrome_content_browser_client.cc
chrome/browser/chrome_content_browser_client.h
chrome/browser/chromeos/net/client_cert_filter_chromeos.cc
chrome/browser/ssl/ssl_client_auth_observer.cc
chrome/browser/ssl/ssl_client_auth_observer.h
chrome/browser/ssl/ssl_client_auth_requestor_mock.cc
chrome/browser/ssl/ssl_client_auth_requestor_mock.h
chrome/browser/ssl/ssl_client_certificate_selector.h
chrome/browser/ui/android/ssl_client_certificate_request.cc
chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h
chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm
chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm
chrome/browser/ui/views/ssl_client_certificate_selector.cc
chrome/browser/ui/views/ssl_client_certificate_selector.h
chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc
content/browser/loader/resource_dispatcher_host_impl.cc
content/browser/loader/resource_dispatcher_host_impl.h
content/browser/loader/resource_loader.cc
content/browser/loader/resource_loader.h
content/browser/loader/resource_loader_unittest.cc
content/browser/ssl/ssl_client_auth_handler.cc
content/browser/ssl/ssl_client_auth_handler.h
content/public/browser/content_browser_client.cc
content/public/browser/content_browser_client.h