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

Side by Side Diff: chrome/common/ipc_maybe.h

Issue 155905: Separates ipc code from common (http://crbug.com/16829) (Closed)
Patch Set: Fixes reference to 'common_message_traits' it's actually 'common_param_traits' Created 11 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/common/ipc_logging.cc ('k') | chrome/common/ipc_message.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef CHROME_COMMON_MAYBE_H_
2 #define CHROME_COMMON_MAYBE_H_
3
4 namespace IPC {
5
6 // The Maybe type can be used to avoid serialising a type when it's invalid.
7 // This is most useful in conjunction with FileDescriptor, as there's no
8 // possible invalid value which can be serialised (one can type to use -1, but
9 // the IPC channel will fail). It may also be useful if the invalid value is
10 // otherwise expensive to serialise.
11 template<typename A>
12 struct Maybe {
13 bool valid;
14 A value;
15 };
16
17 } // namespace IPC
18
19 #endif // CHROME_COMMON_MAYBE_H_
OLDNEW
« no previous file with comments | « chrome/common/ipc_logging.cc ('k') | chrome/common/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698