| Index: chrome/browser/shell_integration_win.cc
|
| diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
|
| index 27610f8c3fdce28d5aaff8e536f4de39d4c0bf4e..e9bacf0313cb2c44e3d0a062a68f58fb65b177f2 100644
|
| --- a/chrome/browser/shell_integration_win.cc
|
| +++ b/chrome/browser/shell_integration_win.cc
|
| @@ -205,15 +205,13 @@ base::string16 GetAppForProtocolUsingRegistry(const GURL& url) {
|
| base::win::RegKey cmd_key(HKEY_CLASSES_ROOT,
|
| cmd_key_path.c_str(),
|
| KEY_READ);
|
| - base::string16 application_to_launch;
|
| - if (cmd_key.ReadValue(NULL, &application_to_launch) == ERROR_SUCCESS) {
|
| - const base::string16 url_spec =
|
| - base::ASCIIToUTF16(url.possibly_invalid_spec());
|
| - base::ReplaceSubstringsAfterOffset(&application_to_launch,
|
| - 0,
|
| - L"%1",
|
| - url_spec);
|
| - return application_to_launch;
|
| + base::string16 command_to_launch;
|
| + if (cmd_key.ReadValue(NULL, &command_to_launch) == ERROR_SUCCESS) {
|
| + // Parse the command line in the registry, and return the basename of the
|
| + // program path.
|
| + base::CommandLine command_line(
|
| + base::CommandLine::FromString(command_to_launch));
|
| + return base::WideToUTF16(command_line.GetProgram().BaseName().value());
|
| }
|
| return base::string16();
|
| }
|
|
|