diff options
author | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 22:41:55 +0000 |
---|---|---|
committer | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 22:41:55 +0000 |
commit | 09301f4955d25207a842f905ef2942842f6e0dff (patch) | |
tree | 06b9ee6559ee40e25d16021b9bacd30c31cd511c /sync/internal_api/public/util/sync_db_util.h | |
parent | 99132862d26d3eeff3c875337ee704549c3fa37d (diff) | |
download | chromium_src-09301f4955d25207a842f905ef2942842f6e0dff.zip chromium_src-09301f4955d25207a842f905ef2942842f6e0dff.tar.gz chromium_src-09301f4955d25207a842f905ef2942842f6e0dff.tar.bz2 |
[sync] Add backup time in synced device info so that server knows which device can be rolled back to when.
Backup DB is checked and backup time in device info is updated periodically
to keep server informed about backup state.
BUG=362679
TBR=gbillock@chromium.org
Review URL: https://codereview.chromium.org/332923002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/util/sync_db_util.h')
-rw-r--r-- | sync/internal_api/public/util/sync_db_util.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sync/internal_api/public/util/sync_db_util.h b/sync/internal_api/public/util/sync_db_util.h new file mode 100644 index 0000000..3784a10 --- /dev/null +++ b/sync/internal_api/public/util/sync_db_util.h @@ -0,0 +1,30 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SYNC_INTERNAL_API_PUBLIC_UTIL_SYNC_DB_UTIL_H_ +#define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNC_DB_UTIL_H_ + +#include "base/callback.h" +#include "base/memory/ref_counted.h" +#include "base/time/time.h" +#include "sync/base/sync_export.h" + +namespace base { +class FilePath; +class SingleThreadTaskRunner; +} // namespace base + +namespace syncer { + +// Check integrity of sync DB under |sync_dir|. Invoke |callback| with last +// modified time if integrity check passes, with NULL time otherwise. This +// is called on either sync thread or IO thread. +SYNC_EXPORT void CheckSyncDbLastModifiedTime( + const base::FilePath& sync_dir, + scoped_refptr<base::SingleThreadTaskRunner> callback_runner, + base::Callback<void(base::Time)> callback); + +} // namesapce syncer + +#endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNC_DB_UTIL_H_ |