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

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

Issue 652393003: Non-SFI mode: Build ppapi libraries for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "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"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!filter_->Send(new PpapiHostMsg_OpenResource( 97 if (!filter_->Send(new PpapiHostMsg_OpenResource(
98 std::string(kFilePrefix) + file, 98 std::string(kFilePrefix) + file,
99 &ipc_fd, 99 &ipc_fd,
100 &file_token_lo, 100 &file_token_lo,
101 &file_token_hi))) { 101 &file_token_hi))) {
102 LOG(ERROR) << "ManifestService::OpenResource failed:" << file; 102 LOG(ERROR) << "ManifestService::OpenResource failed:" << file;
103 *fd = -1; 103 *fd = -1;
104 return false; 104 return false;
105 } 105 }
106 106
107 #if defined(OS_NACL) 107 #if defined(OS_NACL) && !defined(__native_client_nonsfi__)
Mark Seaborn 2014/10/27 18:59:07 Can use OS_NACL_SFI once your other change is comm
hidehiko 2014/10/28 20:14:00 Done.
108 // File tokens are used internally by NaClIPCAdapter and should have 108 // File tokens are used internally by NaClIPCAdapter and should have
109 // been cleared from the message when it is received here. 109 // been cleared from the message when it is received here.
110 // Note that, on Non-SFI NaCl, the IPC channel is directly connected to the 110 // Note that, on Non-SFI NaCl, the IPC channel is directly connected to the
111 // renderer process, so NaClIPCAdapter does not work. It means, 111 // renderer process, so NaClIPCAdapter does not work. It means,
112 // file_token_{lo,hi} fields may be properly filled, although it is just 112 // file_token_{lo,hi} fields may be properly filled, although it is just
113 // ignored here. 113 // ignored here.
114 CHECK(file_token_lo == 0); 114 CHECK(file_token_lo == 0);
115 CHECK(file_token_hi == 0); 115 CHECK(file_token_hi == 0);
116 #endif 116 #endif
117 117
(...skipping 14 matching lines...) Expand all
132 132
133 ManifestService* manifest_service = GetManifestService(); 133 ManifestService* manifest_service = GetManifestService();
134 if (manifest_service == NULL || 134 if (manifest_service == NULL ||
135 !manifest_service->OpenResource(file, fd)) { 135 !manifest_service->OpenResource(file, fd)) {
136 return NACL_ABI_EIO; 136 return NACL_ABI_EIO;
137 } 137 }
138 return (*fd == -1) ? NACL_ABI_ENOENT : 0; 138 return (*fd == -1) ? NACL_ABI_ENOENT : 0;
139 } 139 }
140 140
141 } // namespace ppapi 141 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698