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

Unified Diff: net/base/cookie_monster.h

Issue 115204: Add a separate cookie store that's used for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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: net/base/cookie_monster.h
===================================================================
--- net/base/cookie_monster.h (revision 15945)
+++ net/base/cookie_monster.h (working copy)
@@ -76,6 +76,7 @@
store_(NULL),
last_access_threshold_(
base::TimeDelta::FromSeconds(last_access_threshold_seconds)) {
+ SetDefaultCookieableSchemes();
}
#endif
@@ -133,9 +134,15 @@
const CanonicalCookie& cookie,
bool sync_to_store);
+ // Override the default list of schemes that are allowed to be set in
+ // this cookie store. Calling his overrides the value of
+ // "enable_file_scheme_".
+ void SetCookieableSchemes(const char* schemes[], size_t num_schemes);
+
// There are some unknowns about how to correctly handle file:// cookies,
// and our implementation for this is not robust enough. This allows you
// to enable support, but it should only be used for testing. Bug 1157243.
+ // Must be called before creating a CookieMonster instance.
static void EnableFileScheme();
static bool enable_file_scheme_;
@@ -156,6 +163,8 @@
// Should only be called by InitIfNecessary().
void InitStore();
+ void SetDefaultCookieableSchemes();
+
void FindCookiesForHostAndDomain(const GURL& url,
const CookieOptions& options,
std::vector<CanonicalCookie*>* cookies);
@@ -210,6 +219,8 @@
const CookieMapItPair& itpair,
std::vector<CookieMap::iterator>* cookie_its);
+ bool HasCookieableScheme(const GURL& url);
+
CookieMap cookies_;
// Indicates whether the cookie store has been initialized. This happens
@@ -227,6 +238,8 @@
// update it again.
const base::TimeDelta last_access_threshold_;
+ std::vector<std::string> cookieable_schemes_;
+
// Lock for thread-safety
Lock lock_;

Powered by Google App Engine
This is Rietveld 408576698