Upstream version 9.38.207.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / common / application_file_util.h
index 30e07f4..82aa89c 100644 (file)
@@ -22,8 +22,6 @@ class FilePath;
 namespace xwalk {
 namespace application {
 
-class ApplicationData;
-
 class FileDeleter {
  public:
   FileDeleter(const base::FilePath& path, bool recursive);
@@ -37,33 +35,21 @@ class FileDeleter {
   bool recursive_;
 };
 
-// Loads and validates an application from the specified directory. Returns NULL
+// Loads an application manifest from the specified directory. Returns NULL
 // on failure, with a description of the error in |error|.
-scoped_refptr<ApplicationData> LoadApplication(
-    const base::FilePath& application_root,
-    ApplicationData::SourceType source_type,
-    std::string* error);
+scoped_ptr<Manifest> LoadManifest(
+    const base::FilePath& file_path, Manifest::Type type, std::string* error);
 
-// The same as LoadApplication except use the provided |application_id|.
-scoped_refptr<ApplicationData> LoadApplication(
-    const base::FilePath& application_root,
-    const std::string& application_id,
-    ApplicationData::SourceType source_type,
-    std::string* error);
+base::FilePath GetManifestPath(
+    const base::FilePath& app_directory, Manifest::Type type);
 
+// Loads and validates an application from the specified directory. Returns NULL
+// on failure, with a description of the error in |error|.
 scoped_refptr<ApplicationData> LoadApplication(
-    const base::FilePath& application_root,
-    const std::string& application_id,
-    ApplicationData::SourceType source_type,
-    Package::Type package_type,
+    const base::FilePath& app_root, const std::string& app_id,
+    ApplicationData::SourceType source_type, Manifest::Type manifest_type,
     std::string* error);
 
-// Loads an application manifest from the specified directory. Returns NULL
-// on failure, with a description of the error in |error|.
-base::DictionaryValue* LoadManifest(const base::FilePath& application_root,
-                                    Package::Type package_type,
-                                    std::string* error);
-
 // Get a relative file path from an app:// URL.
 base::FilePath ApplicationURLToRelativeFilePath(const GURL& url);