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

Unified Diff: content/browser/net/sqlite_persistent_cookie_store_unittest.cc

Issue 110883017: Add CookieStoreConfig to unify API for in-memory and persistent CookieStore Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge ToT again. Created 6 years, 11 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
Index: content/browser/net/sqlite_persistent_cookie_store_unittest.cc
diff --git a/content/browser/net/sqlite_persistent_cookie_store_unittest.cc b/content/browser/net/sqlite_persistent_cookie_store_unittest.cc
index 37bd73fb8f3930f5028e847872f523cbe51553ec..d6e30a6587ec0312db26c1ae910e1405beb7cd13 100644
--- a/content/browser/net/sqlite_persistent_cookie_store_unittest.cc
+++ b/content/browser/net/sqlite_persistent_cookie_store_unittest.cc
@@ -128,15 +128,16 @@ class SQLitePersistentCookieStoreTest : public testing::Test {
void CreateAndLoad(bool crypt_cookies,
bool restore_old_session_cookies,
CanonicalCookieVector* cookies) {
+ if (crypt_cookies)
+ cookie_crypto_delegate_.reset(new CookieCryptor());
+
store_ = new SQLitePersistentCookieStore(
temp_dir_.path().Append(kCookieFilename),
client_task_runner(),
background_task_runner(),
restore_old_session_cookies,
NULL,
- crypt_cookies ?
- scoped_ptr<content::CookieCryptoDelegate>(new CookieCryptor) :
- scoped_ptr<content::CookieCryptoDelegate>());
+ cookie_crypto_delegate_.get());
Load(cookies);
}
@@ -190,6 +191,7 @@ class SQLitePersistentCookieStoreTest : public testing::Test {
CanonicalCookieVector cookies_;
base::ScopedTempDir temp_dir_;
scoped_refptr<SQLitePersistentCookieStore> store_;
+ scoped_ptr<content::CookieCryptoDelegate> cookie_crypto_delegate_;
};
TEST_F(SQLitePersistentCookieStoreTest, TestInvalidMetaTableRecovery) {
@@ -276,8 +278,7 @@ TEST_F(SQLitePersistentCookieStoreTest, TestLoadCookiesForKey) {
temp_dir_.path().Append(kCookieFilename),
client_task_runner(),
background_task_runner(),
- false, NULL,
- scoped_ptr<content::CookieCryptoDelegate>());
+ false, NULL, NULL);
// Posting a blocking task to db_thread_ makes sure that the DB thread waits
// until both Load and LoadCookiesForKey have been posted to its task queue.
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store_perftest.cc ('k') | content/public/browser/cookie_store_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698