1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_
6 #define XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_
11 #include "base/memory/ref_counted.h"
12 #include "xwalk/application/common/application_data.h"
15 namespace application {
17 class ApplicationStorage {
19 explicit ApplicationStorage(const base::FilePath& path);
20 ~ApplicationStorage();
22 bool AddApplication(scoped_refptr<ApplicationData> app_data);
24 bool RemoveApplication(const std::string& app_id);
26 bool UpdateApplication(scoped_refptr<ApplicationData> app_data);
28 bool Contains(const std::string& app_id) const;
30 scoped_refptr<ApplicationData> GetApplicationData(
31 const std::string& app_id) const;
33 bool GetInstalledApplicationIDs(
34 std::vector<std::string>& app_ids) const; // NOLINT
37 scoped_ptr<class ApplicationStorageImpl> impl_;
38 DISALLOW_COPY_AND_ASSIGN(ApplicationStorage);
41 } // namespace application
44 #endif // XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_