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

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

Issue 7036017: Write installer results in all relevant registry keys so that we're sure that Google Update will ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/setup_main.cc ('k') | chrome/installer/util/install_util.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 // This file declares utility functions for the installer. The original reason 5 // This file declares utility functions for the installer. The original reason
6 // for putting these functions in installer\util library is so that we can 6 // for putting these functions in installer\util library is so that we can
7 // separate out the critical logic and write unit tests for it. 7 // separate out the critical logic and write unit tests for it.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__
10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__
(...skipping 30 matching lines...) Expand all
41 // Google Update registry key. Returns the version or NULL if no version is 41 // Google Update registry key. Returns the version or NULL if no version is
42 // found. 42 // found.
43 // system_install: if true, looks for version number under the HKLM root, 43 // system_install: if true, looks for version number under the HKLM root,
44 // otherwise looks under the HKCU. 44 // otherwise looks under the HKCU.
45 static Version* GetChromeVersion(BrowserDistribution* dist, 45 static Version* GetChromeVersion(BrowserDistribution* dist,
46 bool system_install); 46 bool system_install);
47 47
48 // This function checks if the current OS is supported for Chromium. 48 // This function checks if the current OS is supported for Chromium.
49 static bool IsOSSupported(); 49 static bool IsOSSupported();
50 50
51 // This function sets installer error information in registry so that Google 51 // Adds work items to |install_list|, which should be a
52 // Update can read it and display to the user. |state_key| should be 52 // NoRollbackWorkItemList, to set installer error information in the registry
53 // obtained via the state_key method of an InstallerState instance created 53 // for consumption by Google Update. |state_key| must be the full path to an
54 // before the machine state is modified by the installer. 54 // app's ClientState key. See InstallerState::WriteInstallerResult for more
55 static void WriteInstallerResult(bool system_install, 55 // details.
56 const std::wstring& state_key, 56 static void AddInstallerResultItems(bool system_install,
57 installer::InstallStatus status, 57 const std::wstring& state_key,
58 int string_resource_id, 58 installer::InstallStatus status,
59 const std::wstring* const launch_cmd); 59 int string_resource_id,
60 const std::wstring* const launch_cmd,
61 WorkItemList* install_list);
60 62
61 // Update the installer stage reported by Google Update. |state_key_path| 63 // Update the installer stage reported by Google Update. |state_key_path|
62 // should be obtained via the state_key method of an InstallerState instance 64 // should be obtained via the state_key method of an InstallerState instance
63 // created before the machine state is modified by the installer. 65 // created before the machine state is modified by the installer.
64 static void UpdateInstallerStage(bool system_install, 66 static void UpdateInstallerStage(bool system_install,
65 const std::wstring& state_key_path, 67 const std::wstring& state_key_path,
66 installer::InstallerStage stage); 68 installer::InstallerStage stage);
67 69
68 // Returns true if this installation path is per user, otherwise returns 70 // Returns true if this installation path is per user, otherwise returns
69 // false (per machine install, meaning: the exe_path contains path to 71 // false (per machine install, meaning: the exe_path contains path to
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 160
159 // Returns a string in the form YYYYMMDD of the current date. 161 // Returns a string in the form YYYYMMDD of the current date.
160 static std::wstring GetCurrentDate(); 162 static std::wstring GetCurrentDate();
161 163
162 private: 164 private:
163 DISALLOW_COPY_AND_ASSIGN(InstallUtil); 165 DISALLOW_COPY_AND_ASSIGN(InstallUtil);
164 }; 166 };
165 167
166 168
167 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ 169 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698