Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ppapi / native_client / src / trusted / plugin / pnacl_resources.h
index 3363e17..7cefa6f 100644 (file)
@@ -35,11 +35,7 @@ class PnaclUrls {
 
   // 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
@@ -48,11 +44,9 @@ class PnaclUrls {
 class PnaclResources {
  public:
   PnaclResources(Plugin* plugin,
-                 PnaclCoordinator* coordinator,
-                 const Manifest* manifest)
+                 PnaclCoordinator* coordinator)
       : plugin_(plugin),
-        coordinator_(coordinator),
-        manifest_(manifest) {
+        coordinator_(coordinator) {
   }
   virtual ~PnaclResources();
 
@@ -66,13 +60,8 @@ class 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;
@@ -90,23 +79,13 @@ class PnaclResources {
   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;