| 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 "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "sync/notifier/fake_invalidator.h" | 7 #include "sync/notifier/fake_invalidator.h" |
| 8 #include "sync/notifier/invalidator_test_template.h" | 8 #include "sync/notifier/invalidator_test_template.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 void DestroyInvalidator() { | 35 void DestroyInvalidator() { |
| 36 invalidator_.reset(); | 36 invalidator_.reset(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void WaitForInvalidator() { | 39 void WaitForInvalidator() { |
| 40 // Do Nothing. | 40 // Do Nothing. |
| 41 } | 41 } |
| 42 | 42 |
| 43 void TriggerOnNotificationsEnabled() { | 43 void TriggerOnInvalidatorStateChange(InvalidatorState state) { |
| 44 invalidator_->EmitOnNotificationsEnabled(); | 44 invalidator_->EmitOnInvalidatorStateChange(state); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void TriggerOnIncomingNotification(const ObjectIdStateMap& id_state_map, | 47 void TriggerOnIncomingInvalidation(const ObjectIdStateMap& id_state_map, |
| 48 IncomingNotificationSource source) { | 48 IncomingInvalidationSource source) { |
| 49 invalidator_->EmitOnIncomingNotification(id_state_map, source); | 49 invalidator_->EmitOnIncomingInvalidation(id_state_map, source); |
| 50 } | |
| 51 | |
| 52 void TriggerOnNotificationsDisabled(NotificationsDisabledReason reason) { | |
| 53 invalidator_->EmitOnNotificationsDisabled(reason); | |
| 54 } | 50 } |
| 55 | 51 |
| 56 static bool InvalidatorHandlesDeprecatedState() { | 52 static bool InvalidatorHandlesDeprecatedState() { |
| 57 return false; | 53 return false; |
| 58 } | 54 } |
| 59 | 55 |
| 60 private: | 56 private: |
| 61 scoped_ptr<FakeInvalidator> invalidator_; | 57 scoped_ptr<FakeInvalidator> invalidator_; |
| 62 }; | 58 }; |
| 63 | 59 |
| 64 INSTANTIATE_TYPED_TEST_CASE_P( | 60 INSTANTIATE_TYPED_TEST_CASE_P( |
| 65 FakeInvalidatorTest, InvalidatorTest, | 61 FakeInvalidatorTest, InvalidatorTest, |
| 66 FakeInvalidatorTestDelegate); | 62 FakeInvalidatorTestDelegate); |
| 67 | 63 |
| 68 } // namespace | 64 } // namespace |
| 69 | 65 |
| 70 } // namespace syncer | 66 } // namespace syncer |
| OLD | NEW |