OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/web_applications/web_app.h" | 5 #include "chrome/browser/web_applications/web_app.h" |
6 | 6 |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/shell_integration_linux.h" | 9 #include "chrome/browser/shell_integration_linux.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Find out whether shortcuts are already installed. | 47 // Find out whether shortcuts are already installed. |
48 ShellIntegration::ShortcutLocations creation_locations = | 48 ShellIntegration::ShortcutLocations creation_locations = |
49 ShellIntegrationLinux::GetExistingShortcutLocations( | 49 ShellIntegrationLinux::GetExistingShortcutLocations( |
50 env.get(), shortcut_info.profile_path, shortcut_info.extension_id); | 50 env.get(), shortcut_info.profile_path, shortcut_info.extension_id); |
51 // Always create a hidden shortcut in applications if a visible one is not | 51 // Always create a hidden shortcut in applications if a visible one is not |
52 // being created. This allows the operating system to identify the app, but | 52 // being created. This allows the operating system to identify the app, but |
53 // not show it in the menu. | 53 // not show it in the menu. |
54 creation_locations.hidden = true; | 54 creation_locations.hidden = true; |
55 | 55 |
56 // Always create the shortcut in the Chrome Apps subdir (even if it is | |
57 // currently in a different location). | |
58 creation_locations.applications_menu_subdir = GetAppShortcutsSubdirName(); | |
59 | |
60 CreatePlatformShortcuts(web_app_path, shortcut_info, creation_locations, | 56 CreatePlatformShortcuts(web_app_path, shortcut_info, creation_locations, |
61 SHORTCUT_CREATION_BY_USER); | 57 SHORTCUT_CREATION_BY_USER); |
62 } | 58 } |
63 | 59 |
64 void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) { | 60 void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) { |
65 #if !defined(OS_CHROMEOS) | 61 #if !defined(OS_CHROMEOS) |
66 ShellIntegrationLinux::DeleteAllDesktopShortcuts(profile_path); | 62 ShellIntegrationLinux::DeleteAllDesktopShortcuts(profile_path); |
67 #endif | 63 #endif |
68 } | 64 } |
69 | 65 |
70 } // namespace internals | 66 } // namespace internals |
71 | 67 |
72 } // namespace web_app | 68 } // namespace web_app |
OLD | NEW |