| Index: chrome/browser/shell_integration_win.cc
|
| diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
|
| index 34c5e265f42fa19d1bc9cb9c7dd1861d9bcb6f55..37dd3c0bdad28b16ebeca725a8d851ab960fa55f 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();
|
| }
|
|
|