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 #include "chrome/browser/sync/glue/sync_backend_host.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 using ::testing::_; | 39 using ::testing::_; |
40 | 40 |
41 namespace browser_sync { | 41 namespace browser_sync { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 ACTION_P(Signal, event) { | 45 ACTION_P(Signal, event) { |
46 event->Signal(); | 46 event->Signal(); |
47 } | 47 } |
48 | 48 |
49 void SignalEvent(base::WaitableEvent* event) { | 49 void QuitMessageLoop() { |
50 event->Signal(); | |
51 } | |
52 | |
53 static void QuitMessageLoop() { | |
54 MessageLoop::current()->Quit(); | 50 MessageLoop::current()->Quit(); |
55 } | 51 } |
56 | 52 |
57 class MockSyncFrontend : public SyncFrontend { | 53 class MockSyncFrontend : public SyncFrontend { |
58 public: | 54 public: |
59 virtual ~MockSyncFrontend() {} | 55 virtual ~MockSyncFrontend() {} |
60 | 56 |
61 MOCK_METHOD1(OnInvalidatorStateChange, | 57 MOCK_METHOD1(OnInvalidatorStateChange, |
62 void(syncer::InvalidatorState)); | 58 void(syncer::InvalidatorState)); |
63 MOCK_METHOD2(OnIncomingInvalidation, | 59 MOCK_METHOD2(OnIncomingInvalidation, |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 backend_->Shutdown(false); | 624 backend_->Shutdown(false); |
629 backend_.reset(); | 625 backend_.reset(); |
630 | 626 |
631 TearDown(); | 627 TearDown(); |
632 SetUp(); | 628 SetUp(); |
633 } | 629 } |
634 | 630 |
635 } // namespace | 631 } // namespace |
636 | 632 |
637 } // namespace browser_sync | 633 } // namespace browser_sync |
OLD | NEW |