Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(824)

Side by Side Diff: sync/syncable/syncable_mock.h

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/syncable_id_unittest.cc ('k') | sync/syncable/syncable_mock.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 5 #ifndef SYNC_SYNCABLE_SYNCABLE_MOCK_H_
6 #define SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 6 #define SYNC_SYNCABLE_SYNCABLE_MOCK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "sync/syncable/directory.h" 11 #include "sync/syncable/directory.h"
12 #include "sync/syncable/write_transaction.h" 12 #include "sync/syncable/write_transaction.h"
13 #include "sync/test/fake_encryptor.h" 13 #include "sync/test/fake_encryptor.h"
14 #include "sync/test/null_directory_change_delegate.h" 14 #include "sync/test/null_directory_change_delegate.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 using syncable::Directory; 18 using syncable::Directory;
19 using syncable::EntryKernel; 19 using syncable::EntryKernel;
20 20
21 class MockDirectory : public Directory { 21 class MockDirectory : public Directory {
22 public: 22 public:
23 explicit MockDirectory(csync::UnrecoverableErrorHandler* handler); 23 explicit MockDirectory(syncer::UnrecoverableErrorHandler* handler);
24 virtual ~MockDirectory(); 24 virtual ~MockDirectory();
25 25
26 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); 26 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64));
27 27
28 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64)); 28 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64));
29 29
30 MOCK_METHOD1(GetEntryByClientTag, 30 MOCK_METHOD1(GetEntryByClientTag,
31 syncable::EntryKernel*(const std::string&)); 31 syncable::EntryKernel*(const std::string&));
32 32
33 MOCK_METHOD1(PurgeEntriesWithTypeIn, void(syncable::ModelTypeSet)); 33 MOCK_METHOD1(PurgeEntriesWithTypeIn, void(syncable::ModelTypeSet));
34 34
35 private: 35 private:
36 csync::FakeEncryptor encryptor_; 36 syncer::FakeEncryptor encryptor_;
37 syncable::NullDirectoryChangeDelegate delegate_; 37 syncable::NullDirectoryChangeDelegate delegate_;
38 }; 38 };
39 39
40 class MockSyncableWriteTransaction : public syncable::WriteTransaction { 40 class MockSyncableWriteTransaction : public syncable::WriteTransaction {
41 public: 41 public:
42 MockSyncableWriteTransaction( 42 MockSyncableWriteTransaction(
43 const tracked_objects::Location& from_here, Directory *directory); 43 const tracked_objects::Location& from_here, Directory *directory);
44 }; 44 };
45 45
46 46
47 #endif // SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 47 #endif // SYNC_SYNCABLE_SYNCABLE_MOCK_H_
48 48
OLDNEW
« no previous file with comments | « sync/syncable/syncable_id_unittest.cc ('k') | sync/syncable/syncable_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698