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

Side by Side Diff: chrome/installer/util/installer_state.h

Issue 96193003: Uninstall multi-install Chrome Frame when updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to r238541 Created 7 years 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/util/install_util.cc ('k') | chrome/installer/util/installer_state.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) 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 #ifndef CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_
6 #define CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ 6 #define CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void WriteInstallerResult(InstallStatus status, 209 void WriteInstallerResult(InstallStatus status,
210 int string_resource_id, 210 int string_resource_id,
211 const std::wstring* launch_cmd) const; 211 const std::wstring* launch_cmd) const;
212 212
213 // Returns true if this install needs to register an Active Setup command. 213 // Returns true if this install needs to register an Active Setup command.
214 bool RequiresActiveSetup() const; 214 bool RequiresActiveSetup() const;
215 215
216 protected: 216 protected:
217 // Bits for the |file_bits| argument of AnyExistsAndIsInUse. 217 // Bits for the |file_bits| argument of AnyExistsAndIsInUse.
218 enum { 218 enum {
219 CHROME_FRAME_DLL = 1 << 0, 219 CHROME_DLL = 1 << 0,
220 CHROME_FRAME_HELPER_EXE = 1 << 1, 220 CHROME_FRAME_DLL = 1 << 1,
221 CHROME_DLL = 1 << 2, 221 CHROME_FRAME_HELPER_DLL = 1 << 2,
222 NUM_BINARIES = 3 222 CHROME_FRAME_HELPER_EXE = 1 << 3,
223 NUM_BINARIES = 4
223 }; 224 };
224 225
225 // Returns true if |file| exists and cannot be opened for exclusive write 226 // Returns true if |file| exists and cannot be opened for exclusive write
226 // access. 227 // access.
227 static bool IsFileInUse(const base::FilePath& file); 228 static bool IsFileInUse(const base::FilePath& file);
228 229
230 // Clears the instance to an uninitialized state.
231 void Clear();
232
229 // Returns true if any file corresponding to a bit in |file_bits| (from the 233 // Returns true if any file corresponding to a bit in |file_bits| (from the
230 // enum above) for the currently installed version exists and is in use. 234 // enum above) for the currently installed version exists and is in use.
231 bool AnyExistsAndIsInUse(const InstallationState& machine_state, 235 bool AnyExistsAndIsInUse(const InstallationState& machine_state,
232 uint32 file_bits) const; 236 uint32 file_bits) const;
233 base::FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; 237 base::FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const;
234 bool CanAddProduct(const Product& product, 238 bool CanAddProduct(const Product& product,
235 const base::FilePath* product_dir) const; 239 const base::FilePath* product_dir) const;
236 Product* AddProductInDirectory(const base::FilePath* product_dir, 240 Product* AddProductInDirectory(const base::FilePath* product_dir,
237 scoped_ptr<Product>* product); 241 scoped_ptr<Product>* product);
238 Product* AddProductFromPreferences( 242 Product* AddProductFromPreferences(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 bool verbose_logging_; 274 bool verbose_logging_;
271 bool ensure_google_update_present_; 275 bool ensure_google_update_present_;
272 276
273 private: 277 private:
274 DISALLOW_COPY_AND_ASSIGN(InstallerState); 278 DISALLOW_COPY_AND_ASSIGN(InstallerState);
275 }; // class InstallerState 279 }; // class InstallerState
276 280
277 } // namespace installer 281 } // namespace installer
278 282
279 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ 283 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698