summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/util/sync_db_util.h
blob: 3784a10f2f1b173ce98fb25f9164974c70ca7327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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_