diff options
author | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 19:33:25 +0000 |
---|---|---|
committer | huangs@chromium.org <huangs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 19:33:25 +0000 |
commit | 84fdfacdb6d60486cec8fcf2c9194d7eff61573e (patch) | |
tree | 03da3fe6fac1dc3c30998e7ad147afe4173167e3 /chrome/browser/web_applications | |
parent | a857720adbefb288556f10cc0134f67445c4837f (diff) | |
download | chromium_src-84fdfacdb6d60486cec8fcf2c9194d7eff61573e.zip chromium_src-84fdfacdb6d60486cec8fcf2c9194d7eff61573e.tar.gz chromium_src-84fdfacdb6d60486cec8fcf2c9194d7eff61573e.tar.bz2 |
Limit App Host installation / usage for platform apps to Google Chome only.
- For Google Chrome:
1. On first install of platform apps, as before, install app_host.exe via the quick-enable-application-host command.
2. App shortcuts (e.g., desktop) point to app_host.exe.
- For Google Canary and Chromium:
1. On first install of platform apps, don't install app_host.exe.
2. When creating (e.g., desktop) point to chrome.exe.
BUG=160479
Review URL: https://chromiumcodereview.appspot.com/11412021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_applications')
-rw-r--r-- | chrome/browser/web_applications/web_app_win.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc index 352f921..8a4f416 100644 --- a/chrome/browser/web_applications/web_app_win.cc +++ b/chrome/browser/web_applications/web_app_win.cc @@ -17,6 +17,7 @@ #include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "chrome/installer/launcher_support/chrome_launcher_support.h" +#include "chrome/installer/util/browser_distribution.h" #include "content/public/browser/browser_thread.h" #include "ui/gfx/icon_util.h" @@ -225,12 +226,15 @@ bool CreatePlatformShortcuts( return false; } - FilePath app_host_exe(chrome_launcher_support::GetAnyAppHostPath()); - if (app_host_exe.empty()) - return false; + FilePath target_exe; + if (BrowserDistribution::GetDistribution()->AppHostIsSupported()) + target_exe = chrome_launcher_support::GetAnyAppHostPath(); + else + target_exe = chrome_launcher_support::GetAnyChromePath(); + DCHECK(!target_exe.empty()); // Working directory. - FilePath working_dir(app_host_exe.DirName()); + FilePath working_dir(target_exe.DirName()); CommandLine cmd_line(CommandLine::NO_PROGRAM); cmd_line = ShellIntegration::CommandLineArgsForLauncher(shortcut_info.url, @@ -269,7 +273,7 @@ bool CreatePlatformShortcuts( } base::win::ShortcutProperties shortcut_properties; - shortcut_properties.set_target(app_host_exe); + shortcut_properties.set_target(target_exe); shortcut_properties.set_working_dir(working_dir); shortcut_properties.set_arguments(wide_switches); shortcut_properties.set_description(description); |