diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/base/cookie_monster.cc | 9 | ||||
-rw-r--r-- | net/disk_cache/stats.cc | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 31d55dc..e20c03d 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); } diff --git a/net/disk_cache/stats.cc b/net/disk_cache/stats.cc index 702b2a36..a351a6c 100644 --- a/net/disk_cache/stats.cc +++ b/net/disk_cache/stats.cc @@ -4,6 +4,7 @@ #include "net/disk_cache/stats.h" +#include "base/format_macros.h" #include "base/logging.h" #include "base/string_util.h" #include "net/disk_cache/backend_impl.h" @@ -263,7 +264,7 @@ void Stats::GetItems(StatsItems* items) { for (int i = MIN_COUNTER + 1; i < MAX_COUNTER; i++) { item.first = kCounterNames[i]; - item.second = StringPrintf("0x%I64x", counters_[i]); + item.second = StringPrintf("0x%" PRIx64, counters_[i]); items->push_back(item); } } |