summaryrefslogtreecommitdiffstats
path: root/sync/syncable/syncable_mock.cc
blob: 9bc68e4171ea6cfdeef813638af4511937167765 (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
31
32
// Copyright (c) 2012 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.

#include "sync/syncable/syncable_mock.h"

#include "base/location.h"
#include "sync/syncable/in_memory_directory_backing_store.h"

#include "sync/test/null_transaction_observer.h"

namespace syncer {
namespace syncable {

MockDirectory::MockDirectory(UnrecoverableErrorHandler* handler)
    : Directory(new syncable::InMemoryDirectoryBackingStore("store"),
                handler,
                NULL,
                NULL,
                NULL) {
  InitKernelForTest("myk", &delegate_, syncable::NullTransactionObserver());
}

MockDirectory::~MockDirectory() {}

MockSyncableWriteTransaction::MockSyncableWriteTransaction(
    const tracked_objects::Location& from_here, Directory *directory)
    : WriteTransaction(from_here, syncable::UNITTEST, directory) {
}

}  // namespace syncable
}  // namespace syncer