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

Unified Diff: chrome/common/render_messages.cc

Issue 1685883004: Use uint64_t instead of size_t inside the web cache manager code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 10 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 | « chrome/common/render_messages.h ('k') | chrome/renderer/chrome_render_process_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.cc
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index 7e30f25c4bfa082b8a330c56a22429879d7c6b5f..d108f42e596f6d050f4a6d627221f41bfa807398 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -28,40 +28,4 @@ void ParamTraits<ContentSettingsPattern>::Log(
l->append(">");
}
-void ParamTraits<blink::WebCache::UsageStats>::Write(
- base::Pickle* m, const blink::WebCache::UsageStats& u) {
- m->WriteUInt64(static_cast<uint64_t>(u.minDeadCapacity));
- m->WriteUInt64(static_cast<uint64_t>(u.maxDeadCapacity));
- m->WriteUInt64(static_cast<uint64_t>(u.capacity));
- m->WriteUInt64(static_cast<uint64_t>(u.liveSize));
- m->WriteUInt64(static_cast<uint64_t>(u.deadSize));
-}
-
-bool ParamTraits<blink::WebCache::UsageStats>::Read(
- const base::Pickle* m,
- base::PickleIterator* iter,
- blink::WebCache::UsageStats* u) {
- uint64_t min_capacity, max_capacity, capacity, live_size, dead_size;
- if (!iter->ReadUInt64(&min_capacity) ||
- !iter->ReadUInt64(&max_capacity) ||
- !iter->ReadUInt64(&capacity) ||
- !iter->ReadUInt64(&live_size) ||
- !iter->ReadUInt64(&dead_size)) {
- return false;
- }
-
- u->minDeadCapacity = base::checked_cast<size_t>(min_capacity);
- u->maxDeadCapacity = base::checked_cast<size_t>(max_capacity);
- u->capacity = base::checked_cast<size_t>(capacity);
- u->liveSize = base::checked_cast<size_t>(live_size);
- u->deadSize = base::checked_cast<size_t>(dead_size);
-
- return true;
-}
-
-void ParamTraits<blink::WebCache::UsageStats>::Log(
- const blink::WebCache::UsageStats& p, std::string* l) {
- l->append("<blink::WebCache::UsageStats>");
-}
-
} // namespace IPC
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/chrome_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698