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/installer/setup/install.h" | 5 #include "chrome/installer/setup/install.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 ExecuteAndLogShortcutOperation( | 425 ExecuteAndLogShortcutOperation( |
426 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, dist, | 426 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, dist, |
427 start_menu_properties, shortcut_operation); | 427 start_menu_properties, shortcut_operation); |
428 } | 428 } |
429 | 429 |
430 void RegisterChromeOnMachine(const installer::InstallerState& installer_state, | 430 void RegisterChromeOnMachine(const installer::InstallerState& installer_state, |
431 const installer::Product& product, | 431 const installer::Product& product, |
432 bool make_chrome_default, | 432 bool make_chrome_default, |
433 const base::Version& version) { | 433 const base::Version& version) { |
434 DCHECK(product.is_chrome()); | |
435 | |
436 // Try to add Chrome to Media Player shim inclusion list. We don't do any | 434 // Try to add Chrome to Media Player shim inclusion list. We don't do any |
437 // error checking here because this operation will fail if user doesn't | 435 // error checking here because this operation will fail if user doesn't |
438 // have admin rights and we want to ignore the error. | 436 // have admin rights and we want to ignore the error. |
439 AddChromeToMediaPlayerList(); | 437 AddChromeToMediaPlayerList(); |
440 | 438 |
441 // Register the event log provider for system-level installs only, as it | 439 // Register the event log provider for system-level installs only, as it |
442 // requires admin privileges. | 440 // requires admin privileges. |
443 if (installer_state.system_install()) | 441 if (installer_state.system_install()) |
444 RegisterEventLogProvider(installer_state.target_path(), version); | 442 RegisterEventLogProvider(installer_state.target_path(), version); |
445 | 443 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // Read master_preferences copied beside chrome.exe at install. | 688 // Read master_preferences copied beside chrome.exe at install. |
691 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); | 689 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
692 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); | 690 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); |
693 CreateOrUpdateShortcuts( | 691 CreateOrUpdateShortcuts( |
694 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); | 692 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
695 | 693 |
696 UpdateDefaultBrowserBeaconForPath(chrome_exe); | 694 UpdateDefaultBrowserBeaconForPath(chrome_exe); |
697 } | 695 } |
698 | 696 |
699 } // namespace installer | 697 } // namespace installer |
OLD | NEW |