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

Side by Side Diff: chrome/installer/util/product_operations.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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_INSTALLER_UTIL_PRODUCT_OPERATIONS_H_
6 #define CHROME_INSTALLER_UTIL_PRODUCT_OPERATIONS_H_
7 #pragma once
8
9 #include <set>
10 #include <string>
11 #include <vector>
12
13 #include "base/file_path.h"
14
15 class CommandLine;
16
17 namespace installer {
18
19 class ChannelInfo;
20 class MasterPreferences;
21
22 // An interface to product-specific operations that depend on product
23 // configuration. Implementations are expected to be stateless. Configuration
24 // can be read from a MasterPreferences instance or from a product's uninstall
25 // command.
26 class ProductOperations {
27 public:
28 virtual ~ProductOperations() {}
29
30 // Reads product-specific options from |prefs|, adding them to |options|.
31 virtual void ReadOptions(const MasterPreferences& prefs,
32 std::set<std::wstring>* options) = 0;
33
34 // Reads product-specific options from |uninstall_command|, adding them to
35 // |options|.
robertshield 2011/01/20 23:36:34 Naming the parameter "uninstall_command" conflates
grt (UTC plus 2) 2011/01/21 05:27:51 Done.
36 virtual void ReadOptions(const CommandLine& uninstall_command,
37 std::set<std::wstring>* options) = 0;
38
39 // A key-file is a file such as a DLL on Windows that is expected to be in use
40 // when the product is being used. For example "chrome.dll" for Chrome.
41 // Before attempting to delete an installation directory during an
42 // uninstallation, the uninstaller will check if any one of a potential set of
43 // key files is in use and if they are, abort the delete operation. Only if
44 // none of the key files are in use, can the folder be deleted. Note that
45 // this function does not return a full path to the key file(s), only (a) file
46 // name(s).
47 virtual void AddKeyFiles(const std::set<std::wstring>& options,
48 std::vector<FilePath>* key_files) = 0;
49
50 // Adds to |com_dll_list| the list of COM DLLs that are to be registered
51 // and/or unregistered. The list may be empty.
52 virtual void AddComDllList(const std::set<std::wstring>& options,
53 std::vector<FilePath>* com_dll_list) = 0;
54
55 // Given a command line, appends the set of uninstall flags the uninstaller
56 // for this product will require.
57 virtual void AppendProductFlags(const std::set<std::wstring>& options,
58 CommandLine* uninstall_command) = 0;
59
60 // Adds or removes product-specific flags in |channel_info|. Returns true if
61 // |channel_info| is modified.
62 virtual bool SetChannelFlags(const std::set<std::wstring>& options,
63 bool set,
64 ChannelInfo* channel_info) const = 0;
65
66 // Returns true if setup should create an entry in the Add/Remove list
67 // of installed applications for this product. This does not test for use of
68 // MSI; see InstallerState::is_msi.
69 virtual bool ShouldCreateUninstallEntry(
70 const std::set<std::wstring>& options) const = 0;
71 };
72
73 } // namespace installer
74
75 #endif // CHROME_INSTALLER_UTIL_PRODUCT_OPERATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698