Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: sync/notifier/non_blocking_invalidator_unittest.cc

Issue 10911084: Implement Invalidator::Acknowledge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restart test + more cleanup Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 base::Thread::Options options; 42 base::Thread::Options options;
43 options.message_loop_type = MessageLoop::TYPE_IO; 43 options.message_loop_type = MessageLoop::TYPE_IO;
44 io_thread_.StartWithOptions(options); 44 io_thread_.StartWithOptions(options);
45 request_context_getter_ = 45 request_context_getter_ =
46 new TestURLRequestContextGetter(io_thread_.message_loop_proxy()); 46 new TestURLRequestContextGetter(io_thread_.message_loop_proxy());
47 notifier::NotifierOptions invalidator_options; 47 notifier::NotifierOptions invalidator_options;
48 invalidator_options.request_context_getter = request_context_getter_; 48 invalidator_options.request_context_getter = request_context_getter_;
49 invalidator_.reset( 49 invalidator_.reset(
50 new NonBlockingInvalidator( 50 new NonBlockingInvalidator(
51 invalidator_options, 51 invalidator_options,
52 InvalidationVersionMap(), 52 InvalidationStateMap(),
53 initial_state, 53 initial_state,
54 MakeWeakHandle(invalidation_state_tracker), 54 MakeWeakHandle(invalidation_state_tracker),
55 "fake_client_info")); 55 "fake_client_info"));
56 } 56 }
57 57
58 Invalidator* GetInvalidator() { 58 Invalidator* GetInvalidator() {
59 return invalidator_.get(); 59 return invalidator_.get();
60 } 60 }
61 61
62 void DestroyInvalidator() { 62 void DestroyInvalidator() {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 scoped_ptr<NonBlockingInvalidator> invalidator_; 97 scoped_ptr<NonBlockingInvalidator> invalidator_;
98 }; 98 };
99 99
100 INSTANTIATE_TYPED_TEST_CASE_P( 100 INSTANTIATE_TYPED_TEST_CASE_P(
101 NonBlockingInvalidatorTest, InvalidatorTest, 101 NonBlockingInvalidatorTest, InvalidatorTest,
102 NonBlockingInvalidatorTestDelegate); 102 NonBlockingInvalidatorTestDelegate);
103 103
104 } // namespace 104 } // namespace
105 105
106 } // namespace syncer 106 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698