summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_applications/web_app.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/web_applications/web_app.h')
-rw-r--r--chrome/browser/web_applications/web_app.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index 7436663..1fc5a5a 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -24,6 +24,14 @@ class ImageFamily;
namespace web_app {
+// Policy on whether to create duplicate shortcuts.
+enum ShortcutCreationPolicy {
+ // Duplicate shortcuts may be created, at the discretion of the
+ // implementation.
+ ALLOW_DUPLICATE_SHORTCUTS,
+ DONT_CREATE_DUPLICATE_SHORTCUTS
+};
+
// Gets the user data directory for given web app. The path for the directory is
// based on |extension_id|. If |extension_id| is empty then |url| is used
// to construct a unique ID.
@@ -56,7 +64,8 @@ std::string GetExtensionIdFromApplicationName(const std::string& app_name);
// |creation_locations| contains information about where to create them.
void CreateShortcuts(
const ShellIntegration::ShortcutInfo& shortcut_info,
- const ShellIntegration::ShortcutLocations& creation_locations);
+ const ShellIntegration::ShortcutLocations& creation_locations,
+ ShortcutCreationPolicy creation_policy);
// Delete all the shortcuts that have been created for the given
// |shortcut_data| in the profile with |profile_path|.
@@ -75,7 +84,8 @@ void UpdateAllShortcuts(const string16& old_app_title,
// |creation_locations| contains information about where to create them.
bool CreateShortcutsOnFileThread(
const ShellIntegration::ShortcutInfo& shortcut_info,
- const ShellIntegration::ShortcutLocations& creation_locations);
+ const ShellIntegration::ShortcutLocations& creation_locations,
+ ShortcutCreationPolicy creation_policy);
// Returns true if given url is a valid web app url.
bool IsValidUrl(const GURL& url);
@@ -114,7 +124,8 @@ std::vector<base::FilePath> GetShortcutPaths(
bool CreatePlatformShortcuts(
const base::FilePath& shortcut_data_path,
const ShellIntegration::ShortcutInfo& shortcut_info,
- const ShellIntegration::ShortcutLocations& creation_locations);
+ const ShellIntegration::ShortcutLocations& creation_locations,
+ ShortcutCreationPolicy creation_policy);
// Delete all the shortcuts we have added for this extension. This is the
// platform specific implementation of the DeleteAllShortcuts function, and