summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster.cc
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 16:39:56 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 16:39:56 +0000
commit70a41f29d64a3f5198149016293ab9ae5d23a03d (patch)
tree8388e8042ed2934f9d2c24f17205469943eefbbc /net/base/cookie_monster.cc
parentf297d180543addddd8f046bc2bd76ad7ef52fa51 (diff)
downloadchromium_src-70a41f29d64a3f5198149016293ab9ae5d23a03d.zip
chromium_src-70a41f29d64a3f5198149016293ab9ae5d23a03d.tar.gz
chromium_src-70a41f29d64a3f5198149016293ab9ae5d23a03d.tar.bz2
Back out r1154 due to test failures
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster.cc')
-rw-r--r--net/base/cookie_monster.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 12b1b46d7..b8dd8e7 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -192,13 +192,8 @@ Time CookieMonster::ParseCookieTime(const std::string& time_string) {
// Numeric field w/ a colon
} else if (token.find(':') != std::string::npos) {
if (!found_time &&
-#ifdef COMPILER_MSVC
- sscanf_s(
-#else
- sscanf(
-#endif
- token.c_str(), "%2u:%2u:%2u", &exploded.hour,
- &exploded.minute, &exploded.second) == 3) {
+ sscanf_s(token.c_str(), "%2hu:%2hu:%2hu", &exploded.hour,
+ &exploded.minute, &exploded.second) == 3) {
found_time = true;
} else {
// We should only ever encounter one time-like thing. If we're here,
@@ -339,12 +334,7 @@ static Time CanonExpiration(const CookieMonster::ParsedCookie& pc,
// First, try the Max-Age attribute.
uint64 max_age = 0;
if (pc.HasMaxAge() &&
-#if defined(COMPILER_MSVC)
sscanf_s(pc.MaxAge().c_str(), " %I64u", &max_age) == 1) {
-
-#else
- sscanf(pc.MaxAge().c_str(), " %llu", &max_age) == 1) {
-#endif
return current + TimeDelta::FromSeconds(max_age);
}
@@ -430,7 +420,6 @@ bool CookieMonster::SetCookieWithCreationTime(const GURL& url,
// We should have only purged at most one matching cookie.
int num_deleted = DeleteEquivalentCookies(cookie_domain, *cc);
- DCHECK(num_deleted <= 1);
COOKIE_DLOG(INFO) << "SetCookie() cc: " << cc->DebugString();