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

Side by Side Diff: components/nacl/renderer/json_manifest.h

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H 5 #ifndef COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H
6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H 6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility>
10 11
11 #include "components/nacl/renderer/ppb_nacl_private.h" 12 #include "components/nacl/renderer/ppb_nacl_private.h"
12 #include "ppapi/c/pp_array_output.h" 13 #include "ppapi/c/pp_array_output.h"
13 #include "third_party/jsoncpp/source/include/json/value.h" 14 #include "third_party/jsoncpp/source/include/json/value.h"
14 15
15 namespace nacl { 16 namespace nacl {
16 class JsonManifest; 17 class JsonManifest;
17 class NexeLoadManager; 18 class NexeLoadManager;
18 19
19 class JsonManifest { 20 class JsonManifest {
(...skipping 12 matching lines...) Expand all
32 // true if the manifest parses correctly and matches the schema. 33 // true if the manifest parses correctly and matches the schema.
33 bool Init(const std::string& json_manifest, ErrorInfo* error_info); 34 bool Init(const std::string& json_manifest, ErrorInfo* error_info);
34 35
35 // Gets the full program URL for the current sandbox ISA from the 36 // Gets the full program URL for the current sandbox ISA from the
36 // manifest file. 37 // manifest file.
37 bool GetProgramURL(std::string* full_url, 38 bool GetProgramURL(std::string* full_url,
38 PP_PNaClOptions* pnacl_options, 39 PP_PNaClOptions* pnacl_options,
39 bool* uses_nonsfi_mode, 40 bool* uses_nonsfi_mode,
40 ErrorInfo* error_info) const; 41 ErrorInfo* error_info) const;
41 42
43 // Gets all the keys and their URLs in the "files" section that are
44 // prefetchable.
45 void GetPrefetchableFiles(
46 std::vector<std::pair<std::string, std::string> >* out_files) const;
47
42 // Resolves a key from the "files" section to a fully resolved URL, 48 // Resolves a key from the "files" section to a fully resolved URL,
43 // i.e., relative URL values are fully expanded relative to the 49 // i.e., relative URL values are fully expanded relative to the
44 // manifest's URL (via ResolveURL). 50 // manifest's URL (via ResolveURL).
45 // If there was an error, details are reported via error_info. 51 // If there was an error, details are reported via error_info.
46 bool ResolveKey(const std::string& key, 52 bool ResolveKey(const std::string& key,
47 std::string* full_url, 53 std::string* full_url,
48 PP_PNaClOptions* pnacl_options) const; 54 PP_PNaClOptions* pnacl_options) const;
49 55
50 private: 56 private:
51 bool MatchesSchema(ErrorInfo* error_info); 57 bool MatchesSchema(ErrorInfo* error_info);
(...skipping 13 matching lines...) Expand all
65 bool nonsfi_enabled_; 71 bool nonsfi_enabled_;
66 bool pnacl_debug_; 72 bool pnacl_debug_;
67 73
68 // The dictionary of manifest information parsed in Init(). 74 // The dictionary of manifest information parsed in Init().
69 Json::Value dictionary_; 75 Json::Value dictionary_;
70 }; 76 };
71 77
72 } // namespace nacl 78 } // namespace nacl
73 79
74 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H 80 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H
OLDNEW
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_listener.cc ('k') | components/nacl/renderer/json_manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698