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 "sync/notifier/non_blocking_invalidator.h" | 5 #include "sync/notifier/non_blocking_invalidator.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 options.message_loop_type = base::MessageLoop::TYPE_IO; | 41 options.message_loop_type = base::MessageLoop::TYPE_IO; |
42 io_thread_.StartWithOptions(options); | 42 io_thread_.StartWithOptions(options); |
43 request_context_getter_ = | 43 request_context_getter_ = |
44 new net::TestURLRequestContextGetter(io_thread_.message_loop_proxy()); | 44 new net::TestURLRequestContextGetter(io_thread_.message_loop_proxy()); |
45 notifier::NotifierOptions invalidator_options; | 45 notifier::NotifierOptions invalidator_options; |
46 invalidator_options.request_context_getter = request_context_getter_; | 46 invalidator_options.request_context_getter = request_context_getter_; |
47 invalidator_.reset( | 47 invalidator_.reset( |
48 new NonBlockingInvalidator( | 48 new NonBlockingInvalidator( |
49 invalidator_options, | 49 invalidator_options, |
50 invalidator_client_id, | 50 invalidator_client_id, |
51 InvalidationStateMap(), | 51 UnackedInvalidationsMap(), |
52 initial_state, | 52 initial_state, |
53 MakeWeakHandle(invalidation_state_tracker), | 53 MakeWeakHandle(invalidation_state_tracker), |
54 "fake_client_info")); | 54 "fake_client_info")); |
55 } | 55 } |
56 | 56 |
57 Invalidator* GetInvalidator() { | 57 Invalidator* GetInvalidator() { |
58 return invalidator_.get(); | 58 return invalidator_.get(); |
59 } | 59 } |
60 | 60 |
61 void DestroyInvalidator() { | 61 void DestroyInvalidator() { |
(...skipping 29 matching lines...) Expand all Loading... |
91 scoped_ptr<NonBlockingInvalidator> invalidator_; | 91 scoped_ptr<NonBlockingInvalidator> invalidator_; |
92 }; | 92 }; |
93 | 93 |
94 INSTANTIATE_TYPED_TEST_CASE_P( | 94 INSTANTIATE_TYPED_TEST_CASE_P( |
95 NonBlockingInvalidatorTest, InvalidatorTest, | 95 NonBlockingInvalidatorTest, InvalidatorTest, |
96 NonBlockingInvalidatorTestDelegate); | 96 NonBlockingInvalidatorTestDelegate); |
97 | 97 |
98 } // namespace | 98 } // namespace |
99 | 99 |
100 } // namespace syncer | 100 } // namespace syncer |
OLD | NEW |