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

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: Remove ipc/ and mojo/ changes following Mark's suggestion Created 6 years 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 "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/c/pp_array_output.h" 13 #include "ppapi/c/pp_array_output.h"
13 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/private/ppb_nacl_private.h" 15 #include "ppapi/c/private/ppb_nacl_private.h"
15 #include "third_party/jsoncpp/source/include/json/value.h" 16 #include "third_party/jsoncpp/source/include/json/value.h"
16 17
17 namespace nacl { 18 namespace nacl {
18 class JsonManifest; 19 class JsonManifest;
19 class NexeLoadManager; 20 class NexeLoadManager;
(...skipping 23 matching lines...) Expand all
43 // true if the manifest parses correctly and matches the schema. 44 // true if the manifest parses correctly and matches the schema.
44 bool Init(const std::string& json_manifest, ErrorInfo* error_info); 45 bool Init(const std::string& json_manifest, ErrorInfo* error_info);
45 46
46 // Gets the full program URL for the current sandbox ISA from the 47 // Gets the full program URL for the current sandbox ISA from the
47 // manifest file. 48 // manifest file.
48 bool GetProgramURL(std::string* full_url, 49 bool GetProgramURL(std::string* full_url,
49 PP_PNaClOptions* pnacl_options, 50 PP_PNaClOptions* pnacl_options,
50 bool* uses_nonsfi_mode, 51 bool* uses_nonsfi_mode,
51 ErrorInfo* error_info) const; 52 ErrorInfo* error_info) const;
52 53
54 // Gets all the URLs and their keys in the "files" section.
55 bool GetFiles(
56 std::vector<std::pair<std::string, std::string> >* out_files) const;
57
53 // Resolves a key from the "files" section to a fully resolved URL, 58 // Resolves a key from the "files" section to a fully resolved URL,
54 // i.e., relative URL values are fully expanded relative to the 59 // i.e., relative URL values are fully expanded relative to the
55 // manifest's URL (via ResolveURL). 60 // manifest's URL (via ResolveURL).
56 // If there was an error, details are reported via error_info. 61 // If there was an error, details are reported via error_info.
57 bool ResolveKey(const std::string& key, 62 bool ResolveKey(const std::string& key,
58 std::string* full_url, 63 std::string* full_url,
59 PP_PNaClOptions* pnacl_options) const; 64 PP_PNaClOptions* pnacl_options) const;
60 65
61 private: 66 private:
62 bool MatchesSchema(ErrorInfo* error_info); 67 bool MatchesSchema(ErrorInfo* error_info);
(...skipping 13 matching lines...) Expand all
76 bool nonsfi_enabled_; 81 bool nonsfi_enabled_;
77 bool pnacl_debug_; 82 bool pnacl_debug_;
78 83
79 // The dictionary of manifest information parsed in Init(). 84 // The dictionary of manifest information parsed in Init().
80 Json::Value dictionary_; 85 Json::Value dictionary_;
81 }; 86 };
82 87
83 } // namespace nacl 88 } // namespace nacl
84 89
85 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H 90 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698