OLD | NEW |
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 if (load_manager->DevInterfacesEnabled()) | 413 if (load_manager->DevInterfacesEnabled()) |
414 perm_bits |= ppapi::PERMISSION_DEV; | 414 perm_bits |= ppapi::PERMISSION_DEV; |
415 instance_info.permissions = | 415 instance_info.permissions = |
416 ppapi::PpapiPermissions::GetForCommandLine(perm_bits); | 416 ppapi::PpapiPermissions::GetForCommandLine(perm_bits); |
417 std::string error_message_string; | 417 std::string error_message_string; |
418 NaClLaunchResult launch_result; | 418 NaClLaunchResult launch_result; |
419 | 419 |
420 IPC::PlatformFileForTransit nexe_for_transit = | 420 IPC::PlatformFileForTransit nexe_for_transit = |
421 IPC::InvalidPlatformFileForTransit(); | 421 IPC::InvalidPlatformFileForTransit(); |
422 | 422 |
423 std::vector<std::pair< | 423 base::StringPairs resource_files_to_prefetch; |
424 std::string /*key*/, std::string /*url*/> > resource_files_to_prefetch; | |
425 if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) { | 424 if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) { |
426 JsonManifest* manifest = GetJsonManifest(instance); | 425 JsonManifest* manifest = GetJsonManifest(instance); |
427 if (manifest) | 426 if (manifest) |
428 manifest->GetPrefetchableFiles(&resource_files_to_prefetch); | 427 manifest->GetPrefetchableFiles(&resource_files_to_prefetch); |
429 for (size_t i = 0; i < resource_files_to_prefetch.size(); ++i) { | 428 for (size_t i = 0; i < resource_files_to_prefetch.size(); ++i) { |
430 const GURL gurl(resource_files_to_prefetch[i].second); | 429 const GURL gurl(resource_files_to_prefetch[i].second); |
431 // Important security check. Do not remove. | 430 // Important security check. Do not remove. |
432 if (!CanOpenViaFastPath(plugin_instance, gurl)) { | 431 if (!CanOpenViaFastPath(plugin_instance, gurl)) { |
433 resource_files_to_prefetch.clear(); | 432 resource_files_to_prefetch.clear(); |
434 break; | 433 break; |
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 &StreamPexe | 1706 &StreamPexe |
1708 }; | 1707 }; |
1709 | 1708 |
1710 } // namespace | 1709 } // namespace |
1711 | 1710 |
1712 const PPB_NaCl_Private* GetNaClPrivateInterface() { | 1711 const PPB_NaCl_Private* GetNaClPrivateInterface() { |
1713 return &nacl_interface; | 1712 return &nacl_interface; |
1714 } | 1713 } |
1715 | 1714 |
1716 } // namespace nacl | 1715 } // namespace nacl |
OLD | NEW |