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

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

Issue 1010183002: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address all comments Created 5 years, 7 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
« no previous file with comments | « components/nacl/loader/nacl_listener.cc ('k') | no next file » | 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 <numeric> 7 #include <numeric>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 perm_bits |= ppapi::PERMISSION_DEV; 415 perm_bits |= ppapi::PERMISSION_DEV;
416 instance_info.permissions = 416 instance_info.permissions =
417 ppapi::PpapiPermissions::GetForCommandLine(perm_bits); 417 ppapi::PpapiPermissions::GetForCommandLine(perm_bits);
418 std::string error_message_string; 418 std::string error_message_string;
419 NaClLaunchResult launch_result; 419 NaClLaunchResult launch_result;
420 420
421 IPC::PlatformFileForTransit nexe_for_transit = 421 IPC::PlatformFileForTransit nexe_for_transit =
422 IPC::InvalidPlatformFileForTransit(); 422 IPC::InvalidPlatformFileForTransit();
423 423
424 std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list; 424 std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list;
425 if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) { 425 if (process_type == kNativeNaClProcessType) {
426 JsonManifest* manifest = GetJsonManifest(instance); 426 JsonManifest* manifest = GetJsonManifest(instance);
427 if (manifest) { 427 if (manifest) {
428 manifest->GetPrefetchableFiles(&resource_prefetch_request_list); 428 manifest->GetPrefetchableFiles(&resource_prefetch_request_list);
429 429
430 for (size_t i = 0; i < resource_prefetch_request_list.size(); ++i) { 430 for (size_t i = 0; i < resource_prefetch_request_list.size(); ++i) {
431 const GURL gurl(resource_prefetch_request_list[i].resource_url); 431 const GURL gurl(resource_prefetch_request_list[i].resource_url);
432 // Important security check. Do not remove. 432 // Important security check. Do not remove.
433 if (!CanOpenViaFastPath(plugin_instance, gurl)) { 433 if (!CanOpenViaFastPath(plugin_instance, gurl)) {
434 resource_prefetch_request_list.clear(); 434 resource_prefetch_request_list.clear();
435 break; 435 break;
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 &StreamPexe 1709 &StreamPexe
1710 }; 1710 };
1711 1711
1712 } // namespace 1712 } // namespace
1713 1713
1714 const PPB_NaCl_Private* GetNaClPrivateInterface() { 1714 const PPB_NaCl_Private* GetNaClPrivateInterface() {
1715 return &nacl_interface; 1715 return &nacl_interface;
1716 } 1716 }
1717 1717
1718 } // namespace nacl 1718 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698