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

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

Issue 2100683002: Mojo C++ Bindings: Extract AssociatedGroupController from MultiplexRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops more gyp ugh Created 4 years, 5 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 #include "mojo/public/cpp/bindings/lib/serialization_context.h" 5 #include "mojo/public/cpp/bindings/lib/serialization_context.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/public/cpp/bindings/lib/multiplex_router.h" 10 #include "mojo/public/cpp/bindings/associated_group_controller.h"
11 #include "mojo/public/cpp/system/core.h" 11 #include "mojo/public/cpp/system/core.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace internal { 14 namespace internal {
15 15
16 SerializedHandleVector::SerializedHandleVector() {} 16 SerializedHandleVector::SerializedHandleVector() {}
17 17
18 SerializedHandleVector::~SerializedHandleVector() { 18 SerializedHandleVector::~SerializedHandleVector() {
19 for (auto handle : handles_) { 19 for (auto handle : handles_) {
20 if (handle.is_valid()) { 20 if (handle.is_valid()) {
(...skipping 23 matching lines...) Expand all
44 return FetchAndReset(&handles_[encoded_handle.value]); 44 return FetchAndReset(&handles_[encoded_handle.value]);
45 } 45 }
46 46
47 void SerializedHandleVector::Swap(std::vector<mojo::Handle>* other) { 47 void SerializedHandleVector::Swap(std::vector<mojo::Handle>* other) {
48 handles_.swap(*other); 48 handles_.swap(*other);
49 } 49 }
50 50
51 SerializationContext::SerializationContext() {} 51 SerializationContext::SerializationContext() {}
52 52
53 SerializationContext::SerializationContext( 53 SerializationContext::SerializationContext(
54 scoped_refptr<MultiplexRouter> in_router) 54 scoped_refptr<AssociatedGroupController> in_group_controller)
55 : router(std::move(in_router)) {} 55 : group_controller(std::move(in_group_controller)) {}
56 56
57 SerializationContext::~SerializationContext() { 57 SerializationContext::~SerializationContext() {
58 DCHECK(!custom_contexts || custom_contexts->empty()); 58 DCHECK(!custom_contexts || custom_contexts->empty());
59 } 59 }
60 60
61 } // namespace internal 61 } // namespace internal
62 } // namespace mojo 62 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/serialization_context.h ('k') | mojo/public/cpp/bindings/lib/serialization_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698