15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file contains the declarations of the installer functions that build
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the WorkItemList used to install the application.
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <windows.h>
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <vector>
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class BrowserDistribution;
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class CommandLine;
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class WorkItemList;
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace base {
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class FilePath;
21c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class Version;
222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace installer {
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class InstallationState;
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class InstallerState;
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Product;
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This method adds work items to create (or update) Chrome uninstall entry in
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// either the Control Panel->Add/Remove Programs list or in the Omaha client
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// state key if running under an MSI installer.
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                   const base::FilePath& setup_path,
35c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                                   const base::Version& new_version,
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                   const Product& product,
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                   WorkItemList* install_list);
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Creates Version key for a product (if not already present) and sets the new
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// product version as the last step.  If |add_language_identifier| is true, the
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// "lang" value is also set according to the currently selected translation.
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddVersionKeyWorkItems(HKEY root,
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            BrowserDistribution* dist,
44c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                            const base::Version& new_version,
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            bool add_language_identifier,
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            WorkItemList* list);
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Helper function for AddGoogleUpdateWorkItems that mirrors oeminstall.
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddOemInstallWorkItems(const InstallationState& original_state,
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            const InstallerState& installer_state,
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            WorkItemList* install_list);
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Helper function for AddGoogleUpdateWorkItems that mirrors eulaaccepted.
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddEulaAcceptedWorkItems(const InstallationState& original_state,
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                              const InstallerState& installer_state,
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                              WorkItemList* install_list);
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Adds work items that make registry adjustments for Google Update; namely,
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// copy brand, oeminstall, and eulaaccepted values; and move a usagestats value.
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddGoogleUpdateWorkItems(const InstallationState& original_state,
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                              const InstallerState& installer_state,
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                              WorkItemList* install_list);
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Adds work items that make registry adjustments for stats and crash
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// collection.  When a product is installed, Google Update may write a
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// "usagestats" value to Chrome or Chrome Frame's ClientState key.  In the
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// multi-install case, both products will consult/modify stats for the binaries'
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// app guid.  Consequently, during install and update we will move a
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// product-specific value into the binaries' ClientState key.
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddUsageStatsWorkItems(const InstallationState& original_state,
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            const InstallerState& installer_state,
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            WorkItemList* install_list);
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// After a successful copying of all the files, this function is called to
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// do a few post install tasks:
765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// - Handle the case of in-use-update by updating "opv" (old version) key or
775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//   deleting it if not required.
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// - Register any new dlls and unregister old dlls.
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// - If this is an MSI install, ensures that the MSI marker is set, and sets
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//   it if not.
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If these operations are successful, the function returns true, otherwise
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// false.
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |current_version| can be NULL to indicate no Chrome is currently installed.
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool AppendPostInstallTasks(const InstallerState& installer_state,
852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                            const base::FilePath& setup_path,
86c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                            const base::Version* current_version,
87c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                            const base::Version& new_version,
882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                            const base::FilePath& temp_path,
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                            WorkItemList* post_install_task_list);
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Builds the complete WorkItemList used to build the set of installation steps
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// needed to lay down one or more installed products.
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// setup_path: Path to the executable (setup.exe) as it will be copied
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//           to Chrome install folder after install is complete
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// archive_path: Path to the archive (chrome.7z) as it will be copied
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//               to Chrome install folder after install is complete
985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// src_path: the path that contains a complete and unpacked Chrome package
995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//           to be installed.
1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// temp_path: the path of working directory used during installation. This path
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//            does not need to exist.
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |current_version| can be NULL to indicate no Chrome is currently installed.
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddInstallWorkItems(const InstallationState& original_state,
1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                         const InstallerState& installer_state,
1052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                         const base::FilePath& setup_path,
1062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                         const base::FilePath& archive_path,
1072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                         const base::FilePath& src_path,
1082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                         const base::FilePath& temp_path,
109c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                         const base::Version* current_version,
110c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                         const base::Version& new_version,
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                         WorkItemList* install_list);
1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Appends registration or unregistration work items to |work_item_list| for the
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// COM DLLs whose file names are given in |dll_files| and which reside in the
1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// path |dll_folder|.
1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |system_level| specifies whether to call the system or user level DLL
1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// registration entry points.
1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |do_register| says whether to register or unregister.
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |may_fail| states whether this is best effort or not. If |may_fail| is true
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// then |work_item_list| will still succeed if the registration fails and
1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// no registration rollback will be performed.
1222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)void AddRegisterComDllWorkItems(const base::FilePath& dll_folder,
1232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                const std::vector<base::FilePath>& dll_files,
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                bool system_level,
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                bool do_register,
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                bool ignore_failures,
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                WorkItemList* work_item_list);
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddSetMsiMarkerWorkItem(const InstallerState& installer_state,
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             BrowserDistribution* dist,
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             bool set,
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             WorkItemList* work_item_list);
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Called for either installation or uninstallation. This method updates the
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// registry according to Chrome Frame specific options for the current
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// installation.  This includes handling of the ready-mode option.
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddChromeFrameWorkItems(const InstallationState& original_state,
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             const InstallerState& installer_state,
1392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                             const base::FilePath& setup_path,
140c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                             const base::Version& new_version,
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             const Product& product,
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             WorkItemList* list);
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Called for either installation or uninstallation. This method adds or
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// removes COM registration for a product's DelegateExecute verb handler.
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If |new_version| is empty, the registrations will point to
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// delegate_execute.exe directly in |target_path|.
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddDelegateExecuteWorkItems(const InstallerState& installer_state,
1492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                 const base::FilePath& target_path,
150c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                                 const base::Version& new_version,
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 const Product& product,
1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 WorkItemList* list);
1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Adds Active Setup registration for sytem-level setup to be called by Windows
1555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// on user-login post-install/update.
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This method should be called for installation only.
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |product|: The product being installed. This method is a no-op if this is
1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// anything other than system-level Chrome/Chromium.
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddActiveSetupWorkItems(const InstallerState& installer_state,
1602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                             const base::FilePath& setup_path,
161c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                             const base::Version& new_version,
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             const Product& product,
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                             WorkItemList* list);
1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Unregisters the "opv" version of ChromeLauncher from IE's low rights
1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// elevation policy.
1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddDeleteOldIELowRightsPolicyWorkItems(
1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    const InstallerState& installer_state,
1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    WorkItemList* install_list);
1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Adds work items to copy IE low rights policies for an in-use update.
1725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddCopyIELowRightsPolicyWorkItems(const InstallerState& installer_state,
1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                       WorkItemList* install_list);
1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Utility method currently shared between install.cc and install_worker.cc
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AppendUninstallCommandLineFlags(const InstallerState& installer_state,
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                     const Product& product,
1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                     CommandLine* uninstall_cmd);
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Refreshes the elevation policy on platforms where it is supported.
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void RefreshElevationPolicy();
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Adds work items to add or remove the "on-os-upgrade" command to |product|'s
1842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// version key on the basis of the current operation (represented in
1852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// |installer_state|).  |new_version| is the version of the product(s)
1862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// currently being installed -- can be empty on uninstall.
1872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)void AddOsUpgradeWorkItems(const InstallerState& installer_state,
1882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                           const base::FilePath& setup_path,
189c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                           const base::Version& new_version,
1902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                           const Product& product,
1912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                           WorkItemList* install_list);
1922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Adds work items to add or remove the "query-eula-acceptance" command to
1942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// |product|'s version key on the basis of the current operation (represented
1952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// in |installer_state|).  |new_version| is the version of the product(s)
1962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// currently being installed -- can be empty on uninstall.
1972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state,
1982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     const base::FilePath& setup_path,
199c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                                     const base::Version& new_version,
2002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     const Product& product,
2012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     WorkItemList* work_item_list);
2022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Adds work items to add or remove the "quick-enable-cf" to the multi-installer
2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// binaries' version key on the basis of the current operation (represented in
2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |installer_state|) and the pre-existing machine configuration (represented in
2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |machine_state|).  |setup_path| (the path to the executable currently being
2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// run) and |new_version| (the version of the product(s) currently being
2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// installed) are required when processing product installation; they are unused
2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (and may therefore be empty) when uninstalling.
2105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state,
2115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                        const InstallationState& machine_state,
2122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                        const base::FilePath& setup_path,
213c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)                                        const base::Version& new_version,
2145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                        WorkItemList* work_item_list);
2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace installer
2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
219