| 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..fbdc862bf59afb67e4773ff9873e0fdbd003606e 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,8 +739,8 @@ void DeleteOldChromeTempDirectories() {
|
| if (!len || len >= temp.capacity())
|
| return;
|
|
|
| - for (int i = 0; i < arraysize(kDirectoryPrefixes); ++i) {
|
| - DeleteDirectoriesWithPrefix(temp.get(), kDirectoryPrefixes[i]);
|
| + for (const wchar_t* directory_prefix : kDirectoryPrefixes) {
|
| + DeleteDirectoriesWithPrefix(temp.get(), directory_prefix);
|
| }
|
| }
|
|
|
| @@ -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;
|
| }
|
|
|