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" | |
29 #include "chrome/common/chrome_paths_internal.h" | 28 #include "chrome/common/chrome_paths_internal.h" |
30 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/installer/setup/setup_util.h" | 30 #include "chrome/installer/setup/setup_util.h" |
32 #include "chrome/installer/util/browser_distribution.h" | 31 #include "chrome/installer/util/browser_distribution.h" |
33 #include "chrome/installer/util/create_reg_key_work_item.h" | 32 #include "chrome/installer/util/create_reg_key_work_item.h" |
34 #include "chrome/installer/util/install_util.h" | 33 #include "chrome/installer/util/install_util.h" |
35 #include "chrome/installer/util/set_reg_value_work_item.h" | 34 #include "chrome/installer/util/set_reg_value_work_item.h" |
36 #include "chrome/installer/util/shell_util.h" | 35 #include "chrome/installer/util/shell_util.h" |
37 #include "chrome/installer/util/util_constants.h" | 36 #include "chrome/installer/util/util_constants.h" |
38 #include "chrome/installer/util/work_item.h" | 37 #include "chrome/installer/util/work_item.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 356 |
358 // Locations to check for shortcuts migration. | 357 // Locations to check for shortcuts migration. |
359 static const struct { | 358 static const struct { |
360 int location_id; | 359 int location_id; |
361 const wchar_t* sub_dir; | 360 const wchar_t* sub_dir; |
362 } kLocations[] = { | 361 } kLocations[] = { |
363 { | 362 { |
364 base::DIR_APP_DATA, | 363 base::DIR_APP_DATA, |
365 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" | 364 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" |
366 }, { | 365 }, { |
367 chrome::DIR_USER_DESKTOP, | 366 base::DIR_USER_DESKTOP, |
368 NULL | 367 NULL |
369 }, { | 368 }, { |
370 base::DIR_START_MENU, | 369 base::DIR_START_MENU, |
371 NULL | 370 NULL |
372 }, { | 371 }, { |
373 base::DIR_APP_DATA, | 372 base::DIR_APP_DATA, |
374 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\StartMenu" | 373 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\StartMenu" |
375 } | 374 } |
376 }; | 375 }; |
377 | 376 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 continue; | 585 continue; |
587 } | 586 } |
588 | 587 |
589 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk"); | 588 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk"); |
590 if (file_util::PathExists(shortcut)) | 589 if (file_util::PathExists(shortcut)) |
591 return shortcut; | 590 return shortcut; |
592 } | 591 } |
593 | 592 |
594 return FilePath(); | 593 return FilePath(); |
595 } | 594 } |
OLD | NEW |