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

Unified Diff: content/public/browser/cookie_store_factory.h

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change Cookie Override API to not expose the CookieStoreMap. Created 7 years, 4 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 | « content/public/browser/content_browser_client.cc ('k') | content/public/browser/cookie_store_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..093506f281716c1ee1fdd32554748e5b3dd586b0 100644
--- a/content/public/browser/cookie_store_factory.h
+++ b/content/public/browser/cookie_store_factory.h
@@ -5,24 +5,61 @@
#ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
#define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
+#include "base/files/file_path.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 CookieMonsterDelegate;
+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 {
+ // Specifies how Session Cookies are persisted.
+ enum SessionCookieMode {
+ EPHEMERAL_SESSION_COOKIES,
+ PERSISTANT_SESSION_COOKIES,
+ RESTORED_SESSION_COOKIES
+ };
+
+ static CookieStoreConfig InMemory();
+ static CookieStoreConfig InMemoryWithOptions(
+ quota::SpecialStoragePolicy* storage_policy,
+ net::CookieMonsterDelegate* cookie_delegate);
+
+ static CookieStoreConfig Persistent(const base::FilePath& path,
+ SessionCookieMode session_cookie_mode);
+ static CookieStoreConfig PersistentWithOptions(
+ const base::FilePath& path,
+ SessionCookieMode session_cookie_mode,
+ quota::SpecialStoragePolicy* storage_policy,
+ net::CookieMonsterDelegate* cookie_delegate);
+
+ CookieStoreConfig();
+ ~CookieStoreConfig();
+
+ bool in_memory;
+ base::FilePath path;
+ SessionCookieMode session_cookie_mode;
+ scoped_refptr<quota::SpecialStoragePolicy> storage_policy;
+ scoped_refptr<net::CookieMonsterDelegate> cookie_delegate;
+
+ private:
+ CookieStoreConfig(bool in_memory, const base::FilePath& path,
+ SessionCookieMode session_cookie_mode,
+ quota::SpecialStoragePolicy* storage_policy,
+ net::CookieMonsterDelegate* cookie_delegate);
+};
+
+CONTENT_EXPORT net::CookieStore* CreateCookieStore(
+ const CookieStoreConfig& config);
} // namespace content
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/browser/cookie_store_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698