| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/installer/setup/install.h" | 5 #include "chrome/installer/setup/install.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 #include <time.h> | 8 #include <time.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 // Update Desktop and Quick Launch shortcuts. If --create-new-shortcuts | 178 // Update Desktop and Quick Launch shortcuts. If --create-new-shortcuts |
| 179 // is specified we want to create them, otherwise we update them only if | 179 // is specified we want to create them, otherwise we update them only if |
| 180 // they exist. | 180 // they exist. |
| 181 if (ret) { | 181 if (ret) { |
| 182 if (installer_state.system_install()) { | 182 if (installer_state.system_install()) { |
| 183 ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(), | 183 ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(), |
| 184 chrome_exe.value(), product_desc, L"", L"", ShellUtil::SYSTEM_LEVEL, | 184 chrome_exe.value(), product_desc, L"", L"", ShellUtil::SYSTEM_LEVEL, |
| 185 chrome_exe.value(), product.distribution()->GetIconIndex(), |
| 185 alt_shortcut, create_all_shortcut); | 186 alt_shortcut, create_all_shortcut); |
| 186 if (ret) { | 187 if (ret) { |
| 187 ret = ShellUtil::CreateChromeQuickLaunchShortcut( | 188 ret = ShellUtil::CreateChromeQuickLaunchShortcut( |
| 188 product.distribution(), chrome_exe.value(), | 189 product.distribution(), chrome_exe.value(), |
| 189 ShellUtil::CURRENT_USER | ShellUtil::SYSTEM_LEVEL, | 190 ShellUtil::CURRENT_USER | ShellUtil::SYSTEM_LEVEL, |
| 190 create_all_shortcut); | 191 create_all_shortcut); |
| 191 } | 192 } |
| 192 } else { | 193 } else { |
| 193 ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(), | 194 ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(), |
| 194 chrome_exe.value(), product_desc, L"", L"", ShellUtil::CURRENT_USER, | 195 chrome_exe.value(), product_desc, L"", L"", ShellUtil::CURRENT_USER, |
| 196 chrome_exe.value(), product.distribution()->GetIconIndex(), |
| 195 alt_shortcut, create_all_shortcut); | 197 alt_shortcut, create_all_shortcut); |
| 196 if (ret) { | 198 if (ret) { |
| 197 ret = ShellUtil::CreateChromeQuickLaunchShortcut( | 199 ret = ShellUtil::CreateChromeQuickLaunchShortcut( |
| 198 product.distribution(), chrome_exe.value(), ShellUtil::CURRENT_USER, | 200 product.distribution(), chrome_exe.value(), ShellUtil::CURRENT_USER, |
| 199 create_all_shortcut); | 201 create_all_shortcut); |
| 200 } | 202 } |
| 201 } | 203 } |
| 202 } | 204 } |
| 203 | 205 |
| 204 return ret; | 206 return ret; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 installer_state.RemoveOldVersionDirectories( | 423 installer_state.RemoveOldVersionDirectories( |
| 422 new_version, | 424 new_version, |
| 423 existing_version.get(), | 425 existing_version.get(), |
| 424 install_temp_path); | 426 install_temp_path); |
| 425 } | 427 } |
| 426 | 428 |
| 427 return result; | 429 return result; |
| 428 } | 430 } |
| 429 | 431 |
| 430 } // namespace installer | 432 } // namespace installer |
| OLD | NEW |