summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_applications
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 06:41:50 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 06:41:50 +0000
commit30cdf3af7e307e5334895b439ea63c29025f7650 (patch)
treec7e9d81dc6d214737b894296a5356eb9b7875dbe /chrome/browser/web_applications
parent914636612ba4bf032b809e1dcf09a11f87384515 (diff)
downloadchromium_src-30cdf3af7e307e5334895b439ea63c29025f7650.zip
chromium_src-30cdf3af7e307e5334895b439ea63c29025f7650.tar.gz
chromium_src-30cdf3af7e307e5334895b439ea63c29025f7650.tar.bz2
Revert 146065 - Remove app shortcuts when app is uninstalled on Linux.
To support this, shortcut creation on Linux for extensions has been modified so that the filename encodes the extension ID and the profile. Also, when creating shortcuts any existing shortcuts are removed first. Web page shortcuts are not affected. BUG=130456 TEST=Test uninstalling apps removes their shortcuts; test uninstalling apps is not broken in any way; test shortcuts for web apps are not broken in any way. Review URL: https://chromiumcodereview.appspot.com/10698114 TBR=benwells@chromium.org Review URL: https://chromiumcodereview.appspot.com/10735048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_applications')
-rw-r--r--chrome/browser/web_applications/web_app.cc14
-rw-r--r--chrome/browser/web_applications/web_app.h11
-rw-r--r--chrome/browser/web_applications/web_app_linux.cc5
-rw-r--r--chrome/browser/web_applications/web_app_win.cc5
4 files changed, 2 insertions, 33 deletions
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index c2b2a34..a502b5a 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -127,18 +127,8 @@ void CreateShortcut(
BrowserThread::FILE,
FROM_HERE,
base::Bind(base::IgnoreResult(&CreateShortcutOnFileThread),
- profile_path, shortcut_info));
-}
-
-void DeleteAllShortcuts(const FilePath& profile_path,
- const std::string& extension_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&internals::DeletePlatformShortcuts, profile_path,
- extension_id));
+ profile_path,
+ shortcut_info));
}
bool CreateShortcutOnFileThread(
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index bcd445a..253c88f 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -54,11 +54,6 @@ void CreateShortcut(
const FilePath& profile_path,
const ShellIntegration::ShortcutInfo& shortcut_info);
-// Delete all the shortcuts that have been created for the extension with
-// |extension_id| in the profile with |profile_path|.
-void DeleteAllShortcuts(const FilePath& profile_path,
- const std::string& extension_id);
-
// Creates a shortcut. Must be called on the file thread. This is used to
// implement CreateShortcut() above, and can also be used directly from the
// file thread. |profile_path| is the path of the creating profile.
@@ -102,12 +97,6 @@ bool CreatePlatformShortcut(
const FilePath& profile_path,
const ShellIntegration::ShortcutInfo& shortcut_info);
-// Delete all the shortcuts we have added for this extension. This is the
-// platform specific implementation of the DeleteAllShortcuts function, and
-// is executed on the FILE thread..
-void DeletePlatformShortcuts(const FilePath& profile_path,
- const std::string& extension_id);
-
// Sanitizes |name| and returns a version of it that is safe to use as an
// on-disk file name .
FilePath GetSanitizedFileName(const string16& name);
diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc
index 56d02fbf..e26be43 100644
--- a/chrome/browser/web_applications/web_app_linux.cc
+++ b/chrome/browser/web_applications/web_app_linux.cc
@@ -29,10 +29,5 @@ bool CreatePlatformShortcut(
shortcut_info, shortcut_template);
}
-void DeletePlatformShortcuts(const FilePath& profile_path,
- const std::string& extension_id) {
- ShellIntegrationLinux::DeleteDesktopShortcuts(profile_path, extension_id);
-}
-
} // namespace internals
} // namespace web_app
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
index f5d85bd..f6cbbbf1 100644
--- a/chrome/browser/web_applications/web_app_win.cc
+++ b/chrome/browser/web_applications/web_app_win.cc
@@ -255,11 +255,6 @@ bool CreatePlatformShortcut(
return success;
}
-void DeletePlatformShortcuts(const FilePath& profile_path,
- const std::string& extension_id) {
- // TODO(benwells): Implement this.
-}
-
} // namespace internals
} // namespace web_app