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

Side by Side Diff: components/sync_driver/shared_change_processor_unittest.cc

Issue 2028193002: Migrate WaitableEvent to enum-based constructor in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: rm comment explaining true/false Created 4 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
« no previous file with comments | « components/sync_driver/non_ui_data_type_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync_driver/shared_change_processor.h" 5 #include "components/sync_driver/shared_change_processor.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 void SetAttachmentStore() { 144 void SetAttachmentStore() {
145 EXPECT_TRUE(backend_thread_.task_runner()->PostTask( 145 EXPECT_TRUE(backend_thread_.task_runner()->PostTask(
146 FROM_HERE, 146 FROM_HERE,
147 base::Bind(&SyncSharedChangeProcessorTest::SetAttachmentStoreOnDBThread, 147 base::Bind(&SyncSharedChangeProcessorTest::SetAttachmentStoreOnDBThread,
148 base::Unretained(this)))); 148 base::Unretained(this))));
149 } 149 }
150 150
151 bool HasAttachmentService() { 151 bool HasAttachmentService() {
152 base::WaitableEvent event(false, false); 152 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
153 base::WaitableEvent::InitialState::NOT_SIGNALED);
153 EXPECT_TRUE(backend_thread_.task_runner()->PostTask( 154 EXPECT_TRUE(backend_thread_.task_runner()->PostTask(
154 FROM_HERE, 155 FROM_HERE,
155 base::Bind( 156 base::Bind(
156 &SyncSharedChangeProcessorTest::CheckAttachmentServiceOnDBThread, 157 &SyncSharedChangeProcessorTest::CheckAttachmentServiceOnDBThread,
157 base::Unretained(this), base::Unretained(&event)))); 158 base::Unretained(this), base::Unretained(&event))));
158 event.Wait(); 159 event.Wait();
159 return has_attachment_service_; 160 return has_attachment_service_;
160 } 161 }
161 162
162 private: 163 private:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // creates AttachmentService and passes it back to the syncable service. 229 // creates AttachmentService and passes it back to the syncable service.
229 TEST_F(SyncSharedChangeProcessorTest, ConnectWithAttachmentStore) { 230 TEST_F(SyncSharedChangeProcessorTest, ConnectWithAttachmentStore) {
230 SetAttachmentStore(); 231 SetAttachmentStore();
231 Connect(); 232 Connect();
232 EXPECT_TRUE(HasAttachmentService()); 233 EXPECT_TRUE(HasAttachmentService());
233 } 234 }
234 235
235 } // namespace 236 } // namespace
236 237
237 } // namespace sync_driver 238 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/non_ui_data_type_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698