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

Unified Diff: device/generic_sensor/one_writer_seqlock_unittest.cc

Issue 2332903002: [sensors] [mac] Implement ambient light sensor for macOS (Closed)
Patch Set: Fix comments from Mikhail Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/one_writer_seqlock_unittest.cc
diff --git a/content/common/one_writer_seqlock_unittest.cc b/device/generic_sensor/one_writer_seqlock_unittest.cc
similarity index 89%
rename from content/common/one_writer_seqlock_unittest.cc
rename to device/generic_sensor/one_writer_seqlock_unittest.cc
index 84d5156a7bd6fad617e015519637858593740067..6e460e07f0f6c66ec1ff5c673f16a61b253a55cd 100644
--- a/content/common/one_writer_seqlock_unittest.cc
+++ b/device/generic_sensor/one_writer_seqlock_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/one_writer_seqlock.h"
+#include "device/generic_sensor/one_writer_seqlock.h"
#include <stdlib.h>
@@ -25,10 +25,9 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
public:
BasicSeqLockTestThread() {}
- void Init(
- content::OneWriterSeqLock* seqlock,
- TestData* data,
- base::subtle::Atomic32* ready) {
+ void Init(device::OneWriterSeqLock* seqlock,
+ TestData* data,
+ base::subtle::Atomic32* ready) {
seqlock_ = seqlock;
data_ = data;
ready_ = ready;
@@ -54,7 +53,7 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
}
private:
- content::OneWriterSeqLock* seqlock_;
+ device::OneWriterSeqLock* seqlock_;
TestData* data_;
base::AtomicRefCount* ready_;
@@ -67,8 +66,8 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
#define MAYBE_ManyThreads ManyThreads
#endif
TEST(OneWriterSeqLockTest, MAYBE_ManyThreads) {
- content::OneWriterSeqLock seqlock;
- TestData data = { 0, 0, 0 };
+ device::OneWriterSeqLock seqlock;
+ TestData data = {0, 0, 0};
base::AtomicRefCount ready = 0;
ANNOTATE_BENIGN_RACE_SIZED(&data, sizeof(data), "Racey reads are discarded");

Powered by Google App Engine
This is Rietveld 408576698