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

Side by Side Diff: mojo/public/cpp/bindings/lib/message_builder.cc

Issue 1543603002: Switch to standard integer types in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "mojo/public/cpp/bindings/lib/message_builder.h" 5 #include "mojo/public/cpp/bindings/lib/message_builder.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" 10 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
8 #include "mojo/public/cpp/bindings/message.h" 11 #include "mojo/public/cpp/bindings/message.h"
9 12
10 namespace mojo { 13 namespace mojo {
11 namespace internal { 14 namespace internal {
12 15
13 template <typename Header> 16 template <typename Header>
14 void Allocate(Buffer* buf, Header** header) { 17 void Allocate(Buffer* buf, Header** header) {
15 *header = static_cast<Header*>(buf->Allocate(sizeof(Header))); 18 *header = static_cast<Header*>(buf->Allocate(sizeof(Header)));
16 (*header)->num_bytes = sizeof(Header); 19 (*header)->num_bytes = sizeof(Header);
(...skipping 27 matching lines...) Expand all
44 MessageHeaderWithRequestID* header; 47 MessageHeaderWithRequestID* header;
45 Allocate(message_.buffer(), &header); 48 Allocate(message_.buffer(), &header);
46 header->version = 1; 49 header->version = 1;
47 header->name = name; 50 header->name = name;
48 header->flags = flags; 51 header->flags = flags;
49 header->request_id = request_id; 52 header->request_id = request_id;
50 } 53 }
51 54
52 } // namespace internal 55 } // namespace internal
53 } // namespace mojo 56 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_builder.h ('k') | mojo/public/cpp/bindings/lib/message_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698