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

Side by Side Diff: net/base/address_tracker_linux_unittest.cc

Issue 2030663002: Migrate WaitableEvent to enum-based constructor in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: 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 | « no previous file | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/base/address_tracker_linux.h" 5 #include "net/base/address_tracker_linux.h"
6 6
7 #include <linux/if.h> 7 #include <linux/if.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 TEST_F(AddressTrackerLinuxTest, NonTrackingModeInit) { 685 TEST_F(AddressTrackerLinuxTest, NonTrackingModeInit) {
686 AddressTrackerLinux tracker; 686 AddressTrackerLinux tracker;
687 tracker.Init(); 687 tracker.Init();
688 } 688 }
689 689
690 class GetCurrentConnectionTypeRunner 690 class GetCurrentConnectionTypeRunner
691 : public base::DelegateSimpleThread::Delegate { 691 : public base::DelegateSimpleThread::Delegate {
692 public: 692 public:
693 explicit GetCurrentConnectionTypeRunner(AddressTrackerLinux* tracker, 693 explicit GetCurrentConnectionTypeRunner(AddressTrackerLinux* tracker,
694 const std::string& thread_name) 694 const std::string& thread_name)
695 : tracker_(tracker), done_(true, false), thread_(this, thread_name) { 695 : tracker_(tracker),
696 } 696 done_(base::WaitableEvent::ResetPolicy::MANUAL,
697 base::WaitableEvent::InitialState::NOT_SIGNALED),
698 thread_(this, thread_name) {}
697 ~GetCurrentConnectionTypeRunner() override {} 699 ~GetCurrentConnectionTypeRunner() override {}
698 700
699 void Run() override { 701 void Run() override {
700 tracker_->GetCurrentConnectionType(); 702 tracker_->GetCurrentConnectionType();
701 done_.Signal(); 703 done_.Signal();
702 } 704 }
703 705
704 void Start() { 706 void Start() {
705 thread_.Start(); 707 thread_.Start();
706 } 708 }
(...skipping 24 matching lines...) Expand all
731 tracker_->Init(); 733 tracker_->Init();
732 734
733 runner1.VerifyCompletes(); 735 runner1.VerifyCompletes();
734 runner2.VerifyCompletes(); 736 runner2.VerifyCompletes();
735 } 737 }
736 738
737 } // namespace 739 } // namespace
738 740
739 } // namespace internal 741 } // namespace internal
740 } // namespace net 742 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698