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

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

Issue 2349713003: IPC::MessageFilter::OnFilterAdded: IPC::Sender -> IPC::Channel (Closed)
Patch Set: . Created 4 years, 3 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 "ppapi/nacl_irt/manifest_service.h" 5 #include "ppapi/nacl_irt/manifest_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 26 matching lines...) Expand all
37 base::WaitableEvent::InitialState::NOT_SIGNALED) {} 37 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
38 38
39 bool Send(IPC::Message* message) override { 39 bool Send(IPC::Message* message) override {
40 // Wait until set up is actually done. 40 // Wait until set up is actually done.
41 connected_event_.Wait(); 41 connected_event_.Wait();
42 return SyncMessageFilter::Send(message); 42 return SyncMessageFilter::Send(message);
43 } 43 }
44 44
45 // When set up is done, OnFilterAdded is called on IO thread. Unblocks the 45 // When set up is done, OnFilterAdded is called on IO thread. Unblocks the
46 // Send(). 46 // Send().
47 void OnFilterAdded(IPC::Sender* sender) override { 47 void OnFilterAdded(IPC::Channel* channel) override {
48 SyncMessageFilter::OnFilterAdded(sender); 48 SyncMessageFilter::OnFilterAdded(channel);
49 connected_event_.Signal(); 49 connected_event_.Signal();
50 } 50 }
51 51
52 // If an error is found, unblocks the Send(), too, to return an error. 52 // If an error is found, unblocks the Send(), too, to return an error.
53 void OnChannelError() override { 53 void OnChannelError() override {
54 SyncMessageFilter::OnChannelError(); 54 SyncMessageFilter::OnChannelError();
55 connected_event_.Signal(); 55 connected_event_.Signal();
56 } 56 }
57 57
58 // Similar to OnChannelError, unblocks the Send() on the channel closing. 58 // Similar to OnChannelError, unblocks the Send() on the channel closing.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 ManifestService* manifest_service = GetManifestService(); 163 ManifestService* manifest_service = GetManifestService();
164 if (manifest_service == NULL || 164 if (manifest_service == NULL ||
165 !manifest_service->OpenResource(file, fd)) { 165 !manifest_service->OpenResource(file, fd)) {
166 return NACL_ABI_EIO; 166 return NACL_ABI_EIO;
167 } 167 }
168 return (*fd == -1) ? NACL_ABI_ENOENT : 0; 168 return (*fd == -1) ? NACL_ABI_ENOENT : 0;
169 } 169 }
170 170
171 } // namespace ppapi 171 } // namespace ppapi
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.cc ('k') | ppapi/proxy/plugin_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698