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

Unified Diff: net/base/cert_verifier.cc

Issue 4669003: Revert 65349 - Update CertVerifier to watch for the origin loop's destruction... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verifier.cc
===================================================================
--- net/base/cert_verifier.cc (revision 65371)
+++ net/base/cert_verifier.cc (working copy)
@@ -17,8 +17,7 @@
namespace net {
class CertVerifier::Request :
- public base::RefCountedThreadSafe<CertVerifier::Request>,
- public MessageLoop::DestructionObserver {
+ public base::RefCountedThreadSafe<CertVerifier::Request> {
public:
Request(CertVerifier* verifier,
X509Certificate* cert,
@@ -34,8 +33,6 @@
callback_(callback),
origin_loop_(MessageLoop::current()),
error_(OK) {
- if (origin_loop_)
- origin_loop_->AddDestructionObserver(this);
}
void DoVerify() {
@@ -89,25 +86,13 @@
verifier_ = NULL;
AutoLock locked(origin_loop_lock_);
- if (origin_loop_) {
- origin_loop_->RemoveDestructionObserver(this);
- origin_loop_ = NULL;
- }
- }
-
- // MessageLoop::DestructionObserver override.
- virtual void WillDestroyCurrentMessageLoop() {
- LOG(ERROR) << "CertVerifier wasn't deleted before the thread was deleted.";
- AutoLock locked(origin_loop_lock_);
origin_loop_ = NULL;
}
private:
friend class base::RefCountedThreadSafe<CertVerifier::Request>;
- ~Request() {
- Cancel();
- }
+ ~Request() {}
// Set on the origin thread, read on the worker thread.
scoped_refptr<X509Certificate> cert_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698