| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 entries->push_front(new RegistryEntry(dde_key, L"")); | 161 entries->push_front(new RegistryEntry(dde_key, L"")); |
| 162 | 162 |
| 163 // <root hkey>\Software\Classes\<protocol>\shell\@ | 163 // <root hkey>\Software\Classes\<protocol>\shell\@ |
| 164 std::wstring protocol_shell_key = url_key + ShellUtil::kRegShellPath; | 164 std::wstring protocol_shell_key = url_key + ShellUtil::kRegShellPath; |
| 165 entries->push_front(new RegistryEntry(protocol_shell_key, L"open")); | 165 entries->push_front(new RegistryEntry(protocol_shell_key, L"open")); |
| 166 } | 166 } |
| 167 | 167 |
| 168 // start->Internet shortcut. | 168 // start->Internet shortcut. |
| 169 std::wstring start_menu(ShellUtil::kRegStartMenuInternet); | 169 std::wstring start_menu(ShellUtil::kRegStartMenuInternet); |
| 170 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 170 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 171 entries->push_front(new RegistryEntry(start_menu, | 171 std::wstring app_name = dist->GetApplicationName() + suffix; |
| 172 dist->GetApplicationName())); | 172 entries->push_front(new RegistryEntry(start_menu, app_name)); |
| 173 return true; | 173 return true; |
| 174 } | 174 } |
| 175 | 175 |
| 176 // Generate work_item tasks required to create current registry entry and | 176 // Generate work_item tasks required to create current registry entry and |
| 177 // add them to the given work item list. | 177 // add them to the given work item list. |
| 178 void AddToWorkItemList(HKEY root, WorkItemList *items) const { | 178 void AddToWorkItemList(HKEY root, WorkItemList *items) const { |
| 179 items->AddCreateRegKeyWorkItem(root, _key_path); | 179 items->AddCreateRegKeyWorkItem(root, _key_path); |
| 180 if (_is_string) { | 180 if (_is_string) { |
| 181 items->AddSetRegValueWorkItem(root, _key_path, _name, _value, true); | 181 items->AddSetRegValueWorkItem(root, _key_path, _name, _value, true); |
| 182 } else { | 182 } else { |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target | 780 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target |
| 781 shortcut.c_str(), // shortcut | 781 shortcut.c_str(), // shortcut |
| 782 chrome_path.c_str(), // working dir | 782 chrome_path.c_str(), // working dir |
| 783 NULL, // arguments | 783 NULL, // arguments |
| 784 description.c_str(), // description | 784 description.c_str(), // description |
| 785 chrome_exe.c_str(), // icon file | 785 chrome_exe.c_str(), // icon file |
| 786 icon_index, // icon index | 786 icon_index, // icon index |
| 787 chrome::kBrowserAppID); // app id | 787 chrome::kBrowserAppID); // app id |
| 788 } | 788 } |
| 789 } | 789 } |
| OLD | NEW |