| Index: components/policy/core/common/cloud/resource_cache.cc
|
| ===================================================================
|
| --- components/policy/core/common/cloud/resource_cache.cc (revision 245415)
|
| +++ components/policy/core/common/cloud/resource_cache.cc (working copy)
|
| @@ -9,7 +9,7 @@
|
| #include "base/file_util.h"
|
| #include "base/files/file_enumerator.h"
|
| #include "base/logging.h"
|
| -#include "base/safe_numerics.h"
|
| +#include "base/numerics/safe_conversions.h"
|
| #include "base/sequenced_task_runner.h"
|
| #include "base/strings/string_util.h"
|
|
|
| @@ -82,7 +82,7 @@
|
| // between these two calls. There is nothing in file_util that could be used
|
| // to protect against such races, especially as the cache is cross-platform
|
| // and therefore cannot use any POSIX-only tricks.
|
| - int size = base::checked_numeric_cast<int>(data.size());
|
| + int size = base::checked_cast<int>(data.size());
|
| return VerifyKeyPathAndGetSubkeyPath(key, true, subkey, &subkey_path) &&
|
| base::DeleteFile(subkey_path, false) &&
|
| (file_util::WriteFile(subkey_path, data.data(), size) == size);
|
|
|