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

Unified Diff: chrome/common/render_messages.h

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry Created 4 years, 11 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: chrome/common/render_messages.h
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 662b61a63b2e8366d4bc9754324411eabe9f6b48..37eafe961adfb8207564b2e00bdf731a50fe134b 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -54,6 +54,16 @@ struct ParamTraits<ContentSettingsPattern> {
static void Log(const param_type& p, std::string* l);
};
+// Manual traits since this struct uses size_t and it's in Blink, so avoid
+// changing Blink due to IPC differences.
+template <>
+struct ParamTraits<blink::WebCache::UsageStats> {
+ typedef blink::WebCache::UsageStats param_type;
+ static void Write(Message* m, const param_type& u);
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* u);
+ static void Log(const param_type& p, std::string* l);
+};
+
} // namespace IPC
#endif // CHROME_COMMON_RENDER_MESSAGES_H_
@@ -160,14 +170,6 @@ IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo)
IPC_STRUCT_TRAITS_MEMBER(logo_alternate)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats)
- IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
- IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
- IPC_STRUCT_TRAITS_MEMBER(capacity)
- IPC_STRUCT_TRAITS_MEMBER(liveSize)
- IPC_STRUCT_TRAITS_MEMBER(deadSize)
-IPC_STRUCT_TRAITS_END()
-
IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType,
NTP_EVENT_TYPE_LAST)

Powered by Google App Engine
This is Rietveld 408576698