Index: storage/common/data_element.h |
diff --git a/storage/common/data_element.h b/storage/common/data_element.h |
index 4cd686307d4ee92005eac21b1ec4fc4935cc0c7e..01453088312e88386d4587a5324ad5cb209fed1d 100644 |
--- a/storage/common/data_element.h |
+++ b/storage/common/data_element.h |
@@ -144,39 +144,10 @@ class STORAGE_COMMON_EXPORT DataElement { |
base::Time expected_modification_time_; |
}; |
-#if defined(UNIT_TEST) |
-inline bool operator==(const DataElement& a, const DataElement& b) { |
- if (a.type() != b.type() || |
- a.offset() != b.offset() || |
- a.length() != b.length()) |
- return false; |
- switch (a.type()) { |
- case DataElement::TYPE_BYTES: |
- return memcmp(a.bytes(), b.bytes(), b.length()) == 0; |
- case DataElement::TYPE_FILE: |
- return a.path() == b.path() && |
- a.expected_modification_time() == b.expected_modification_time(); |
- case DataElement::TYPE_BLOB: |
- return a.blob_uuid() == b.blob_uuid(); |
- case DataElement::TYPE_FILE_FILESYSTEM: |
- return a.filesystem_url() == b.filesystem_url(); |
- case DataElement::TYPE_DISK_CACHE_ENTRY: |
- // We compare only length and offset; we trust the entry itself was |
- // compared at some higher level such as in BlobDataItem. |
- return true; |
- case DataElement::TYPE_BYTES_DESCRIPTION: |
- return true; |
- case DataElement::TYPE_UNKNOWN: |
- NOTREACHED(); |
- return false; |
- } |
- return false; |
-} |
- |
-inline bool operator!=(const DataElement& a, const DataElement& b) { |
- return !(a == b); |
-} |
-#endif // defined(UNIT_TEST) |
+STORAGE_COMMON_EXPORT bool operator==(const DataElement& a, |
+ const DataElement& b); |
+STORAGE_COMMON_EXPORT bool operator!=(const DataElement& a, |
+ const DataElement& b); |
} // namespace storage |