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

Unified Diff: chrome/browser/net/sqlite_server_bound_cert_store.cc

Issue 11748024: Remove unnecessary backend_ tests in SQLiteServerBoundCertStore and SQLitePersistentCookieStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 12 months 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 | « chrome/browser/net/sqlite_persistent_cookie_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/sqlite_server_bound_cert_store.cc
diff --git a/chrome/browser/net/sqlite_server_bound_cert_store.cc b/chrome/browser/net/sqlite_server_bound_cert_store.cc
index fb6ab57c3d61c8791ab7fc75de3cd50ec3719f72..b85e939e7c66890a790421e2cfb5a33c6099b3f1 100644
--- a/chrome/browser/net/sqlite_server_bound_cert_store.cc
+++ b/chrome/browser/net/sqlite_server_bound_cert_store.cc
@@ -551,33 +551,24 @@ bool SQLiteServerBoundCertStore::Load(
void SQLiteServerBoundCertStore::AddServerBoundCert(
const net::DefaultServerBoundCertStore::ServerBoundCert& cert) {
- if (backend_.get())
- backend_->AddServerBoundCert(cert);
+ backend_->AddServerBoundCert(cert);
}
void SQLiteServerBoundCertStore::DeleteServerBoundCert(
const net::DefaultServerBoundCertStore::ServerBoundCert& cert) {
- if (backend_.get())
- backend_->DeleteServerBoundCert(cert);
+ backend_->DeleteServerBoundCert(cert);
}
void SQLiteServerBoundCertStore::SetForceKeepSessionState() {
- if (backend_.get())
- backend_->SetForceKeepSessionState();
+ backend_->SetForceKeepSessionState();
}
void SQLiteServerBoundCertStore::Flush(const base::Closure& completion_task) {
- if (backend_.get())
- backend_->Flush(completion_task);
- else if (!completion_task.is_null())
- MessageLoop::current()->PostTask(FROM_HERE, completion_task);
+ backend_->Flush(completion_task);
}
SQLiteServerBoundCertStore::~SQLiteServerBoundCertStore() {
- if (backend_.get()) {
- backend_->Close();
- // Release our reference, it will probably still have a reference if the
- // background thread has not run Close() yet.
- backend_ = NULL;
- }
+ backend_->Close();
+ // We release our reference to the Backend, though it will probably still have
+ // a reference if the background thread has not run Close() yet.
}
« no previous file with comments | « chrome/browser/net/sqlite_persistent_cookie_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698