// Get the URL for the resource info JSON file that contains information
// about loadable resources.
- static const nacl::string GetResourceInfoUrl() {
- return nacl::string(kResourceInfoUrl);
- }
- private:
- static const char kResourceInfoUrl[];
+ static nacl::string GetResourceInfoUrl();
};
// Loads a list of resources, providing a way to get file descriptors for
class PnaclResources {
public:
PnaclResources(Plugin* plugin,
- PnaclCoordinator* coordinator,
- const Manifest* manifest)
+ PnaclCoordinator* coordinator)
: plugin_(plugin),
- coordinator_(coordinator),
- manifest_(manifest) {
+ coordinator_(coordinator) {
}
virtual ~PnaclResources();
virtual void StartLoad(
const pp::CompletionCallback& all_loaded_callback);
- const nacl::string& GetLlcUrl() {
- return llc_tool_name;
- }
-
- const nacl::string& GetLdUrl() {
- return ld_tool_name;
- }
+ const nacl::string& GetLlcUrl() { return llc_tool_name_; }
+ const nacl::string& GetLdUrl() { return ld_tool_name_; }
nacl::string GetFullUrl(const nacl::string& partial_url,
const nacl::string& sandbox_arch) const;
Plugin* plugin_;
// The coordinator responsible for reporting errors, etc.
PnaclCoordinator* coordinator_;
- // The manifest for looking up resource URLs.
- const Manifest* manifest_;
// The descriptor wrappers for the downloaded URLs. Only valid
// once all_loaded_callback_ has been invoked.
std::map<nacl::string, nacl::DescWrapper*> resource_wrappers_;
// Tool names for llc and ld; read from the resource info file.
- nacl::string llc_tool_name;
- nacl::string ld_tool_name;
-
- // Parses resource info json data in |buf|. Returns true if successful.
- // Otherwise returns false and places an error message in |errmsg|.
- bool ParseResourceInfo(const nacl::string& buf, nacl::string& errmsg);
-
- // Convenience function for reporting an error while reading the resource
- // info file.
- void ReadResourceInfoError(const nacl::string& msg);
+ nacl::string llc_tool_name_;
+ nacl::string ld_tool_name_;
};
} // namespace plugin;