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

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

Issue 6588003: Add support for the quick-enable-cf command to the installer. This encompase... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/util/install_util.cc ('k') | chrome/installer/util/installation_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) 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 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
6 #define CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 6 #define CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
15 #include "chrome/installer/util/app_commands.h"
15 #include "chrome/installer/util/browser_distribution.h" 16 #include "chrome/installer/util/browser_distribution.h"
16 #include "chrome/installer/util/channel_info.h" 17 #include "chrome/installer/util/channel_info.h"
17 18
18 class Version; 19 class Version;
19 20
21 namespace base {
22 namespace win {
23 class RegKey;
24 }
25 }
26
20 namespace installer { 27 namespace installer {
21 28
22 class InstallationState; 29 class InstallationState;
23 class MasterPreferences; 30 class MasterPreferences;
24 31
25 // A representation of a product's state on the machine based on the contents 32 // A representation of a product's state on the machine based on the contents
26 // of the Windows registry. 33 // of the Windows registry.
27 // TODO(grt): Pull this out into its own file. 34 // TODO(grt): Pull this out into its own file.
28 class ProductState { 35 class ProductState {
29 public: 36 public:
(...skipping 27 matching lines...) Expand all
57 64
58 // True if the "msi" value in the ClientState key is present and non-zero. 65 // True if the "msi" value in the ClientState key is present and non-zero.
59 bool is_msi() const { return msi_; } 66 bool is_msi() const { return msi_; }
60 67
61 // The command to uninstall the product; may be empty. 68 // The command to uninstall the product; may be empty.
62 const CommandLine& uninstall_command() const { return uninstall_command_; } 69 const CommandLine& uninstall_command() const { return uninstall_command_; }
63 70
64 // True if |uninstall_command| contains --multi-install. 71 // True if |uninstall_command| contains --multi-install.
65 bool is_multi_install() const { return multi_install_; } 72 bool is_multi_install() const { return multi_install_; }
66 73
74 // Returns the set of Google Update commands.
75 const AppCommands& commands() const { return commands_; }
76
67 // Returns this object a la operator=(). 77 // Returns this object a la operator=().
68 ProductState& CopyFrom(const ProductState& other); 78 ProductState& CopyFrom(const ProductState& other);
69 79
70 protected: 80 protected:
81 static bool InitializeCommands(const base::win::RegKey& version_key,
82 AppCommands* commands);
83
71 ChannelInfo channel_; 84 ChannelInfo channel_;
72 scoped_ptr<Version> version_; 85 scoped_ptr<Version> version_;
73 scoped_ptr<Version> old_version_; 86 scoped_ptr<Version> old_version_;
74 std::wstring rename_cmd_; 87 std::wstring rename_cmd_;
75 CommandLine uninstall_command_; 88 CommandLine uninstall_command_;
89 AppCommands commands_;
76 bool msi_; 90 bool msi_;
77 bool multi_install_; 91 bool multi_install_;
78 92
79 private: 93 private:
80 friend class InstallationState; 94 friend class InstallationState;
81 95
82 DISALLOW_COPY_AND_ASSIGN(ProductState); 96 DISALLOW_COPY_AND_ASSIGN(ProductState);
83 }; // class ProductState 97 }; // class ProductState
84 98
85 // Encapsulates the state of all products on the system. 99 // Encapsulates the state of all products on the system.
(...skipping 23 matching lines...) Expand all
109 ProductState user_products_[NUM_PRODUCTS]; 123 ProductState user_products_[NUM_PRODUCTS];
110 ProductState system_products_[NUM_PRODUCTS]; 124 ProductState system_products_[NUM_PRODUCTS];
111 125
112 private: 126 private:
113 DISALLOW_COPY_AND_ASSIGN(InstallationState); 127 DISALLOW_COPY_AND_ASSIGN(InstallationState);
114 }; // class InstallationState 128 }; // class InstallationState
115 129
116 } // namespace installer 130 } // namespace installer
117 131
118 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 132 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698