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

Unified Diff: net/cookies/canonical_cookie.cc

Issue 10831117: Remove ENABLE_PERSISTENT_SESSION_COOKIES (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 8 years, 5 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 | « net/cookies/canonical_cookie.h ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.cc
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
index ea59aca2441dbfa04ead6703a8a62dab7c2cd835..306b8fc21729e9f7ba2739f4946b7c49504a7d23 100644
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
@@ -60,10 +60,6 @@ namespace net {
namespace {
-#if defined(ENABLE_PERSISTENT_SESSION_COOKIES)
-const int kPersistentSessionCookieExpiryInDays = 14;
-#endif
-
// Determine the cookie domain to use for setting the specified cookie.
bool GetCookieDomain(const GURL& url,
const ParsedCookie& pc,
@@ -109,7 +105,6 @@ std::string CanonPathWithString(const GURL& url,
CanonicalCookie::CanonicalCookie()
: secure_(false),
httponly_(false) {
- SetSessionCookieExpiryTime();
}
CanonicalCookie::CanonicalCookie(
@@ -130,8 +125,6 @@ CanonicalCookie::CanonicalCookie(
last_access_date_(last_access),
secure_(secure),
httponly_(httponly) {
- if (expiration.is_null())
- SetSessionCookieExpiryTime();
}
CanonicalCookie::CanonicalCookie(const GURL& url, const ParsedCookie& pc)
@@ -147,8 +140,6 @@ CanonicalCookie::CanonicalCookie(const GURL& url, const ParsedCookie& pc)
httponly_(pc.IsHttpOnly()) {
if (pc.HasExpires())
expiry_date_ = CanonExpiration(pc, creation_date_, creation_date_);
- else
- SetSessionCookieExpiryTime();
// Do the best we can with the domain.
std::string cookie_domain;
@@ -214,15 +205,6 @@ Time CanonicalCookie::CanonExpiration(const ParsedCookie& pc,
return Time();
}
-void CanonicalCookie::SetSessionCookieExpiryTime() {
-#if defined(ENABLE_PERSISTENT_SESSION_COOKIES)
- // Mobile apps can sometimes be shut down without any warning, so the session
- // cookie has to be persistent and given a default expiration time.
- expiry_date_ = base::Time::Now() +
- base::TimeDelta::FromDays(kPersistentSessionCookieExpiryInDays);
-#endif
-}
-
CanonicalCookie* CanonicalCookie::Create(const GURL& url,
const ParsedCookie& pc) {
if (!pc.IsValid()) {
« no previous file with comments | « net/cookies/canonical_cookie.h ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698