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

Side by Side Diff: content/common/one_writer_seqlock_unittest.cc

Issue 630853003: Replace OVERRIDE and FINAL with override and final in content/common/[a-s]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/one_writer_seqlock.h" 5 #include "content/common/one_writer_seqlock.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/atomic_ref_count.h" 9 #include "base/atomic_ref_count.h"
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
(...skipping 13 matching lines...) Expand all
24 BasicSeqLockTestThread() {} 24 BasicSeqLockTestThread() {}
25 25
26 void Init( 26 void Init(
27 content::OneWriterSeqLock* seqlock, 27 content::OneWriterSeqLock* seqlock,
28 TestData* data, 28 TestData* data,
29 base::subtle::Atomic32* ready) { 29 base::subtle::Atomic32* ready) {
30 seqlock_ = seqlock; 30 seqlock_ = seqlock;
31 data_ = data; 31 data_ = data;
32 ready_ = ready; 32 ready_ = ready;
33 } 33 }
34 virtual void ThreadMain() OVERRIDE { 34 virtual void ThreadMain() override {
35 while (AtomicRefCountIsZero(ready_)) { 35 while (AtomicRefCountIsZero(ready_)) {
36 PlatformThread::YieldCurrentThread(); 36 PlatformThread::YieldCurrentThread();
37 } 37 }
38 38
39 for (unsigned i = 0; i < 1000; ++i) { 39 for (unsigned i = 0; i < 1000; ++i) {
40 TestData copy; 40 TestData copy;
41 base::subtle::Atomic32 version; 41 base::subtle::Atomic32 version;
42 do { 42 do {
43 version = seqlock_->ReadBegin(); 43 version = seqlock_->ReadBegin();
44 copy = *data_; 44 copy = *data_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 if (AtomicRefCountIsZero(&ready)) 90 if (AtomicRefCountIsZero(&ready))
91 break; 91 break;
92 } 92 }
93 93
94 for (unsigned i = 0; i < kNumReaderThreads; ++i) 94 for (unsigned i = 0; i < kNumReaderThreads; ++i)
95 PlatformThread::Join(handles[i]); 95 PlatformThread::Join(handles[i]);
96 } 96 }
97 97
98 } // namespace base 98 } // namespace base
OLDNEW
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698