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

Side by Side Diff: chrome/installer/setup/install_worker.h

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file contains the declarations of the installer functions that build 5 // This file contains the declarations of the installer functions that build
6 // the WorkItemList used to install the application. 6 // the WorkItemList used to install the application.
7 7
8 #ifndef CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ 8 #ifndef CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
9 #define CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ 9 #define CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
10 #pragma once 10 #pragma once
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
15 15
16 class BrowserDistribution;
16 class CommandLine; 17 class CommandLine;
17 class FilePath; 18 class FilePath;
18 class Version; 19 class Version;
19 class WorkItemList; 20 class WorkItemList;
20 21
21 namespace installer { 22 namespace installer {
22 23
23 class InstallationState; 24 class InstallationState;
24 class InstallerState; 25 class InstallerState;
25 class Package; 26 class Package;
26 class Product; 27 class Product;
27 28
29 // Adds work items that make registry adjustments for Google Update. When a
30 // product is installed (including overinstall), Google Update will write the
31 // channel ("ap") value into either Chrome or Chrome Frame's ClientState key.
32 // In the multi-install case, this value is used as the basis upon which the
33 // package's channel value is built (by adding the ordered list of installed
34 // products and their options).
35 void AddGoogleUpdateWorkItems(const InstallerState& installer_state,
36 WorkItemList* install_list);
37
28 // Builds the complete WorkItemList used to build the set of installation steps 38 // Builds the complete WorkItemList used to build the set of installation steps
29 // needed to lay down one or more installed products. 39 // needed to lay down one or more installed products.
30 // 40 //
31 // setup_path: Path to the executable (setup.exe) as it will be copied 41 // setup_path: Path to the executable (setup.exe) as it will be copied
32 // to Chrome install folder after install is complete 42 // to Chrome install folder after install is complete
33 // archive_path: Path to the archive (chrome.7z) as it will be copied 43 // archive_path: Path to the archive (chrome.7z) as it will be copied
34 // to Chrome install folder after install is complete 44 // to Chrome install folder after install is complete
35 // src_path: the path that contains a complete and unpacked Chrome package 45 // src_path: the path that contains a complete and unpacked Chrome package
36 // to be installed. 46 // to be installed.
37 // temp_dir: the path of working directory used during installation. This path 47 // temp_dir: the path of working directory used during installation. This path
38 // does not need to exist. 48 // does not need to exist.
39 void AddInstallWorkItems(const InstallationState& original_state, 49 void AddInstallWorkItems(const InstallationState& original_state,
40 const InstallerState& installer_state, 50 const InstallerState& installer_state,
41 bool multi_install,
42 const FilePath& setup_path, 51 const FilePath& setup_path,
43 const FilePath& archive_path, 52 const FilePath& archive_path,
44 const FilePath& src_path, 53 const FilePath& src_path,
45 const FilePath& temp_dir, 54 const FilePath& temp_dir,
46 const Version& new_version, 55 const Version& new_version,
47 scoped_ptr<Version>* current_version, 56 scoped_ptr<Version>* current_version,
48 const Package& package,
49 WorkItemList* install_list); 57 WorkItemList* install_list);
50 58
51 // Appends registration or unregistration work items to |work_item_list| for the 59 // Appends registration or unregistration work items to |work_item_list| for the
52 // COM DLLs whose file names are given in |dll_files| and which reside in the 60 // COM DLLs whose file names are given in |dll_files| and which reside in the
53 // path |dll_folder|. 61 // path |dll_folder|.
54 // |system_level| specifies whether to call the system or user level DLL 62 // |system_level| specifies whether to call the system or user level DLL
55 // registration entry points. 63 // registration entry points.
56 // |do_register| says whether to register or unregister. 64 // |do_register| says whether to register or unregister.
57 // |may_fail| states whether this is best effort or not. If |may_fail| is true 65 // |may_fail| states whether this is best effort or not. If |may_fail| is true
58 // then |work_item_list| will still succeed if the registration fails and 66 // then |work_item_list| will still succeed if the registration fails and
59 // no registration rollback will be performed. 67 // no registration rollback will be performed.
60 void AddRegisterComDllWorkItems(const FilePath& dll_folder, 68 void AddRegisterComDllWorkItems(const FilePath& dll_folder,
61 const std::vector<FilePath>& dll_files, 69 const std::vector<FilePath>& dll_files,
62 bool system_level, 70 bool system_level,
63 bool do_register, 71 bool do_register,
64 bool ignore_failures, 72 bool ignore_failures,
65 WorkItemList* work_item_list); 73 WorkItemList* work_item_list);
66 74
67 void AddSetMsiMarkerWorkItem(const Product& product, 75 void AddSetMsiMarkerWorkItem(const InstallerState& installer_state,
76 BrowserDistribution* dist,
68 bool set, 77 bool set,
69 WorkItemList* work_item_list); 78 WorkItemList* work_item_list);
70 79
71 // Called for either installation or uninstallation. This method updates the 80 // Called for either installation or uninstallation. This method updates the
72 // registry according to Chrome Frame specific options for the current 81 // registry according to Chrome Frame specific options for the current
73 // installation. This includes handling of the ready-mode option. 82 // installation. This includes handling of the ready-mode option.
74 void AddChromeFrameWorkItems(bool install, const FilePath& setup_path, 83 void AddChromeFrameWorkItems(const InstallationState& original_state,
75 const Version& new_version, const Product& product, 84 const InstallerState& installer_state,
85 const FilePath& setup_path,
86 const Version& new_version,
87 const Product& product,
76 WorkItemList* list); 88 WorkItemList* list);
77 89
78
79 // This method adds work items to create (or update) Chrome uninstall entry in 90 // This method adds work items to create (or update) Chrome uninstall entry in
80 // either the Control Panel->Add/Remove Programs list or in the Omaha client 91 // either the Control Panel->Add/Remove Programs list or in the Omaha client
81 // state key if running under an MSI installer. 92 // state key if running under an MSI installer.
82 void AddUninstallShortcutWorkItems(const FilePath& setup_path, 93 void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
83 const Version& new_version, 94 const FilePath& setup_path,
84 WorkItemList* install_list,
85 const Product& product);
86
87 void AddUninstallShortcutWorkItems(const FilePath& setup_path,
88 const Version& new_version, 95 const Version& new_version,
89 WorkItemList* install_list, 96 WorkItemList* install_list,
90 const Product& product); 97 const Product& product);
91 98
92 // Utility method currently shared between install.cc and install_worker.cc 99 // Utility method currently shared between install.cc and install_worker.cc
93 void AppendUninstallCommandLineFlags(CommandLine* uninstall_cmd, 100 void AppendUninstallCommandLineFlags(const InstallerState& installer_state,
94 const Product& product); 101 const Product& product,
102 CommandLine* uninstall_cmd);
95 103
96 } // namespace installer 104 } // namespace installer
97 105
98 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ 106 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698