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

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

Issue 220243007: Mojo: Move mojo/public/bindings/lib to mojo/public/cpp/bindings/lib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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/bindings/lib/bindings_serialization.h" 5 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 8
9 #include "mojo/public/bindings/lib/bindings_internal.h" 9 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace internal { 12 namespace internal {
13 13
14 size_t Align(size_t size) { 14 size_t Align(size_t size) {
15 const size_t kAlignment = 8; 15 const size_t kAlignment = 8;
16 return size + (kAlignment - (size % kAlignment)) % kAlignment; 16 return size + (kAlignment - (size % kAlignment)) % kAlignment;
17 } 17 }
18 18
19 void EncodePointer(const void* ptr, uint64_t* offset) { 19 void EncodePointer(const void* ptr, uint64_t* offset) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 if (handle->value() >= handles->size()) 65 if (handle->value() >= handles->size())
66 return false; 66 return false;
67 // Just leave holes in the vector so we don't screw up other indices. 67 // Just leave holes in the vector so we don't screw up other indices.
68 *handle = FetchAndReset(&handles->at(handle->value())); 68 *handle = FetchAndReset(&handles->at(handle->value()));
69 return true; 69 return true;
70 } 70 }
71 71
72 } // namespace internal 72 } // namespace internal
73 } // namespace mojo 73 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/bindings_serialization.h ('k') | mojo/public/cpp/bindings/lib/buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698