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

Unified Diff: mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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: mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java
deleted file mode 100644
index 96acec943809b20a6ec30fc02dbea572a8ad7538..0000000000000000000000000000000000000000
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 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.
-
-package org.chromium.mojo.bindings;
-
-/**
- * The header for a mojo complex element.
- */
-public final class DataHeader {
- /**
- * The size of a serialized header, in bytes.
- */
- public static final int HEADER_SIZE = 8;
-
- /**
- * The offset of the size field.
- */
- public static final int SIZE_OFFSET = 0;
-
- /**
- * The offset of the number of fields field.
- */
- public static final int ELEMENTS_OR_VERSION_OFFSET = 4;
-
- /**
- * The size of the object owning this header.
- */
- public final int size;
-
- /**
- * Number of element (for an array) or version (for a struct) of the object owning this
- * header.
- */
- public final int elementsOrVersion;
-
- /**
- * Constructor.
- */
- public DataHeader(int size, int elementsOrVersion) {
- super();
- this.size = size;
- this.elementsOrVersion = elementsOrVersion;
- }
-
- /**
- * @see Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + elementsOrVersion;
- result = prime * result + size;
- return result;
- }
-
- /**
- * @see Object#equals(Object)
- */
- @Override
- public boolean equals(Object object) {
- if (object == this) return true;
- if (object == null) return false;
- if (getClass() != object.getClass()) return false;
-
- DataHeader other = (DataHeader) object;
- return (elementsOrVersion == other.elementsOrVersion && size == other.size);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698