Chromium Code Reviews

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 6533009: Switch from wcsftime to GetDateFormat to avoid crash in setup.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | chrome/installer/util/install_util.h » ('j') | chrome/installer/util/install_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
===================================================================
--- chrome/installer/setup/install_worker.cc (revision 74952)
+++ chrome/installer/setup/install_worker.cc (working copy)
@@ -220,15 +220,10 @@
L"DisplayVersion",
UTF8ToWide(new_version.GetString()),
true);
- time_t rawtime = time(NULL);
- struct tm timeinfo = {0};
- localtime_s(&timeinfo, &rawtime);
- wchar_t buffer[9];
- if (wcsftime(buffer, 9, L"%Y%m%d", &timeinfo) == 8) {
- install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
- L"InstallDate",
- buffer, false);
- }
+ install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
+ L"InstallDate",
+ InstallUtil::GetCurrentDate(),
+ false);
}
}
« no previous file with comments | « no previous file | chrome/installer/util/install_util.h » ('j') | chrome/installer/util/install_util.cc » ('J')

Powered by Google App Engine