| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 std::wstring app_name = dist->GetApplicationName() + suffix; | 74 std::wstring app_name = dist->GetApplicationName() + suffix; |
| 75 std::wstring start_menu_entry(ShellUtil::kRegStartMenuInternet); | 75 std::wstring start_menu_entry(ShellUtil::kRegStartMenuInternet); |
| 76 start_menu_entry.append(L"\\" + app_name); | 76 start_menu_entry.append(L"\\" + app_name); |
| 77 entries->push_front(new RegistryEntry(start_menu_entry, app_name)); | 77 entries->push_front(new RegistryEntry(start_menu_entry, app_name)); |
| 78 entries->push_front(new RegistryEntry( | 78 entries->push_front(new RegistryEntry( |
| 79 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); | 79 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); |
| 80 entries->push_front(new RegistryEntry( | 80 entries->push_front(new RegistryEntry( |
| 81 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); | 81 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); |
| 82 | 82 |
| 83 std::wstring install_info(start_menu_entry + L"\\InstallInfo"); | 83 std::wstring install_info(start_menu_entry + L"\\InstallInfo"); |
| 84 // TODO: use CommandLine API instead of constructing command lines. |
| 84 entries->push_front(new RegistryEntry(install_info, L"ReinstallCommand", | 85 entries->push_front(new RegistryEntry(install_info, L"ReinstallCommand", |
| 85 quoted_exe_path + L" --" + switches::kMakeDefaultBrowser)); | 86 quoted_exe_path + L" --" + ASCIIToWide(switches::kMakeDefaultBrowser))); |
| 86 entries->push_front(new RegistryEntry(install_info, L"HideIconsCommand", | 87 entries->push_front(new RegistryEntry(install_info, L"HideIconsCommand", |
| 87 quoted_exe_path + L" --" + switches::kHideIcons)); | 88 quoted_exe_path + L" --" + ASCIIToWide(switches::kHideIcons))); |
| 88 entries->push_front(new RegistryEntry(install_info, L"ShowIconsCommand", | 89 entries->push_front(new RegistryEntry(install_info, L"ShowIconsCommand", |
| 89 quoted_exe_path + L" --" + switches::kShowIcons)); | 90 quoted_exe_path + L" --" + ASCIIToWide(switches::kShowIcons))); |
| 90 entries->push_front(new RegistryEntry(install_info, L"IconsVisible", 1)); | 91 entries->push_front(new RegistryEntry(install_info, L"IconsVisible", 1)); |
| 91 | 92 |
| 92 std::wstring capabilities(start_menu_entry + L"\\Capabilities"); | 93 std::wstring capabilities(start_menu_entry + L"\\Capabilities"); |
| 93 entries->push_front(new RegistryEntry(ShellUtil::kRegRegisteredApplications, | 94 entries->push_front(new RegistryEntry(ShellUtil::kRegRegisteredApplications, |
| 94 app_name, capabilities)); | 95 app_name, capabilities)); |
| 95 entries->push_front(new RegistryEntry( | 96 entries->push_front(new RegistryEntry( |
| 96 capabilities, L"ApplicationDescription", dist->GetApplicationName())); | 97 capabilities, L"ApplicationDescription", dist->GetApplicationName())); |
| 97 entries->push_front(new RegistryEntry( | 98 entries->push_front(new RegistryEntry( |
| 98 capabilities, L"ApplicationIcon", icon_path)); | 99 capabilities, L"ApplicationIcon", icon_path)); |
| 99 entries->push_front(new RegistryEntry( | 100 entries->push_front(new RegistryEntry( |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 } else { | 772 } else { |
| 772 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target | 773 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target |
| 773 shortcut.c_str(), // shortcut | 774 shortcut.c_str(), // shortcut |
| 774 chrome_path.c_str(), // working dir | 775 chrome_path.c_str(), // working dir |
| 775 NULL, // arguments | 776 NULL, // arguments |
| 776 description.c_str(), // description | 777 description.c_str(), // description |
| 777 chrome_exe.c_str(), // icon file | 778 chrome_exe.c_str(), // icon file |
| 778 0); // icon index | 779 0); // icon index |
| 779 } | 780 } |
| 780 } | 781 } |
| OLD | NEW |