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

Side by Side Diff: chrome/installer/util/browser_distribution.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
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 declares a class that contains various method related to branding. 5 // This file declares a class that contains various method related to branding.
6 6
7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_
8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 17 matching lines...) Expand all
28 class Product; 28 class Product;
29 } 29 }
30 30
31 class BrowserDistribution { 31 class BrowserDistribution {
32 public: 32 public:
33 virtual ~BrowserDistribution() {} 33 virtual ~BrowserDistribution() {}
34 34
35 enum Type { 35 enum Type {
36 CHROME_BROWSER, 36 CHROME_BROWSER,
37 CHROME_FRAME, 37 CHROME_FRAME,
38 CHROME_BINARIES,
38 }; 39 };
39 40
40 static BrowserDistribution* GetDistribution(); 41 static BrowserDistribution* GetDistribution();
41 42
42 static BrowserDistribution* GetSpecificDistribution( 43 static BrowserDistribution* GetSpecificDistribution(Type type);
43 Type type, const installer::MasterPreferences& prefs);
44 44
45 Type GetType() const { return type_; } 45 Type GetType() const { return type_; }
46 46
47 virtual void DoPostUninstallOperations(const Version& version, 47 virtual void DoPostUninstallOperations(const Version& version,
48 const FilePath& local_data_path, 48 const FilePath& local_data_path,
49 const std::wstring& distribution_data); 49 const std::wstring& distribution_data);
50 50
51 virtual std::wstring GetAppGuid(); 51 virtual std::wstring GetAppGuid();
52 52
53 virtual std::wstring GetApplicationName(); 53 virtual std::wstring GetApplicationName();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // After an install or upgrade the user might qualify to participate in an 97 // After an install or upgrade the user might qualify to participate in an
98 // experiment. This function determines if the user qualifies and if so it 98 // experiment. This function determines if the user qualifies and if so it
99 // sets the wheels in motion or in simple cases does the experiment itself. 99 // sets the wheels in motion or in simple cases does the experiment itself.
100 virtual void LaunchUserExperiment(installer::InstallStatus status, 100 virtual void LaunchUserExperiment(installer::InstallStatus status,
101 const Version& version, const installer::Product& installation, 101 const Version& version, const installer::Product& installation,
102 bool system_level); 102 bool system_level);
103 103
104 // The user has qualified for the inactive user toast experiment and this 104 // The user has qualified for the inactive user toast experiment and this
105 // function just performs it. 105 // function just performs it.
106 virtual void InactiveUserToastExperiment(int flavor, 106 virtual void InactiveUserToastExperiment(int flavor,
107 const installer::Product& installation); 107 const installer::Product& installation,
108 108 const FilePath& application_path);
109 // A key-file is a file such as a DLL on Windows that is expected to be
110 // in use when the product is being used. For example "chrome.dll" for
111 // Chrome. Before attempting to delete an installation directory during
112 // an uninstallation, the uninstaller will check if any one of a potential
113 // set of key files is in use and if they are, abort the delete operation.
114 // Only if none of the key files are in use, can the folder be deleted.
115 // Note that this function does not return a full path to the key file(s),
116 // only (a) file name(s).
117 virtual std::vector<FilePath> GetKeyFiles();
118
119 // Returns the list of Com Dlls that this product cares about having
120 // registered and unregistered. The list may be empty.
121 virtual std::vector<FilePath> GetComDllList();
122
123 // Given a command line, appends the set of uninstall flags the uninstaller
124 // for this distribution will require.
125 virtual void AppendUninstallCommandLineFlags(CommandLine* cmd_line);
126
127 // Returns true if install should create an uninstallation entry in the
128 // Add/Remove Programs dialog for this distribution.
129 virtual bool ShouldCreateUninstallEntry();
130
131 // Adds or removes product-specific flags in |channel_info|. Returns true if
132 // |channel_info| is modified.
133 virtual bool SetChannelFlags(bool set, installer::ChannelInfo* channel_info);
134 109
135 protected: 110 protected:
136 explicit BrowserDistribution(const installer::MasterPreferences& prefs); 111 explicit BrowserDistribution(Type type);
137 112
138 template<class DistributionClass> 113 template<class DistributionClass>
139 static BrowserDistribution* GetOrCreateBrowserDistribution( 114 static BrowserDistribution* GetOrCreateBrowserDistribution(
140 const installer::MasterPreferences& prefs,
141 BrowserDistribution** dist); 115 BrowserDistribution** dist);
142 116
143 Type type_; 117 const Type type_;
144 118
145 private: 119 private:
120 BrowserDistribution();
121
146 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); 122 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution);
147 }; 123 };
148 124
149 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ 125 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_
OLDNEW
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698