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

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

Issue 11054006: Make application shortcuts point to app_host.exe, install App Host during app installation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Now installing App Host in AppShortcutManager, instead of CrxInstaller / UnpackedInstaller. Created 8 years, 1 month 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
Index: chrome/browser/web_applications/web_app_win.cc
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
index f1df11698dc4a0f1fddbee90c18853324e1d42a1..352f921e01228841c7741290be4cc58ba1488225 100644
--- a/chrome/browser/web_applications/web_app_win.cc
+++ b/chrome/browser/web_applications/web_app_win.cc
@@ -16,6 +16,7 @@
#include "base/win/shortcut.h"
#include "base/win/windows_version.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/installer/launcher_support/chrome_launcher_support.h"
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/icon_util.h"
@@ -224,12 +225,12 @@ bool CreatePlatformShortcuts(
return false;
}
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe))
+ FilePath app_host_exe(chrome_launcher_support::GetAnyAppHostPath());
+ if (app_host_exe.empty())
return false;
// Working directory.
- FilePath chrome_folder(chrome_exe.DirName());
+ FilePath working_dir(app_host_exe.DirName());
CommandLine cmd_line(CommandLine::NO_PROGRAM);
cmd_line = ShellIntegration::CommandLineArgsForLauncher(shortcut_info.url,
@@ -268,8 +269,8 @@ bool CreatePlatformShortcuts(
}
base::win::ShortcutProperties shortcut_properties;
- shortcut_properties.set_target(chrome_exe);
- shortcut_properties.set_working_dir(chrome_folder);
+ shortcut_properties.set_target(app_host_exe);
+ shortcut_properties.set_working_dir(working_dir);
shortcut_properties.set_arguments(wide_switches);
shortcut_properties.set_description(description);
shortcut_properties.set_icon(icon_file, 0);

Powered by Google App Engine
This is Rietveld 408576698