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

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
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| to set installer error information in the
52 // Update can read it and display to the user. |state_key| should be 52 // registry for consumption by Google Update. |state_key| must be the full
53 // obtained via the state_key method of an InstallerState instance created 53 // path to an app's ClientState key. See InstallerState::WriteInstallerResult
54 // before the machine state is modified by the installer. 54 // for more details.
robertshield 2011/05/18 12:28:40 I wonder if we should enforce that install_list is
grt (UTC plus 2) 2011/05/18 13:39:30 I've added a comment recommending this. (We have
55 static void WriteInstallerResult(bool system_install, 55 static void AddInstallerResultItems(bool system_install,
56 const std::wstring& state_key, 56 const std::wstring& state_key,
57 installer::InstallStatus status, 57 installer::InstallStatus status,
58 int string_resource_id, 58 int string_resource_id,
59 const std::wstring* const launch_cmd); 59 const std::wstring* const launch_cmd,
60 WorkItemList* install_list);
60 61
61 // Update the installer stage reported by Google Update. |state_key_path| 62 // Update the installer stage reported by Google Update. |state_key_path|
62 // should be obtained via the state_key method of an InstallerState instance 63 // should be obtained via the state_key method of an InstallerState instance
63 // created before the machine state is modified by the installer. 64 // created before the machine state is modified by the installer.
64 static void UpdateInstallerStage(bool system_install, 65 static void UpdateInstallerStage(bool system_install,
65 const std::wstring& state_key_path, 66 const std::wstring& state_key_path,
66 installer::InstallerStage stage); 67 installer::InstallerStage stage);
67 68
68 // Returns true if this installation path is per user, otherwise returns 69 // Returns true if this installation path is per user, otherwise returns
69 // false (per machine install, meaning: the exe_path contains path to 70 // false (per machine install, meaning: the exe_path contains path to
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 159
159 // Returns a string in the form YYYYMMDD of the current date. 160 // Returns a string in the form YYYYMMDD of the current date.
160 static std::wstring GetCurrentDate(); 161 static std::wstring GetCurrentDate();
161 162
162 private: 163 private:
163 DISALLOW_COPY_AND_ASSIGN(InstallUtil); 164 DISALLOW_COPY_AND_ASSIGN(InstallUtil);
164 }; 165 };
165 166
166 167
167 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ 168 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698