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

Side by Side Diff: trunk/src/ppapi/nacl_irt/manifest_service.cc

Issue 312553004: Revert 274310 "Introduce IPC::ChannelProxy::Create*() and IPC::S..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/ipc/ipc_test_base.cc ('k') | trunk/src/ppapi/nacl_irt/ppapi_dispatcher.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 "ppapi/nacl_irt/manifest_service.h" 5 #include "ppapi/nacl_irt/manifest_service.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "ipc/ipc_channel_handle.h" 8 #include "ipc/ipc_channel_handle.h"
9 #include "ipc/ipc_channel_proxy.h" 9 #include "ipc/ipc_channel_proxy.h"
10 #include "ipc/ipc_sync_message_filter.h" 10 #include "ipc/ipc_sync_message_filter.h"
11 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" 11 #include "native_client/src/trusted/service_runtime/include/sys/errno.h"
12 #include "ppapi/nacl_irt/irt_manifest.h" 12 #include "ppapi/nacl_irt/irt_manifest.h"
13 #include "ppapi/nacl_irt/plugin_startup.h" 13 #include "ppapi/nacl_irt/plugin_startup.h"
14 #include "ppapi/proxy/ppapi_messages.h" 14 #include "ppapi/proxy/ppapi_messages.h"
15 15
16 namespace ppapi { 16 namespace ppapi {
17 17
18 const char kFilePrefix[] = "files/"; 18 const char kFilePrefix[] = "files/";
19 19
20 ManifestService::ManifestService( 20 ManifestService::ManifestService(
21 const IPC::ChannelHandle& handle, 21 const IPC::ChannelHandle& handle,
22 scoped_refptr<base::MessageLoopProxy> io_message_loop, 22 scoped_refptr<base::MessageLoopProxy> io_message_loop,
23 base::WaitableEvent* shutdown_event) { 23 base::WaitableEvent* shutdown_event) {
24 filter_ = new IPC::SyncMessageFilter(shutdown_event); 24 filter_ = new IPC::SyncMessageFilter(shutdown_event);
25 channel_ = IPC::ChannelProxy::CreateServer(handle, 25 channel_.reset(new IPC::ChannelProxy(handle,
26 NULL, // Listener 26 IPC::Channel::MODE_SERVER,
27 io_message_loop); 27 NULL, // Listener
28 io_message_loop));
28 channel_->AddFilter(filter_.get()); 29 channel_->AddFilter(filter_.get());
29 } 30 }
30 31
31 ManifestService::~ManifestService() { 32 ManifestService::~ManifestService() {
32 } 33 }
33 34
34 void ManifestService::StartupInitializationComplete() { 35 void ManifestService::StartupInitializationComplete() {
35 filter_->Send(new PpapiHostMsg_StartupInitializationComplete); 36 filter_->Send(new PpapiHostMsg_StartupInitializationComplete);
36 } 37 }
37 38
(...skipping 21 matching lines...) Expand all
59 ManifestService* manifest_service = GetManifestService(); 60 ManifestService* manifest_service = GetManifestService();
60 if (manifest_service == NULL || 61 if (manifest_service == NULL ||
61 !manifest_service->OpenResource(file, fd)) { 62 !manifest_service->OpenResource(file, fd)) {
62 return NACL_ABI_EIO; 63 return NACL_ABI_EIO;
63 } 64 }
64 65
65 return (*fd == -1) ? NACL_ABI_ENOENT : 0; 66 return (*fd == -1) ? NACL_ABI_ENOENT : 0;
66 } 67 }
67 68
68 } // namespace ppapi 69 } // namespace ppapi
OLDNEW
« no previous file with comments | « trunk/src/ipc/ipc_test_base.cc ('k') | trunk/src/ppapi/nacl_irt/ppapi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698