| 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..4bb856e4b7c6b204b8752dbace35e477d623867a 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;
|
| + if (!base::GetFileSize(file_path, &size))
|
| + return 0;
|
| + return size;
|
| +}
|
| +
|
| } // namespace safe_browsing
|
|
|