Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Unified Diff: chrome/browser/shell_integration_linux.h

Issue 10698114: Remove app shortcuts when app is uninstalled on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fix Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_linux.h
diff --git a/chrome/browser/shell_integration_linux.h b/chrome/browser/shell_integration_linux.h
index 588625094e4738a1cb13fcbe142b43691d950065..643068a1466ecae2b6213b7b142f1edfe49c19c4 100644
--- a/chrome/browser/shell_integration_linux.h
+++ b/chrome/browser/shell_integration_linux.h
@@ -26,7 +26,12 @@ bool GetDesktopShortcutTemplate(base::Environment* env,
std::string* output);
// Returns filename for .desktop file based on |url|, sanitized for security.
-FilePath GetDesktopShortcutFilename(const GURL& url);
+FilePath GetWebShortcutFilename(const GURL& url);
+
+// Returns filename for .desktop file based on |profile_path| and
+// |extension_id|, sanitized for security.
+FilePath GetExtensionShortcutFilename(const FilePath& profile_path,
+ const std::string& extension_id);
// Returns contents for .desktop file based on |template_contents|, |url|
// and |title|. The |template_contents| should be contents of .desktop file
@@ -41,9 +46,20 @@ std::string GetDesktopFileContents(const std::string& template_contents,
const std::string& icon_name,
const FilePath& profile_path);
+
+// Create shortcuts on the desktop or in the application menu (as specified by
+// |shortcut_info|), for the web page or extension in |shortcut_info|. Use the
+// shortcut template contained in |shortcut_template|.
+// For extensions, duplicate shortcuts are avoided, so if a requested shortcut
+// already exists it is deleted first.
bool CreateDesktopShortcut(const ShellIntegration::ShortcutInfo& shortcut_info,
const std::string& shortcut_template);
+// Delete any desktop shortcuts on desktop or in the application menu that have
+// been added for the extension with |extension_id| in |profile_path|.
+void DeleteDesktopShortcuts(const FilePath& profile_path,
+ const std::string& extension_id);
+
} // namespace ShellIntegrationLinux
#endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698