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: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 224803002: Enable mmap and identity-based validation caching on pnacl-{llc,ld}.nexe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix token handover for main nexe Created 6 years, 8 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 | « components/nacl/common/nacl_host_messages.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/nacl/renderer/ppb_nacl_private_impl.h" 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 uint32_t options) { 355 uint32_t options) {
356 #if defined(OS_WIN) 356 #if defined(OS_WIN)
357 return content::BrokerDuplicateHandle(source_handle, process_id, 357 return content::BrokerDuplicateHandle(source_handle, process_id,
358 target_handle, desired_access, 358 target_handle, desired_access,
359 options); 359 options);
360 #else 360 #else
361 return 0; 361 return 0;
362 #endif 362 #endif
363 } 363 }
364 364
365 PP_FileHandle GetReadonlyPnaclFD(const char* filename) { 365 PP_FileHandle GetReadonlyPnaclFD(const char* filename,
366 PP_Bool is_executable,
367 uint64_t* nonce_lo,
368 uint64_t* nonce_hi) {
366 IPC::PlatformFileForTransit out_fd = IPC::InvalidPlatformFileForTransit(); 369 IPC::PlatformFileForTransit out_fd = IPC::InvalidPlatformFileForTransit();
367 IPC::Sender* sender = content::RenderThread::Get(); 370 IPC::Sender* sender = content::RenderThread::Get();
368 DCHECK(sender); 371 DCHECK(sender);
372 *nonce_lo = 0;
373 *nonce_hi = 0;
369 if (!sender->Send(new NaClHostMsg_GetReadonlyPnaclFD( 374 if (!sender->Send(new NaClHostMsg_GetReadonlyPnaclFD(
370 std::string(filename), 375 std::string(filename), PP_ToBool(is_executable),
371 &out_fd))) { 376 &out_fd, nonce_lo, nonce_hi))) {
372 return base::kInvalidPlatformFileValue; 377 return base::kInvalidPlatformFileValue;
373 } 378 }
374 if (out_fd == IPC::InvalidPlatformFileForTransit()) { 379 if (out_fd == IPC::InvalidPlatformFileForTransit()) {
375 return base::kInvalidPlatformFileValue; 380 return base::kInvalidPlatformFileValue;
376 } 381 }
377 base::PlatformFile handle = 382 base::PlatformFile handle =
378 IPC::PlatformFileForTransitToPlatformFile(out_fd); 383 IPC::PlatformFileForTransitToPlatformFile(out_fd);
379 return handle; 384 return handle;
380 } 385 }
381 386
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 768
764 } // namespace 769 } // namespace
765 770
766 namespace nacl { 771 namespace nacl {
767 772
768 const PPB_NaCl_Private* GetNaClPrivateInterface() { 773 const PPB_NaCl_Private* GetNaClPrivateInterface() {
769 return &nacl_interface; 774 return &nacl_interface;
770 } 775 }
771 776
772 } // namespace nacl 777 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/common/nacl_host_messages.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698