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

Unified Diff: ipc/ipc_message_utils.h

Issue 2846293002: Make PlatformFileForTransit its own class on Windows. (Closed)
Patch Set: Change message serialization to write nothing if the handle isn't valid. Created 3 years, 8 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 | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 847a617c8334ee33bfa54adab77c3d252081476f..dd6755e04a0edf4ebfa3582b9d3559f49e198283 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -49,6 +49,10 @@ namespace IPC {
struct ChannelHandle;
+#if defined(OS_WIN)
+class PlatformFileForTransit;
+#endif
+
// -----------------------------------------------------------------------------
// How we send IPC message logs across channels.
struct IPC_EXPORT LogData {
@@ -593,6 +597,19 @@ struct IPC_EXPORT ParamTraits<base::SharedMemoryHandle> {
static void Log(const param_type& p, std::string* l);
};
+#if defined(OS_WIN)
+template <>
+struct IPC_EXPORT ParamTraits<PlatformFileForTransit> {
+ typedef PlatformFileForTransit param_type;
+ static void GetSize(base::PickleSizer* sizer, const param_type& p);
+ static void Write(base::Pickle* m, const param_type& p);
+ static bool Read(const base::Pickle* m,
+ base::PickleIterator* iter,
+ param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+#endif // defined(OS_WIN)
+
template <>
struct IPC_EXPORT ParamTraits<base::FilePath> {
typedef base::FilePath param_type;
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698