Chromium Code Reviews| Index: components/safe_browsing_db/v4_protocol_manager_util.cc |
| diff --git a/components/safe_browsing_db/v4_protocol_manager_util.cc b/components/safe_browsing_db/v4_protocol_manager_util.cc |
| index 3dfbaefbbb00ad9d7aff75c82a20c0d65ddd2671..1f9222b7070654a057c7c4681c34f2c93382117f 100644 |
| --- a/components/safe_browsing_db/v4_protocol_manager_util.cc |
| +++ b/components/safe_browsing_db/v4_protocol_manager_util.cc |
| @@ -5,6 +5,7 @@ |
| #include "components/safe_browsing_db/v4_protocol_manager_util.h" |
| #include "base/base64.h" |
| +#include "base/files/file_util.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "base/rand_util.h" |
| #include "base/strings/string_util.h" |
| @@ -509,4 +510,13 @@ void V4ProtocolManagerUtil::SetClientInfoFromConfig( |
| client_info->set_client_version(config.version); |
| } |
| +// static |
| +int64_t V4ProtocolManagerUtil::GetFileSizeOrZero( |
| + const base::FilePath& file_path) { |
| + int64_t size_64; |
|
Scott Hess - ex-Googler
2016/10/21 23:36:45
Maybe strip the _64 while you're at it. I don't r
vakh (use Gerrit instead)
2016/10/24 19:39:32
Done.
|
| + if (!base::GetFileSize(file_path, &size_64)) |
| + return 0; |
| + return size_64; |
| +} |
| + |
| } // namespace safe_browsing |