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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 728113002: obsolete: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/native_client/src/trusted/plugin/plugin.h" 5 #include "ppapi/native_client/src/trusted/plugin/plugin.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 program_url, 409 program_url,
410 pnacl_options, 410 pnacl_options,
411 translate_callback)); 411 translate_callback));
412 return; 412 return;
413 } else { 413 } else {
414 pp::CompletionCallback open_callback = 414 pp::CompletionCallback open_callback =
415 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); 415 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen);
416 // Will always call the callback on success or failure. 416 // Will always call the callback on success or failure.
417 nacl_interface_->DownloadNexe(pp_instance(), 417 nacl_interface_->DownloadNexe(pp_instance(),
418 program_url.c_str(), 418 program_url.c_str(),
419 // pre-open resource files on nonsfi mode
420 // TODO(yusukes): Enable the feature for
421 // SFI-NaCl too.
422 uses_nonsfi_mode,
423 &nexe_file_info_, 419 &nexe_file_info_,
424 &resource_file_handles_, 420 &resource_file_handles_,
425 &resource_file_handles_len_, 421 &resource_file_handles_len_,
426 open_callback.pp_completion_callback()); 422 open_callback.pp_completion_callback());
427 return; 423 return;
428 } 424 }
429 } 425 }
430 } 426 }
431 427
432 void Plugin::ReportLoadError(const ErrorInfo& error_info) { 428 void Plugin::ReportLoadError(const ErrorInfo& error_info) {
433 nacl_interface_->ReportLoadError(pp_instance(), 429 nacl_interface_->ReportLoadError(pp_instance(),
434 error_info.error_code(), 430 error_info.error_code(),
435 error_info.message().c_str()); 431 error_info.message().c_str());
436 } 432 }
437 433
438 } // namespace plugin 434 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_nacl_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698