const std::string& explicit_id,
std::string* error_message);
- // Checks to see if the application has a valid ID.
- static bool IsIDValid(const std::string& id);
+ static scoped_refptr<ApplicationData> Create(const GURL& url,
+ std::string* error_message);
Manifest::Type GetType() const;
const std::string& Name() const { return name_; }
const std::string& NonLocalizedName() const { return non_localized_name_; }
const std::string& Description() const { return description_; }
- int ManifestVersion() const { return manifest_version_; }
const Manifest* GetManifest() const {
return manifest_.get();
friend class base::RefCountedThreadSafe<ApplicationData>;
friend class ApplicationStorageImpl;
- // Chooses the application ID for an application based on a variety of
- // criteria. The chosen ID will be set in |manifest|.
- static bool InitApplicationID(Manifest* manifest,
- const base::FilePath& path,
- const std::string& explicit_id,
- base::string16* error);
-
ApplicationData(const base::FilePath& path,
scoped_ptr<Manifest> manifest);
virtual ~ApplicationData();
// Initialize the application from a parsed manifest.
- bool Init(base::string16* error);
+ bool Init(const std::string& explicit_id, base::string16* error);
+ // Chooses the application ID for an application based on a variety of
+ // criteria. The chosen ID will be set in |manifest|.
+ bool LoadID(const std::string& explicit_id, base::string16* error);
// The following are helpers for InitFromValue to load various features of the
// application from the manifest.
bool LoadName(base::string16* error);
bool LoadVersion(base::string16* error);
bool LoadDescription(base::string16* error);
- bool LoadManifestVersion(base::string16* error);
// The application's human-readable name. Name is used for display purpose. It
// might be wrapped with unicode bidi control characters so that it is