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

Side by Side Diff: chrome/browser/web_applications/web_app_linux.cc

Issue 10837034: Remove packaged app Windows shortcuts when app is uninstalled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android compile Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 11
12 namespace web_app { 12 namespace web_app {
13 namespace internals { 13 namespace internals {
14 14
15 bool CreatePlatformShortcut( 15 bool CreatePlatformShortcuts(
16 const FilePath& web_app_path, 16 const FilePath& web_app_path,
17 const FilePath& profile_path,
18 const ShellIntegration::ShortcutInfo& shortcut_info) { 17 const ShellIntegration::ShortcutInfo& shortcut_info) {
19 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 18 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
20 19
21 scoped_ptr<base::Environment> env(base::Environment::Create()); 20 scoped_ptr<base::Environment> env(base::Environment::Create());
22 21
23 std::string shortcut_template; 22 std::string shortcut_template;
24 if (!ShellIntegrationLinux::GetDesktopShortcutTemplate(env.get(), 23 if (!ShellIntegrationLinux::GetDesktopShortcutTemplate(env.get(),
25 &shortcut_template)) { 24 &shortcut_template)) {
26 return false; 25 return false;
27 } 26 }
28 return ShellIntegrationLinux::CreateDesktopShortcut( 27 return ShellIntegrationLinux::CreateDesktopShortcut(
29 shortcut_info, shortcut_template); 28 shortcut_info, shortcut_template);
30 } 29 }
31 30
32 void DeletePlatformShortcuts(const FilePath& profile_path, 31 void DeletePlatformShortcuts(
33 const std::string& extension_id) { 32 const FilePath& web_app_path,
34 ShellIntegrationLinux::DeleteDesktopShortcuts(profile_path, extension_id); 33 const ShellIntegration::ShortcutInfo& shortcut_info) {
34 ShellIntegrationLinux::DeleteDesktopShortcuts(shortcut_info.profile_path,
35 shortcut_info.extension_id);
35 } 36 }
36 37
37 } // namespace internals 38 } // namespace internals
38 } // namespace web_app 39 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app_android.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