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

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

Issue 10823437: Callback flow to register Chrome and update shortcuts after OS upgrade to Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reimplementing registry changes using AppCommand; adding checks in InstallationValidator. Created 8 years, 3 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) 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_INSTALLATION_VALIDATOR_H_ 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_
6 #define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ 6 #define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 virtual bool UsageStatsAllowed( 189 virtual bool UsageStatsAllowed(
190 const ProductState& product_state) const OVERRIDE; 190 const ProductState& product_state) const OVERRIDE;
191 }; 191 };
192 192
193 struct ProductContext { 193 struct ProductContext {
194 const InstallationState& machine_state; 194 const InstallationState& machine_state;
195 bool system_install; 195 bool system_install;
196 BrowserDistribution* dist; 196 BrowserDistribution* dist;
197 const ProductState& state; 197 const ProductState& state;
198 const ProductRules& rules; 198 const ProductRules& rules;
199
200 ProductContext(const InstallationState& machine_state,
201 const bool system_install,
202 const ProductState& state,
203 const ProductRules& rules):
gab 2012/08/28 16:08:19 See style at http://google-styleguide.googlecode.c
huangs 2012/08/29 17:02:54 Done.
204 machine_state(machine_state),
gab 2012/08/28 16:08:19 I don't know what the style is here, but I don't l
gab 2012/08/28 17:48:09 Discussed with Erik and Greg, suffix all the param
grt (UTC plus 2) 2012/08/28 19:35:40 +1.
huangs 2012/08/29 17:02:54 Done.
205 system_install(system_install),
206 dist(BrowserDistribution::GetSpecificDistribution(
207 rules.distribution_type())),
208 state(state),
209 rules(rules) {
210 }
199 }; 211 };
200 212
213 static void ValidateOnOsUpgradeCommand(const ProductContext& ctx,
214 const AppCommand& command,
215 bool* is_valid);
201 static void ValidateInstallAppCommand(const ProductContext& ctx, 216 static void ValidateInstallAppCommand(const ProductContext& ctx,
202 const AppCommand& command, 217 const AppCommand& command,
203 bool* is_valid); 218 bool* is_valid);
204 static void ValidateQuickEnableCfCommand(const ProductContext& ctx, 219 static void ValidateQuickEnableCfCommand(const ProductContext& ctx,
205 const AppCommand& command, 220 const AppCommand& command,
206 bool* is_valid); 221 bool* is_valid);
207 static void ValidateQuickEnableApplicationHostCommand( 222 static void ValidateQuickEnableApplicationHostCommand(
208 const ProductContext& ctx, 223 const ProductContext& ctx,
209 const AppCommand& command, 224 const AppCommand& command,
210 bool* is_valid); 225 bool* is_valid);
211 226
212 static void ValidateAppCommandExpectations( 227 static void ValidateAppCommandExpectations(
213 const ProductContext& ctx, 228 const ProductContext& ctx,
(...skipping 21 matching lines...) Expand all
235 static void ValidateRenameCommand(const ProductContext& ctx, 250 static void ValidateRenameCommand(const ProductContext& ctx,
236 bool* is_valid); 251 bool* is_valid);
237 static void ValidateOldVersionValues(const ProductContext& ctx, 252 static void ValidateOldVersionValues(const ProductContext& ctx,
238 bool* is_valid); 253 bool* is_valid);
239 static void ValidateMultiInstallProduct(const ProductContext& ctx, 254 static void ValidateMultiInstallProduct(const ProductContext& ctx,
240 bool* is_valid); 255 bool* is_valid);
241 static void ValidateAppCommands(const ProductContext& ctx, 256 static void ValidateAppCommands(const ProductContext& ctx,
242 bool* is_valid); 257 bool* is_valid);
243 static void ValidateUsageStats(const ProductContext& ctx, 258 static void ValidateUsageStats(const ProductContext& ctx,
244 bool* is_valid); 259 bool* is_valid);
245 static void ValidateProduct(const InstallationState& machine_state, 260 static void ValidateProduct(const ProductContext& ctx,
246 bool system_install,
247 const ProductState& product_state,
248 const ProductRules& rules,
249 bool* is_valid); 261 bool* is_valid);
250 262
251 // A collection of all valid installation types. 263 // A collection of all valid installation types.
252 static const InstallationType kInstallationTypes[]; 264 static const InstallationType kInstallationTypes[];
253 265
254 private: 266 private:
255 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator); 267 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator);
256 }; 268 };
257 269
258 } // namespace installer 270 } // namespace installer
259 271
260 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ 272 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698