OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_ | |
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/sync/internal_api/write_transaction.h" | |
10 #include "chrome/browser/sync/syncable/syncable.h" | |
11 #include "chrome/browser/sync/syncable/syncable_mock.h" | |
12 #include "testing/gmock/include/gmock/gmock.h" | |
13 #include "testing/gtest/include/gtest/gtest.h" | |
14 | |
15 using sync_api::WriteTransaction; | |
16 | |
17 class MockWriteTransaction : public sync_api::WriteTransaction { | |
18 public: | |
19 MockWriteTransaction(const tracked_objects::Location& from_here, | |
20 Directory* directory) | |
21 : sync_api::WriteTransaction() { | |
22 SetTransaction(new MockSyncableWriteTransaction(from_here, directory)); | |
23 } | |
24 }; | |
25 | |
26 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_ | |
27 | |
OLD | NEW |