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

Side by Side Diff: chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 "chrome/browser/sync/glue/android_invalidator_bridge.h" 5 #include "chrome/browser/sync/glue/android_invalidator_bridge.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Post a task to the sync thread's message loop and block until 142 // Post a task to the sync thread's message loop and block until
143 // it runs. 143 // it runs.
144 base::RunLoop run_loop; 144 base::RunLoop run_loop;
145 ASSERT_TRUE(sync_thread_.message_loop_proxy()->PostTaskAndReply( 145 ASSERT_TRUE(sync_thread_.message_loop_proxy()->PostTaskAndReply(
146 FROM_HERE, 146 FROM_HERE,
147 base::Bind(&base::DoNothing), 147 base::Bind(&base::DoNothing),
148 run_loop.QuitClosure())); 148 run_loop.QuitClosure()));
149 run_loop.Run(); 149 run_loop.Run();
150 } 150 }
151 151
152 MessageLoop ui_loop_; 152 base::MessageLoop ui_loop_;
153 content::TestBrowserThread ui_thread_; 153 content::TestBrowserThread ui_thread_;
154 base::Thread sync_thread_; 154 base::Thread sync_thread_;
155 NiceMock<ProfileMock> mock_profile_; 155 NiceMock<ProfileMock> mock_profile_;
156 // Created/used/destroyed on sync thread. 156 // Created/used/destroyed on sync thread.
157 scoped_ptr<syncer::FakeInvalidationHandler> sync_handler_; 157 scoped_ptr<syncer::FakeInvalidationHandler> sync_handler_;
158 bool sync_handler_notification_success_; 158 bool sync_handler_notification_success_;
159 scoped_ptr<AndroidInvalidatorBridge> bridge_; 159 scoped_ptr<AndroidInvalidatorBridge> bridge_;
160 }; 160 };
161 161
162 // Adds an observer on the sync thread, triggers a remote refresh 162 // Adds an observer on the sync thread, triggers a remote refresh
(...skipping 20 matching lines...) Expand all
183 syncer::ModelTypeSetToInvalidationMap(enabled_types, std::string()); 183 syncer::ModelTypeSetToInvalidationMap(enabled_types, std::string());
184 CreateObserver(); 184 CreateObserver();
185 UpdateEnabledTypes(enabled_types); 185 UpdateEnabledTypes(enabled_types);
186 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_REMOTE, 186 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_REMOTE,
187 syncer::ModelTypeInvalidationMap()); 187 syncer::ModelTypeInvalidationMap());
188 VerifyAndDestroyObserver(enabled_types_invalidation_map); 188 VerifyAndDestroyObserver(enabled_types_invalidation_map);
189 } 189 }
190 190
191 } // namespace 191 } // namespace
192 } // namespace browser_sync 192 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698