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

Unified Diff: chrome/installer/util/install_util.cc

Issue 8142028: When critical updates have been installed and the user has been idle for quite some time, show a ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
===================================================================
--- chrome/installer/util/install_util.cc (revision 105287)
+++ chrome/installer/util/install_util.cc (working copy)
@@ -193,6 +193,31 @@
return ret;
}
+Version* InstallUtil::GetCriticalUpdateVersion(BrowserDistribution* dist) {
+ DCHECK(dist);
+ RegKey key;
+ LONG result =
+ key.Open(HKEY_CURRENT_USER, dist->GetVersionKey().c_str(), KEY_READ);
+
+ string16 version_str;
+ if (result == ERROR_SUCCESS)
+ result = key.ReadValue(google_update::kRegCriticalUpdateField,
+ &version_str);
+
+ Version* ret = NULL;
+ if (result == ERROR_SUCCESS && !version_str.empty()) {
+ VLOG(1) << "Critical Update version for " << dist->GetApplicationName()
+ << " found " << version_str;
+ ret = Version::GetVersionFromString(WideToASCII(version_str));
+ } else {
+ DCHECK_EQ(ERROR_FILE_NOT_FOUND, result);
+ VLOG(1) << "No existing " << dist->GetApplicationName()
+ << " install found.";
+ }
+
+ return ret;
+}
+
bool InstallUtil::IsOSSupported() {
// We do not support Win2K or older, or XP without service pack 2.
VLOG(1) << base::SysInfo::OperatingSystemName() << ' '
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698