Chromium Code Reviews| Index: chrome/installer/mini_installer/mini_installer.cc |
| diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc |
| index 600ea4653849b296b61abb25ddd06df553af80e0..d578f80e1823dbc9777b39b95ca75f73de0014c6 100644 |
| --- a/chrome/installer/mini_installer/mini_installer.cc |
| +++ b/chrome/installer/mini_installer/mini_installer.cc |
| @@ -23,6 +23,7 @@ |
| #include <windows.h> |
| #include <shellapi.h> |
| +#include <stdlib.h> |
| #include "chrome/installer/mini_installer/appid.h" |
| #include "chrome/installer/mini_installer/configuration.h" |
| @@ -583,7 +584,7 @@ bool CreateWorkDir(const wchar_t* base_path, PathString* work_dir) { |
| // The name of the directory will use up 11 chars and then we need to append |
| // the trailing backslash and a terminator. We've already added the prefix |
| // to the buffer, so let's just make sure we've got enough space for the rest. |
| - if ((work_dir->capacity() - end) < (arraysize("fffff.tmp") + 1)) |
| + if ((work_dir->capacity() - end) < (_countof("fffff.tmp") + 1)) |
| return false; |
| // Generate a unique id. We only use the lowest 20 bits, so take the top |
| @@ -738,7 +739,7 @@ void DeleteOldChromeTempDirectories() { |
| if (!len || len >= temp.capacity()) |
| return; |
| - for (int i = 0; i < arraysize(kDirectoryPrefixes); ++i) { |
| + for (int i = 0; i < _countof(kDirectoryPrefixes); ++i) { |
|
grt (UTC plus 2)
2015/05/06 16:46:34
for (const wchar_t* directory_prefix : kDirectoryP
tfarina
2015/05/06 17:21:55
Done.
|
| DeleteDirectoriesWithPrefix(temp.get(), kDirectoryPrefixes[i]); |
| } |
| } |
| @@ -775,7 +776,7 @@ bool ProcessNonInstallOperations(const Configuration& configuration, |
| bool ShouldDeleteExtractedFiles() { |
| wchar_t value[2] = {0}; |
| if (ReadValueFromRegistry(HKEY_CURRENT_USER, kCleanupRegistryKey, |
| - kCleanupRegistryValue, value, arraysize(value)) && |
| + kCleanupRegistryValue, value, _countof(value)) && |
| value[0] == L'0') { |
| return false; |
| } |