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

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

Issue 1797153002: Reinstate wait-for-Initialize when Chrome is run in Mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell-client
Patch Set: fix views_mus_unittests too Created 4 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void SetParentPipeHandle(ScopedPlatformHandle pipe) { 52 void SetParentPipeHandle(ScopedPlatformHandle pipe) {
53 CHECK(internal::g_core); 53 CHECK(internal::g_core);
54 internal::g_core->InitChild(std::move(pipe)); 54 internal::g_core->InitChild(std::move(pipe));
55 } 55 }
56 56
57 void SetParentPipeHandleFromCommandLine() { 57 void SetParentPipeHandleFromCommandLine() {
58 ScopedPlatformHandle platform_channel = 58 ScopedPlatformHandle platform_channel =
59 PlatformChannelPair::PassClientHandleFromParentProcess( 59 PlatformChannelPair::PassClientHandleFromParentProcess(
60 *base::CommandLine::ForCurrentProcess()); 60 *base::CommandLine::ForCurrentProcess());
61 if (platform_channel.is_valid()) 61 CHECK(platform_channel.is_valid());
62 SetParentPipeHandle(std::move(platform_channel)); 62 SetParentPipeHandle(std::move(platform_channel));
63 } 63 }
64 64
65 void Init() { 65 void Init() {
66 internal::g_core = new Core(); 66 internal::g_core = new Core();
67 } 67 }
68 68
69 MojoResult AsyncWait(MojoHandle handle, 69 MojoResult AsyncWait(MojoHandle handle,
70 MojoHandleSignals signals, 70 MojoHandleSignals signals,
71 const base::Callback<void(MojoResult)>& callback) { 71 const base::Callback<void(MojoResult)>& callback) {
72 CHECK(internal::g_core); 72 CHECK(internal::g_core);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 std::string GenerateRandomToken() { 138 std::string GenerateRandomToken() {
139 char random_bytes[16]; 139 char random_bytes[16];
140 crypto::RandBytes(random_bytes, 16); 140 crypto::RandBytes(random_bytes, 16);
141 return base::HexEncode(random_bytes, 16); 141 return base::HexEncode(random_bytes, 16);
142 } 142 }
143 143
144 } // namespace edk 144 } // namespace edk
145 } // namespace mojo 145 } // namespace mojo
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | mojo/shell/public/cpp/lib/shell_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698