namespace xwalk {
namespace application {
-class ApplicationData;
-
class FileDeleter {
public:
FileDeleter(const base::FilePath& path, bool recursive);
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);