OLD | NEW |
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 CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ | 5 #ifndef SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ | 6 #define SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
11 #include "chrome/browser/sync/util/extensions_activity_monitor.h" | 11 #include "sync/util/extensions_activity_monitor.h" |
12 | 12 |
13 namespace browser_sync { | 13 namespace browser_sync { |
14 | 14 |
15 // Fake non-thread-safe implementation of ExtensionsActivityMonitor | 15 // Fake non-thread-safe implementation of ExtensionsActivityMonitor |
16 // suitable to be used in single-threaded sync tests. | 16 // suitable to be used in single-threaded sync tests. |
17 class FakeExtensionsActivityMonitor : public ExtensionsActivityMonitor { | 17 class FakeExtensionsActivityMonitor : public ExtensionsActivityMonitor { |
18 public: | 18 public: |
19 FakeExtensionsActivityMonitor(); | 19 FakeExtensionsActivityMonitor(); |
20 virtual ~FakeExtensionsActivityMonitor(); | 20 virtual ~FakeExtensionsActivityMonitor(); |
21 | 21 |
22 // ExtensionsActivityMonitor implementation. | 22 // ExtensionsActivityMonitor implementation. |
23 virtual void GetAndClearRecords(Records* buffer) OVERRIDE; | 23 virtual void GetAndClearRecords(Records* buffer) OVERRIDE; |
24 virtual void PutRecords(const Records& records) OVERRIDE; | 24 virtual void PutRecords(const Records& records) OVERRIDE; |
25 | 25 |
26 private: | 26 private: |
27 Records records_; | 27 Records records_; |
28 base::NonThreadSafe non_thread_safe_; | 28 base::NonThreadSafe non_thread_safe_; |
29 }; | 29 }; |
30 | 30 |
31 } // namespace browser_sync | 31 } // namespace browser_sync |
32 | 32 |
33 #endif // CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ | 33 #endif // SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ |
OLD | NEW |