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

Side by Side Diff: mojo/public/cpp/system/message.h

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_
6 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ 6 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 handle->reset(MessageHandle(raw_handle)); 65 handle->reset(MessageHandle(raw_handle));
66 return MOJO_RESULT_OK; 66 return MOJO_RESULT_OK;
67 } 67 }
68 68
69 inline MojoResult GetMessageBuffer(MessageHandle message, void** buffer) { 69 inline MojoResult GetMessageBuffer(MessageHandle message, void** buffer) {
70 DCHECK(message.is_valid()); 70 DCHECK(message.is_valid());
71 return MojoGetMessageBuffer(message.value(), buffer); 71 return MojoGetMessageBuffer(message.value(), buffer);
72 } 72 }
73 73
74 inline MojoResult NotifyBadMessage(MessageHandle message) {
75 DCHECK(message.is_valid());
76 return MojoNotifyBadMessage(message.value());
77 }
78
74 } // namespace mojo 79 } // namespace mojo
75 80
76 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ 81 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698