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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 10213010: Don't register or use the DelegateExecute verb handler if it isn't present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hi gab Created 8 years, 7 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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const string16& chrome_exe, 82 const string16& chrome_exe,
83 const string16& suffix, 83 const string16& suffix,
84 std::list<RegistryEntry*>* entries) { 84 std::list<RegistryEntry*>* entries) {
85 string16 icon_path(ShellUtil::GetChromeIcon(dist, chrome_exe)); 85 string16 icon_path(ShellUtil::GetChromeIcon(dist, chrome_exe));
86 string16 open_cmd(ShellUtil::GetChromeShellOpenCmd(chrome_exe)); 86 string16 open_cmd(ShellUtil::GetChromeShellOpenCmd(chrome_exe));
87 string16 delegate_command(ShellUtil::GetChromeDelegateCommand(chrome_exe)); 87 string16 delegate_command(ShellUtil::GetChromeDelegateCommand(chrome_exe));
88 // For user-level installs: entries for the app id and DelegateExecute verb 88 // For user-level installs: entries for the app id and DelegateExecute verb
89 // handler will be in HKCU; thus we do not need a suffix on those entries. 89 // handler will be in HKCU; thus we do not need a suffix on those entries.
90 string16 app_id(dist->GetBrowserAppId()); 90 string16 app_id(dist->GetBrowserAppId());
91 string16 delegate_guid; 91 string16 delegate_guid;
92 // TODO(grt): remove HasDelegateExecuteHandler when the exe is ever-present;
93 // cf. install_worker.cc's AddDelegateExecuteWorkItems.
gab 2012/04/25 13:44:03 Same comment about "cf."
grt (UTC plus 2) 2012/04/25 14:33:49 Done.
92 bool set_delegate_execute = 94 bool set_delegate_execute =
93 base::win::GetVersion() >= base::win::VERSION_WIN8 && 95 dist->GetDelegateExecuteHandlerData(&delegate_guid, NULL, NULL, NULL) &&
94 dist->GetDelegateExecuteHandlerData(&delegate_guid, NULL, NULL, NULL); 96 InstallUtil::HasDelegateExecuteHandler(dist, chrome_exe);
95 97
96 // DelegateExecute ProgId. Needed for Chrome Metro in Windows 8. 98 // DelegateExecute ProgId. Needed for Chrome Metro in Windows 8.
97 if (set_delegate_execute) { 99 if (set_delegate_execute) {
98 string16 model_id_shell(ShellUtil::kRegClasses); 100 string16 model_id_shell(ShellUtil::kRegClasses);
99 model_id_shell.push_back(FilePath::kSeparators[0]); 101 model_id_shell.push_back(FilePath::kSeparators[0]);
100 model_id_shell.append(app_id); 102 model_id_shell.append(app_id);
101 model_id_shell.append(ShellUtil::kRegExePath); 103 model_id_shell.append(ShellUtil::kRegExePath);
102 model_id_shell.append(ShellUtil::kRegShellPath); 104 model_id_shell.append(ShellUtil::kRegShellPath);
103 105
104 // <root hkey>\Software\Classes\<app_id>\.exe\shell @=open 106 // <root hkey>\Software\Classes\<app_id>\.exe\shell @=open
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 chrome_exe.c_str(), 1217 chrome_exe.c_str(),
1216 shortcut.c_str(), 1218 shortcut.c_str(),
1217 chrome_path.c_str(), 1219 chrome_path.c_str(),
1218 arguments.c_str(), 1220 arguments.c_str(),
1219 description.c_str(), 1221 description.c_str(),
1220 icon_path.c_str(), 1222 icon_path.c_str(),
1221 icon_index, 1223 icon_index,
1222 dist->GetBrowserAppId().c_str(), 1224 dist->GetBrowserAppId().c_str(),
1223 ConvertShellUtilShortcutOptionsToFileUtil(options)); 1225 ConvertShellUtilShortcutOptionsToFileUtil(options));
1224 } 1226 }
OLDNEW
« chrome/installer/setup/install_worker.cc ('K') | « chrome/installer/util/install_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698