| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/shell_integration.h" | 5 #include "chrome/browser/shell_integration.h" | 
| 6 | 6 | 
| 7 #include <windows.h> | 7 #include <windows.h> | 
| 8 #include <shobjidl.h> | 8 #include <shobjidl.h> | 
| 9 #include <propkey.h> | 9 #include <propkey.h> | 
| 10 #include <propvarutil.h> | 10 #include <propvarutil.h> | 
| 11 | 11 | 
| 12 #include "base/bind.h" | 12 #include "base/bind.h" | 
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" | 
| 14 #include "base/file_util.h" | 14 #include "base/file_util.h" | 
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" | 
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" | 
| 17 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" | 
| 18 #include "base/string_util.h" | 18 #include "base/string_util.h" | 
| 19 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" | 
| 20 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" | 
| 21 #include "base/win/registry.h" | 21 #include "base/win/registry.h" | 
| 22 #include "base/win/scoped_co_mem.h" | 22 #include "base/win/scoped_co_mem.h" | 
| 23 #include "base/win/scoped_comptr.h" | 23 #include "base/win/scoped_comptr.h" | 
| 24 #include "base/win/shortcut.h" | 24 #include "base/win/shortcut.h" | 
| 25 #include "base/win/windows_version.h" | 25 #include "base/win/windows_version.h" | 
| 26 #include "chrome/browser/web_applications/web_app.h" | 26 #include "chrome/browser/web_applications/web_app.h" | 
| 27 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" | 
|  | 28 #include "chrome/common/chrome_paths.h" | 
| 28 #include "chrome/common/chrome_paths_internal.h" | 29 #include "chrome/common/chrome_paths_internal.h" | 
| 29 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" | 
| 30 #include "chrome/installer/setup/setup_util.h" | 31 #include "chrome/installer/setup/setup_util.h" | 
| 31 #include "chrome/installer/util/browser_distribution.h" | 32 #include "chrome/installer/util/browser_distribution.h" | 
| 32 #include "chrome/installer/util/create_reg_key_work_item.h" | 33 #include "chrome/installer/util/create_reg_key_work_item.h" | 
| 33 #include "chrome/installer/util/install_util.h" | 34 #include "chrome/installer/util/install_util.h" | 
| 34 #include "chrome/installer/util/set_reg_value_work_item.h" | 35 #include "chrome/installer/util/set_reg_value_work_item.h" | 
| 35 #include "chrome/installer/util/shell_util.h" | 36 #include "chrome/installer/util/shell_util.h" | 
| 36 #include "chrome/installer/util/util_constants.h" | 37 #include "chrome/installer/util/util_constants.h" | 
| 37 #include "chrome/installer/util/work_item.h" | 38 #include "chrome/installer/util/work_item.h" | 
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 356 | 357 | 
| 357   // Locations to check for shortcuts migration. | 358   // Locations to check for shortcuts migration. | 
| 358   static const struct { | 359   static const struct { | 
| 359     int location_id; | 360     int location_id; | 
| 360     const wchar_t* sub_dir; | 361     const wchar_t* sub_dir; | 
| 361   } kLocations[] = { | 362   } kLocations[] = { | 
| 362     { | 363     { | 
| 363       base::DIR_APP_DATA, | 364       base::DIR_APP_DATA, | 
| 364       L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" | 365       L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" | 
| 365     }, { | 366     }, { | 
| 366       base::DIR_USER_DESKTOP, | 367       chrome::DIR_USER_DESKTOP, | 
| 367       NULL | 368       NULL | 
| 368     }, { | 369     }, { | 
| 369       base::DIR_START_MENU, | 370       base::DIR_START_MENU, | 
| 370       NULL | 371       NULL | 
| 371     }, { | 372     }, { | 
| 372       base::DIR_APP_DATA, | 373       base::DIR_APP_DATA, | 
| 373       L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\StartMenu" | 374       L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\StartMenu" | 
| 374     } | 375     } | 
| 375   }; | 376   }; | 
| 376 | 377 | 
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 585       continue; | 586       continue; | 
| 586     } | 587     } | 
| 587 | 588 | 
| 588     shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk"); | 589     shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk"); | 
| 589     if (file_util::PathExists(shortcut)) | 590     if (file_util::PathExists(shortcut)) | 
| 590       return shortcut; | 591       return shortcut; | 
| 591   } | 592   } | 
| 592 | 593 | 
| 593   return FilePath(); | 594   return FilePath(); | 
| 594 } | 595 } | 
| OLD | NEW | 
|---|