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