blob: 642e9e386df500808996642515e157e9644b696a [file] [log] [blame]
Alexey Baskakov2f8bf8162018-07-17 01:06:111// Copyright 2018 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.
4
5#ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_HELPERS_H_
6#define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_HELPERS_H_
7
8#include <string>
9
10class GURL;
11
12namespace web_app {
13
14// Compute a deterministic name based on the URL. We use this pseudo name
15// as a key to store window location per application URLs in Browser and
16// as app id for BrowserWindow, shortcut and jump list.
17std::string GenerateApplicationNameFromURL(const GURL& url);
18
Alexey Baskakovf302efe2018-07-28 02:02:3219// Compute a deterministic name based on an apps's id.
20std::string GenerateApplicationNameFromAppId(const std::string& app_id);
21
22// Extracts the application id from the app name.
23std::string GetAppIdFromApplicationName(const std::string& app_name);
24
Alexey Baskakov2f8bf8162018-07-17 01:06:1125} // namespace web_app
26
27#endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_HELPERS_H_