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

Side by Side Diff: components/nacl/renderer/plugin/plugin.cc

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years, 10 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 (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 "components/nacl/renderer/plugin/plugin.h" 5 #include "components/nacl/renderer/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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 program_url, 352 program_url,
353 pnacl_options, 353 pnacl_options,
354 translate_callback)); 354 translate_callback));
355 return; 355 return;
356 } else { 356 } else {
357 pp::CompletionCallback open_callback = 357 pp::CompletionCallback open_callback =
358 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); 358 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen);
359 // Will always call the callback on success or failure. 359 // Will always call the callback on success or failure.
360 nacl_interface_->DownloadNexe(pp_instance(), 360 nacl_interface_->DownloadNexe(pp_instance(),
361 program_url.c_str(), 361 program_url.c_str(),
362 // pre-open resource files on nonsfi mode
363 // TODO(yusukes): Enable the feature for
364 // SFI-NaCl too.
365 uses_nonsfi_mode,
362 &nexe_file_info_, 366 &nexe_file_info_,
363 open_callback.pp_completion_callback()); 367 open_callback.pp_completion_callback());
364 return; 368 return;
365 } 369 }
366 } 370 }
367 } 371 }
368 372
369 void Plugin::ReportLoadError(const ErrorInfo& error_info) { 373 void Plugin::ReportLoadError(const ErrorInfo& error_info) {
370 nacl_interface_->ReportLoadError(pp_instance(), 374 nacl_interface_->ReportLoadError(pp_instance(),
371 error_info.error_code(), 375 error_info.error_code(),
372 error_info.message().c_str()); 376 error_info.message().c_str());
373 } 377 }
374 378
375 } // namespace plugin 379 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698