diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 23:54:26 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 23:54:26 +0000 |
commit | cc66be064f506e17e0364a282e6671be67797318 (patch) | |
tree | f38aeb0a7962d1e4dec465a0fef7a9334965385f /win8 | |
parent | 6bbabfbdd06e18b6dd96a9f29af47c6143f9de24 (diff) | |
download | chromium_src-cc66be064f506e17e0364a282e6671be67797318.zip chromium_src-cc66be064f506e17e0364a282e6671be67797318.tar.gz chromium_src-cc66be064f506e17e0364a282e6671be67797318.tar.bz2 |
Ensure that shortcuts to links open up in metro chrome. We need to invoke ActivateForProtocol
in case the display name is anything other than chrome.exe.
BUG=151585
R=cpu
Review URL: https://codereview.chromium.org/10969054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r-- | win8/delegate_execute/command_execute_impl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc index 943a6d6..eeeae9b 100644 --- a/win8/delegate_execute/command_execute_impl.cc +++ b/win8/delegate_execute/command_execute_impl.cc @@ -17,6 +17,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +#include "chrome/installer/util/util_constants.h" #include "win8/delegate_execute/chrome_util.h" // CommandExecuteImpl is resposible for activating chrome in Windows 8. The @@ -201,7 +202,8 @@ STDMETHODIMP CommandExecuteImpl::Execute() { string16 app_id = delegate_execute::GetAppId(chrome_exe_); DWORD pid = 0; - if (launch_scheme_ == INTERNET_SCHEME_FILE) { + if (launch_scheme_ == INTERNET_SCHEME_FILE && + display_name_.find(installer::kChromeExe) != string16::npos) { AtlTrace("Activating for file\n"); hr = activation_manager->ActivateApplication(app_id.c_str(), verb_.c_str(), @@ -342,7 +344,7 @@ HRESULT CommandExecuteImpl::LaunchDesktopChrome() { // should honor it. For e.g. If the user clicks on a html file when // chrome is the default we should treat it as a parameter to be passed // to chrome. - if (display_name.find(L"chrome.exe") != string16::npos) + if (display_name.find(installer::kChromeExe) != string16::npos) display_name.clear(); break; |