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

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

Issue 21485: Bitmap transport (Closed)
Patch Set: Fix some mac crashes Created 11 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 unified diff | Download patch
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

Powered by Google App Engine
This is Rietveld 408576698