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

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

Issue 2015843002: [mojo-edk] Remove ChildProcessLaunched that returns a pipe handle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another fix. Created 4 years, 7 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/embedder.h ('k') | no next file » | 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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 19 matching lines...) Expand all
30 Core* g_core; 30 Core* g_core;
31 ProcessDelegate* g_process_delegate; 31 ProcessDelegate* g_process_delegate;
32 32
33 Core* GetCore() { return g_core; } 33 Core* GetCore() { return g_core; }
34 34
35 } // namespace internal 35 } // namespace internal
36 36
37 void SetMaxMessageSize(size_t bytes) { 37 void SetMaxMessageSize(size_t bytes) {
38 } 38 }
39 39
40 ScopedPlatformHandle ChildProcessLaunched(base::ProcessHandle child_process) {
41 PlatformChannelPair channel;
42 ChildProcessLaunched(child_process, channel.PassServerHandle());
43 return channel.PassClientHandle();
44 }
45
46 void ChildProcessLaunched(base::ProcessHandle child_process, 40 void ChildProcessLaunched(base::ProcessHandle child_process,
47 ScopedPlatformHandle server_pipe) { 41 ScopedPlatformHandle server_pipe) {
48 CHECK(internal::g_core); 42 CHECK(internal::g_core);
49 internal::g_core->AddChild(child_process, std::move(server_pipe)); 43 internal::g_core->AddChild(child_process, std::move(server_pipe));
50 } 44 }
51 45
52 void SetParentPipeHandle(ScopedPlatformHandle pipe) { 46 void SetParentPipeHandle(ScopedPlatformHandle pipe) {
53 CHECK(internal::g_core); 47 CHECK(internal::g_core);
54 internal::g_core->InitChild(std::move(pipe)); 48 internal::g_core->InitChild(std::move(pipe));
55 } 49 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 137 }
144 138
145 std::string GenerateRandomToken() { 139 std::string GenerateRandomToken() {
146 char random_bytes[16]; 140 char random_bytes[16];
147 crypto::RandBytes(random_bytes, 16); 141 crypto::RandBytes(random_bytes, 16);
148 return base::HexEncode(random_bytes, 16); 142 return base::HexEncode(random_bytes, 16);
149 } 143 }
150 144
151 } // namespace edk 145 } // namespace edk
152 } // namespace mojo 146 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698