sync_invalidation.cc 758 B

123456789101112131415161718192021222324252627
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/sync/base/sync_invalidation.h"
  5. namespace syncer {
  6. bool SyncInvalidation::LessThanByVersion(const SyncInvalidation& a,
  7. const SyncInvalidation& b) {
  8. if (a.IsUnknownVersion() && !b.IsUnknownVersion())
  9. return true;
  10. if (!a.IsUnknownVersion() && b.IsUnknownVersion())
  11. return false;
  12. if (a.IsUnknownVersion() && b.IsUnknownVersion())
  13. return false;
  14. return a.GetVersion() < b.GetVersion();
  15. }
  16. SyncInvalidation::SyncInvalidation() = default;
  17. SyncInvalidation::~SyncInvalidation() = default;
  18. } // namespace syncer