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

Side by Side Diff: components/arc/arc_bridge_bootstrap.cc

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/arc/arc_bridge_bootstrap.h" 5 #include "components/arc/arc_bridge_bootstrap.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <grp.h> 8 #include <grp.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 base::Bind(&ArcBridgeBootstrapImpl::AcceptInstanceConnection, 275 base::Bind(&ArcBridgeBootstrapImpl::AcceptInstanceConnection,
276 base::Passed(&socket_fd)), 276 base::Passed(&socket_fd)),
277 base::Bind(&ArcBridgeBootstrapImpl::OnInstanceConnected, 277 base::Bind(&ArcBridgeBootstrapImpl::OnInstanceConnected,
278 weak_factory_.GetWeakPtr())); 278 weak_factory_.GetWeakPtr()));
279 } 279 }
280 280
281 // static 281 // static
282 base::ScopedFD ArcBridgeBootstrapImpl::AcceptInstanceConnection( 282 base::ScopedFD ArcBridgeBootstrapImpl::AcceptInstanceConnection(
283 base::ScopedFD socket_fd) { 283 base::ScopedFD socket_fd) {
284 int raw_fd = -1; 284 int raw_fd = -1;
285 if (!IPC::ServerAcceptConnection(socket_fd.get(), &raw_fd)) { 285 if (!IPC::ServerOnConnect(socket_fd.get(), &raw_fd)) {
286 return base::ScopedFD(); 286 return base::ScopedFD();
287 } 287 }
288 base::ScopedFD scoped_fd(raw_fd); 288 base::ScopedFD scoped_fd(raw_fd);
289 289
290 // Hardcode pid 0 since it is unused in mojo. 290 // Hardcode pid 0 since it is unused in mojo.
291 const base::ProcessHandle kUnusedChildProcessHandle = 0; 291 const base::ProcessHandle kUnusedChildProcessHandle = 0;
292 mojo::edk::PlatformChannelPair channel_pair; 292 mojo::edk::PlatformChannelPair channel_pair;
293 mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle, 293 mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle,
294 channel_pair.PassServerHandle(), 294 channel_pair.PassServerHandle(),
295 mojo::edk::GenerateRandomToken()); 295 mojo::edk::GenerateRandomToken());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 } // namespace 374 } // namespace
375 375
376 // static 376 // static
377 std::unique_ptr<ArcBridgeBootstrap> ArcBridgeBootstrap::Create() { 377 std::unique_ptr<ArcBridgeBootstrap> ArcBridgeBootstrap::Create() {
378 return base::WrapUnique(new ArcBridgeBootstrapImpl()); 378 return base::WrapUnique(new ArcBridgeBootstrapImpl());
379 } 379 }
380 380
381 } // namespace arc 381 } // namespace arc
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | components/filesystem/file_system_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698