Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: chrome/installer/setup/install.cc

Issue 2897593003: Generalize Active Setup triggering. (Closed)
Patch Set: test fixins Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 BrowserDistribution::GetDistribution()); 644 BrowserDistribution::GetDistribution());
645 645
646 // Update the per-user default browser beacon. For user-level installs this 646 // Update the per-user default browser beacon. For user-level installs this
647 // can be done directly; whereas it requires triggering Active Setup for each 647 // can be done directly; whereas it requires triggering Active Setup for each
648 // user's subsequent login on system-level installs. 648 // user's subsequent login on system-level installs.
649 if (!installer_state.system_install()) { 649 if (!installer_state.system_install()) {
650 UpdateDefaultBrowserBeaconForPath(chrome_exe); 650 UpdateDefaultBrowserBeaconForPath(chrome_exe);
651 } else { 651 } else {
652 UpdateActiveSetupVersionWorkItem active_setup_work_item( 652 UpdateActiveSetupVersionWorkItem active_setup_work_item(
653 install_static::GetActiveSetupPath(), 653 install_static::GetActiveSetupPath(),
654 UpdateActiveSetupVersionWorkItem:: 654 UpdateActiveSetupVersionWorkItem::UPDATE_AND_BUMP_SELECTIVE_TRIGGER);
655 UPDATE_AND_BUMP_OS_UPGRADES_COMPONENT);
656 if (active_setup_work_item.Do()) 655 if (active_setup_work_item.Do())
657 VLOG(1) << "Bumped Active Setup Version on-os-upgrade."; 656 VLOG(1) << "Bumped Active Setup Version on-os-upgrade.";
658 else 657 else
659 LOG(ERROR) << "Failed to bump Active Setup Version on-os-upgrade."; 658 LOG(ERROR) << "Failed to bump Active Setup Version on-os-upgrade.";
660 } 659 }
661 } 660 }
662 661
663 // NOTE: Should the work done here, on Active Setup, change: 662 // NOTE: Should the work done here, on Active Setup, change:
664 // kActiveSetupMajorVersion in update_active_setup_version_work_item.cc needs to 663 // kActiveSetupMajorVersion in update_active_setup_version_work_item.cc needs to
665 // be increased for Active Setup to invoke this again for all users of this 664 // be increased for Active Setup to invoke this again for all users of this
(...skipping 24 matching lines...) Expand all
690 // Read master_preferences copied beside chrome.exe at install. 689 // Read master_preferences copied beside chrome.exe at install.
691 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); 690 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs));
692 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); 691 base::FilePath chrome_exe(installation_root.Append(kChromeExe));
693 CreateOrUpdateShortcuts( 692 CreateOrUpdateShortcuts(
694 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); 693 chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
695 694
696 UpdateDefaultBrowserBeaconForPath(chrome_exe); 695 UpdateDefaultBrowserBeaconForPath(chrome_exe);
697 } 696 }
698 697
699 } // namespace installer 698 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698