X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fxwalk%2Fapplication%2Fcommon%2Fapplication_storage.h;fp=src%2Fxwalk%2Fapplication%2Fbrowser%2Fapplication_storage.h;h=bb4c3dc59b83e30a9ff823d8a0cc8dedcdb47351;hb=7ff13776d9adf6dd69919761cbe6ea5a97d63522;hp=3733d4f38ab23f3827ee2221553a5b8fbf2eedd0;hpb=04892e462a62c07008a1901beb56d64f95b1087d;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/xwalk/application/browser/application_storage.h b/src/xwalk/application/common/application_storage.h similarity index 62% rename from src/xwalk/application/browser/application_storage.h rename to src/xwalk/application/common/application_storage.h index 3733d4f..bb4c3dc 100644 --- a/src/xwalk/application/browser/application_storage.h +++ b/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 #include #include #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 app_data); - bool RemoveApplication(const std::string& id); + bool RemoveApplication(const std::string& app_id); bool UpdateApplication(scoped_refptr app_data); bool Contains(const std::string& app_id) const; scoped_refptr 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& app_ids) const; // NOLINT private: - bool Insert(scoped_refptr app_data); - base::FilePath data_path_; scoped_ptr 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_