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

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: review Created 5 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
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<std::pair< 424 std::vector<std::pair<
425 std::string /*key*/, std::string /*url*/> > resource_files_to_prefetch; 425 std::string /*key*/, std::string /*url*/> > resource_files_to_prefetch;
426 if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) { 426 if (process_type == kNativeNaClProcessType) {
427 JsonManifest* manifest = GetJsonManifest(instance); 427 JsonManifest* manifest = GetJsonManifest(instance);
428 if (manifest) 428 if (manifest)
429 manifest->GetPrefetchableFiles(&resource_files_to_prefetch); 429 manifest->GetPrefetchableFiles(&resource_files_to_prefetch);
430 for (size_t i = 0; i < resource_files_to_prefetch.size(); ++i) { 430 for (size_t i = 0; i < resource_files_to_prefetch.size(); ++i) {
431 const GURL gurl(resource_files_to_prefetch[i].second); 431 const GURL gurl(resource_files_to_prefetch[i].second);
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_files_to_prefetch.clear(); 434 resource_files_to_prefetch.clear();
435 break; 435 break;
436 } 436 }
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 &StreamPexe 1727 &StreamPexe
1728 }; 1728 };
1729 1729
1730 } // namespace 1730 } // namespace
1731 1731
1732 const PPB_NaCl_Private* GetNaClPrivateInterface() { 1732 const PPB_NaCl_Private* GetNaClPrivateInterface() {
1733 return &nacl_interface; 1733 return &nacl_interface;
1734 } 1734 }
1735 1735
1736 } // namespace nacl 1736 } // namespace nacl
OLDNEW
« components/nacl/loader/nacl_listener.cc ('K') | « components/nacl/loader/nacl_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698