1 // Copyright (c) 2013 The Chromium Authors. 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_ID_UTIL_H_
6 #define XWALK_APPLICATION_COMMON_ID_UTIL_H_
10 #include "xwalk/application/common/application_data.h"
17 namespace application {
18 // Generates an application ID from arbitrary input. The same input string will
19 // always generate the same output ID.
20 std::string GenerateId(const std::string& input);
22 // Generate an ID for an application in the given path.
23 // Used while developing applications, before they have a key.
24 std::string GenerateIdForPath(const base::FilePath& path);
26 // Checks to see if the application has a valid ID.
27 bool IsValidApplicationID(const std::string& id);
30 std::string GetPackageIdFromAppId(const std::string& app_id);
33 } // namespace application
36 #endif // XWALK_APPLICATION_COMMON_ID_UTIL_H_