Upstream version 8.36.161.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / common / application_storage.h
@@ -2,15 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef XWALK_APPLICATION_BROWSER_APPLICATION_STORAGE_H_
-#define XWALK_APPLICATION_BROWSER_APPLICATION_STORAGE_H_
+#ifndef XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_
+#define XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_
 
 #include <map>
 #include <string>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/observer_list.h"
 #include "xwalk/application/common/application_data.h"
 
 namespace xwalk {
@@ -23,26 +22,28 @@ class ApplicationStorage {
 
   bool AddApplication(scoped_refptr<ApplicationData> app_data);
 
-  bool RemoveApplication(const std::string& id);
+  bool RemoveApplication(const std::string& app_id);
 
   bool UpdateApplication(scoped_refptr<ApplicationData> app_data);
 
   bool Contains(const std::string& app_id) const;
 
   scoped_refptr<ApplicationData> GetApplicationData(
-      const std::string& application_id) const;
+      const std::string& app_id) const;
+  // Note: Do not use this method! It is too heavy and it will be
+  // removed.
+  bool GetInstalledApplications(
+      ApplicationData::ApplicationDataMap& apps) const;  // NOLINT
 
-  const ApplicationData::ApplicationDataMap& GetInstalledApplications() const;
+  bool GetInstalledApplicationIDs(
+      std::vector<std::string>& app_ids) const;  // NOLINT
 
  private:
-  bool Insert(scoped_refptr<ApplicationData> app_data);
-  base::FilePath data_path_;
   scoped_ptr<class ApplicationStorageImpl> impl_;
-  ApplicationData::ApplicationDataMap applications_;
   DISALLOW_COPY_AND_ASSIGN(ApplicationStorage);
 };
 
 }  // namespace application
 }  // namespace xwalk
 
-#endif  // XWALK_APPLICATION_BROWSER_APPLICATION_STORAGE_H_
+#endif  // XWALK_APPLICATION_COMMON_APPLICATION_STORAGE_H_