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

Unified Diff: mojo/public/cpp/bindings/lib/message_builder.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « mojo/public/cpp/bindings/lib/message_builder.h ('k') | mojo/public/cpp/bindings/lib/message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/message_builder.cc
diff --git a/mojo/public/cpp/bindings/lib/message_builder.cc b/mojo/public/cpp/bindings/lib/message_builder.cc
deleted file mode 100644
index cc914e8194a2634ab0231114348b9e61ae3e8ab8..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/lib/message_builder.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/public/cpp/bindings/lib/message_builder.h"
-
-#include "mojo/public/cpp/bindings/message.h"
-
-namespace mojo {
-namespace internal {
-
-template <typename Header>
-void Allocate(Buffer* buf, Header** header) {
- *header = static_cast<Header*>(buf->Allocate(sizeof(Header)));
- (*header)->num_bytes = sizeof(Header);
-}
-
-MessageBuilder::MessageBuilder(uint32_t name, size_t payload_size)
- : buf_(sizeof(MessageHeader) + payload_size) {
- MessageHeader* header;
- Allocate(&buf_, &header);
- header->num_fields = 2;
- header->name = name;
-}
-
-MessageBuilder::~MessageBuilder() {
-}
-
-void MessageBuilder::Finish(Message* message) {
- uint32_t num_bytes = static_cast<uint32_t>(buf_.size());
- message->AdoptData(num_bytes, static_cast<MessageData*>(buf_.Leak()));
-}
-
-MessageBuilder::MessageBuilder(size_t size) : buf_(size) {
-}
-
-MessageWithRequestIDBuilder::MessageWithRequestIDBuilder(uint32_t name,
- size_t payload_size,
- uint32_t flags,
- uint64_t request_id)
- : MessageBuilder(sizeof(MessageHeaderWithRequestID) + payload_size) {
- MessageHeaderWithRequestID* header;
- Allocate(&buf_, &header);
- header->num_fields = 3;
- header->name = name;
- header->flags = flags;
- header->request_id = request_id;
-}
-
-} // namespace internal
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_builder.h ('k') | mojo/public/cpp/bindings/lib/message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698