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

Unified Diff: components/shared_memory_seqlock/one_writer_seqlock.h

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « components/shared_memory_seqlock/DEPS ('k') | components/shared_memory_seqlock/one_writer_seqlock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/shared_memory_seqlock/one_writer_seqlock.h
diff --git a/content/common/one_writer_seqlock.h b/components/shared_memory_seqlock/one_writer_seqlock.h
similarity index 83%
rename from content/common/one_writer_seqlock.h
rename to components/shared_memory_seqlock/one_writer_seqlock.h
index af476efe1aa3399850d08eeaa667499647f5f8a8..dd500a5df9ab1992ec755adb0317569607dfbb08 100644
--- a/content/common/one_writer_seqlock.h
+++ b/components/shared_memory_seqlock/one_writer_seqlock.h
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_COMMON_ONE_WRITER_SEQLOCK_H_
-#define CONTENT_COMMON_ONE_WRITER_SEQLOCK_H_
+#ifndef COMPONENTS_SHARED_MEMORY_SEQLOCK_ONE_WRITER_SEQLOCK_H_
+#define COMPONENTS_SHARED_MEMORY_SEQLOCK_ONE_WRITER_SEQLOCK_H_
#include "base/atomicops.h"
#include "base/threading/platform_thread.h"
-#include "content/common/content_export.h"
-namespace content {
+namespace shared_memory_seqlock {
// This SeqLock handles only *one* writer and multiple readers. It may be
// suitable for low-contention with relatively infrequent writes, and many
@@ -28,7 +27,7 @@ namespace content {
// garbage, or indices could be out of range. Probably the only suitable thing
// to do during the read loop is to make a copy of the data, and operate on it
// only after the read was found to be consistent.
-class CONTENT_EXPORT OneWriterSeqLock {
+class OneWriterSeqLock {
public:
OneWriterSeqLock();
base::subtle::Atomic32 ReadBegin();
@@ -41,6 +40,6 @@ class CONTENT_EXPORT OneWriterSeqLock {
DISALLOW_COPY_AND_ASSIGN(OneWriterSeqLock);
};
-} // namespace content
+} // namespace shared_memory_seqlock
-#endif // CONTENT_COMMON_ONE_WRITER_SEQLOCK_H_
+#endif // COMPONENTS_SHARED_MEMORY_SEQLOCK_ONE_WRITER_SEQLOCK_H_
« no previous file with comments | « components/shared_memory_seqlock/DEPS ('k') | components/shared_memory_seqlock/one_writer_seqlock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698