| 1582 | } |
| 1583 | |
| 1584 | bool Storage::IsAllowedToEditFile(LocalFilePtr const & localFile) const |
| 1585 | { |
| 1586 | ASSERT(localFile, ("Local file shouldn't be nullptr.")); |
| 1587 | auto const currentVersionTime = base::YYMMDDToSecondsSinceEpoch(static_cast<uint32_t>(m_currentVersion)); |
| 1588 | auto const localVersionTime = base::YYMMDDToSecondsSinceEpoch(static_cast<uint32_t>(localFile->GetVersion())); |
| 1589 | return currentVersionTime - localVersionTime < kMaxSecondsTillLastVersionUpdate && |
| 1590 | base::SecondsSinceEpoch() - localVersionTime < kMaxSecondsTillNoEdits; |
| 1591 | } |
| 1592 | |
| 1593 | int64_t Storage::GetVersion(CountryId const & countryId) const |
| 1594 | { |
nothing calls this directly
no test coverage detected