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

Side by Side Diff: mojo/edk/embedder/embedder.cc

Issue 2738853002: Connections now take a ConnectionParams instead of a pipe handle. (Closed)
Patch Set: Fix Win release build. Created 3 years, 9 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
« no previous file with comments | « mojo/edk/embedder/connection_params.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/edk/embedder/embedder.h" 5 #include "mojo/edk/embedder/embedder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 26 matching lines...) Expand all
37 37
38 Core* GetCore() { return g_core; } 38 Core* GetCore() { return g_core; }
39 39
40 } // namespace internal 40 } // namespace internal
41 41
42 void SetMaxMessageSize(size_t bytes) { 42 void SetMaxMessageSize(size_t bytes) {
43 } 43 }
44 44
45 void SetParentPipeHandle(ScopedPlatformHandle pipe) { 45 void SetParentPipeHandle(ScopedPlatformHandle pipe) {
46 CHECK(internal::g_core); 46 CHECK(internal::g_core);
47 internal::g_core->InitChild(std::move(pipe)); 47 internal::g_core->InitChild(ConnectionParams(std::move(pipe)));
48 } 48 }
49 49
50 void SetParentPipeHandleFromCommandLine() { 50 void SetParentPipeHandleFromCommandLine() {
51 ScopedPlatformHandle platform_channel = 51 ScopedPlatformHandle platform_channel =
52 PlatformChannelPair::PassClientHandleFromParentProcess( 52 PlatformChannelPair::PassClientHandleFromParentProcess(
53 *base::CommandLine::ForCurrentProcess()); 53 *base::CommandLine::ForCurrentProcess());
54 CHECK(platform_channel.is_valid()); 54 CHECK(platform_channel.is_valid());
55 SetParentPipeHandle(std::move(platform_channel)); 55 SetParentPipeHandle(std::move(platform_channel));
56 } 56 }
57 57
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return base::HexEncode(random_bytes, 16); 149 return base::HexEncode(random_bytes, 16);
150 } 150 }
151 151
152 MojoResult SetProperty(MojoPropertyType type, const void* value) { 152 MojoResult SetProperty(MojoPropertyType type, const void* value) {
153 CHECK(internal::g_core); 153 CHECK(internal::g_core);
154 return internal::g_core->SetProperty(type, value); 154 return internal::g_core->SetProperty(type, value);
155 } 155 }
156 156
157 } // namespace edk 157 } // namespace edk
158 } // namespace mojo 158 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/connection_params.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698