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

Unified Diff: chrome/browser/net/sqlite_persistent_cookie_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 | « no previous file | chrome/browser/net/sqlite_server_bound_cert_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/sqlite_persistent_cookie_store.cc
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc
index 370a9eff789cae053c61f7f63e96afe512bc6055..42a34dc93eb17dd064ba203607b129b3dfb7ac64 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store.cc
+++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc
@@ -1082,38 +1082,28 @@ void SQLitePersistentCookieStore::LoadCookiesForKey(
}
void SQLitePersistentCookieStore::AddCookie(const net::CanonicalCookie& cc) {
- if (backend_.get())
- backend_->AddCookie(cc);
+ backend_->AddCookie(cc);
}
void SQLitePersistentCookieStore::UpdateCookieAccessTime(
const net::CanonicalCookie& cc) {
- if (backend_.get())
- backend_->UpdateCookieAccessTime(cc);
+ backend_->UpdateCookieAccessTime(cc);
}
void SQLitePersistentCookieStore::DeleteCookie(const net::CanonicalCookie& cc) {
- if (backend_.get())
- backend_->DeleteCookie(cc);
+ backend_->DeleteCookie(cc);
}
void SQLitePersistentCookieStore::SetForceKeepSessionState() {
- if (backend_.get())
- backend_->SetForceKeepSessionState();
+ backend_->SetForceKeepSessionState();
}
void SQLitePersistentCookieStore::Flush(const base::Closure& callback) {
- if (backend_.get())
- backend_->Flush(callback);
- else if (!callback.is_null())
- MessageLoop::current()->PostTask(FROM_HERE, callback);
+ backend_->Flush(callback);
}
SQLitePersistentCookieStore::~SQLitePersistentCookieStore() {
- 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 | « no previous file | chrome/browser/net/sqlite_server_bound_cert_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698