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

Unified Diff: chrome/browser/web_applications/web_app_linux.cc

Issue 2703283005: Destroy web_app::ShortcutInfo on UI thread (Closed)
Patch Set: +TestBrowserThreadBundle Created 3 years, 10 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/web_applications/web_app_chromeos.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_linux.cc
diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc
index 893173b1d85f50758b71b15caf7bdf7b85b34423..b9b929fffd90467dbc62c5cb5137b8df5d22d237 100644
--- a/chrome/browser/web_applications/web_app_linux.cc
+++ b/chrome/browser/web_applications/web_app_linux.cc
@@ -21,14 +21,13 @@ void UpdateShortcutsForAllApps(Profile* profile,
namespace internals {
-bool CreatePlatformShortcuts(
- const base::FilePath& web_app_path,
- std::unique_ptr<ShortcutInfo> shortcut_info,
- const ShortcutLocations& creation_locations,
- ShortcutCreationReason /*creation_reason*/) {
+bool CreatePlatformShortcuts(const base::FilePath& web_app_path,
+ const ShortcutInfo& shortcut_info,
+ const ShortcutLocations& creation_locations,
+ ShortcutCreationReason /*creation_reason*/) {
#if !defined(OS_CHROMEOS)
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
- return shell_integration_linux::CreateDesktopShortcut(*shortcut_info,
+ return shell_integration_linux::CreateDesktopShortcut(shortcut_info,
creation_locations);
#else
return false;
@@ -36,16 +35,16 @@ bool CreatePlatformShortcuts(
}
void DeletePlatformShortcuts(const base::FilePath& web_app_path,
- std::unique_ptr<ShortcutInfo> shortcut_info) {
+ const ShortcutInfo& shortcut_info) {
#if !defined(OS_CHROMEOS)
- shell_integration_linux::DeleteDesktopShortcuts(shortcut_info->profile_path,
- shortcut_info->extension_id);
+ shell_integration_linux::DeleteDesktopShortcuts(shortcut_info.profile_path,
+ shortcut_info.extension_id);
#endif
}
void UpdatePlatformShortcuts(const base::FilePath& web_app_path,
const base::string16& /*old_app_title*/,
- std::unique_ptr<ShortcutInfo> shortcut_info) {
+ const ShortcutInfo& shortcut_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
std::unique_ptr<base::Environment> env(base::Environment::Create());
@@ -53,7 +52,7 @@ void UpdatePlatformShortcuts(const base::FilePath& web_app_path,
// Find out whether shortcuts are already installed.
ShortcutLocations creation_locations =
shell_integration_linux::GetExistingShortcutLocations(
- env.get(), shortcut_info->profile_path, shortcut_info->extension_id);
+ env.get(), shortcut_info.profile_path, shortcut_info.extension_id);
// Always create a hidden shortcut in applications if a visible one is not
// being created. This allows the operating system to identify the app, but
@@ -61,8 +60,8 @@ void UpdatePlatformShortcuts(const base::FilePath& web_app_path,
if (creation_locations.applications_menu_location == APP_MENU_LOCATION_NONE)
creation_locations.applications_menu_location = APP_MENU_LOCATION_HIDDEN;
- CreatePlatformShortcuts(web_app_path, std::move(shortcut_info),
- creation_locations, SHORTCUT_CREATION_AUTOMATED);
+ CreatePlatformShortcuts(web_app_path, shortcut_info, creation_locations,
+ SHORTCUT_CREATION_AUTOMATED);
}
void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {
« no previous file with comments | « chrome/browser/web_applications/web_app_chromeos.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698