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

Unified Diff: device/sensors/public/cpp/orientation_data.cc

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Rebase Created 3 years, 9 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/sensors/public/cpp/orientation_data.cc
diff --git a/device/sensors/public/cpp/orientation_data.cc b/device/sensors/public/cpp/orientation_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7e0239be2d1822d7c28476f45fb6ce6c5a6ca674
--- /dev/null
+++ b/device/sensors/public/cpp/orientation_data.cc
@@ -0,0 +1,19 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "device/sensors/public/cpp/orientation_data.h"
+
+#include <string.h>
+
+namespace device {
+
+OrientationData::OrientationData() {
+ // Make sure to zero out the memory so that there are no uninitialized bits.
+ // This object is used in the shared memory buffer and is memory copied by
+ // two processes. Valgrind will complain if we copy around memory that is
+ // only partially initialized.
+ memset(this, 0, sizeof(*this));
+}
+
+} // namespace device
« no previous file with comments | « device/sensors/public/cpp/orientation_data.h ('k') | third_party/WebKit/Source/modules/device_orientation/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698