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

Unified Diff: net/base/cookie_monster.cc

Issue 147154: Use C99 standard format macros for 64-bit values. (Closed)
Patch Set: ... Created 11 years, 6 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.cc
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 31d55dc7a1a3d9851f9691bc6833dd1150c64e6c..e20c03d15ffe10da5c0c382b091bb3893a195d43 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -47,6 +47,7 @@
#include <algorithm>
#include "base/basictypes.h"
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_tokenizer.h"
@@ -351,12 +352,12 @@ 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) {
-
+#ifdef COMPILER_MSVC
+ sscanf_s(
#else
- sscanf(pc.MaxAge().c_str(), " %llu", &max_age) == 1) {
+ sscanf(
#endif
+ pc.MaxAge().c_str(), " %" PRIu64, &max_age) == 1) {
return current + TimeDelta::FromSeconds(max_age);
}

Powered by Google App Engine
This is Rietveld 408576698