Index: content/public/browser/cookie_store_factory.h |
diff --git a/content/public/browser/cookie_store_factory.h b/content/public/browser/cookie_store_factory.h |
index c7a9c6eb4172ee576529f5b756dd7efc638893df..e59655ca9c0933573d87dcc7466d51338dac1cdd 100644 |
--- a/content/public/browser/cookie_store_factory.h |
+++ b/content/public/browser/cookie_store_factory.h |
@@ -5,24 +5,52 @@ |
#ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ |
#define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ |
+#include "base/memory/ref_counted.h" |
#include "content/common/content_export.h" |
#include "net/cookies/cookie_monster.h" |
+#include "webkit/browser/quota/special_storage_policy.h" |
namespace base { |
class FilePath; |
} |
-namespace quota { |
-class SpecialStoragePolicy; |
+namespace net { |
+class CookieStore; |
} |
namespace content { |
-CONTENT_EXPORT net::CookieStore* CreatePersistentCookieStore( |
- const base::FilePath& path, |
- bool restore_old_session_cookies, |
- quota::SpecialStoragePolicy* storage_policy, |
- net::CookieMonster::Delegate* cookie_monster_delegate); |
+struct CONTENT_EXPORT CookieStoreConfig { |
+ static CookieStoreConfig InMemory(); |
+ static CookieStoreConfig InMemoryWithOptions( |
+ quota::SpecialStoragePolicy* storage_policy, |
+ net::CookieMonsterDelegate* cookie_delegate); |
+ |
+ static CookieStoreConfig Persistent(const base::FilePath& path, |
+ bool restore_old_session_cookies); |
+ static CookieStoreConfig PersistentWithOptions( |
+ const base::FilePath& path, |
+ bool restore_old_session_cookies, |
+ quota::SpecialStoragePolicy* storage_policy, |
+ net::CookieMonsterDelegate* cookie_delegate); |
+ |
+ ~CookieStoreConfig(); |
+ |
+ const bool in_memory; |
+ const base::FilePath path; |
+ const bool restore_old_session_cookies; |
+ const scoped_refptr<quota::SpecialStoragePolicy> storage_policy; |
+ const scoped_refptr<net::CookieMonsterDelegate> cookie_delegate; |
+ |
+ private: |
+ CookieStoreConfig(bool in_memory, const base::FilePath& path, |
+ bool restore_old_session_cookies, |
+ quota::SpecialStoragePolicy* storage_policy, |
+ net::CookieMonsterDelegate* cookie_delegate); |
+}; |
+ |
+CONTENT_EXPORT net::CookieStore* CreateCookieStore( |
+ const CookieStoreConfig& config); |
} // namespace content |