| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ | 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/browser/sync/syncable/syncable.h" | 11 #include "chrome/browser/sync/syncable/syncable.h" |
| 12 #include "chrome/test/sync/null_directory_change_delegate.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 15 |
| 15 using syncable::Directory; | 16 using syncable::Directory; |
| 16 using syncable::EntryKernel; | 17 using syncable::EntryKernel; |
| 17 | 18 |
| 18 class MockDirectory : public Directory { | 19 class MockDirectory : public Directory { |
| 19 public: | 20 public: |
| 20 MockDirectory(); | 21 MockDirectory(); |
| 21 virtual ~MockDirectory(); | 22 virtual ~MockDirectory(); |
| 22 | 23 |
| 23 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); | 24 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); |
| 24 | 25 |
| 25 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64)); | 26 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64)); |
| 26 | 27 |
| 27 MOCK_METHOD1(GetEntryByClientTag, | 28 MOCK_METHOD1(GetEntryByClientTag, |
| 28 syncable::EntryKernel*(const std::string&)); | 29 syncable::EntryKernel*(const std::string&)); |
| 30 |
| 31 private: |
| 32 syncable::NullDirectoryChangeDelegate delegate_; |
| 29 }; | 33 }; |
| 30 | 34 |
| 31 class MockSyncableWriteTransaction : public syncable::WriteTransaction { | 35 class MockSyncableWriteTransaction : public syncable::WriteTransaction { |
| 32 public: | 36 public: |
| 33 explicit MockSyncableWriteTransaction(Directory *directory); | 37 explicit MockSyncableWriteTransaction(Directory *directory); |
| 34 }; | 38 }; |
| 35 | 39 |
| 36 | 40 |
| 37 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ | 41 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ |
| 38 | 42 |
| OLD | NEW |