OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ | 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ |
6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ | 6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if (a.items().size() != b.items_.size()) { | 158 if (a.items().size() != b.items_.size()) { |
159 return false; | 159 return false; |
160 } | 160 } |
161 for (size_t i = 0; i < a.items().size(); ++i) { | 161 for (size_t i = 0; i < a.items().size(); ++i) { |
162 if (*(a.items()[i]) != *(b.items_[i])) | 162 if (*(a.items()[i]) != *(b.items_[i])) |
163 return false; | 163 return false; |
164 } | 164 } |
165 return true; | 165 return true; |
166 } | 166 } |
167 | 167 |
| 168 inline bool operator==(const BlobDataBuilder& a, const BlobDataSnapshot& b) { |
| 169 return b == a; |
| 170 } |
| 171 |
168 inline bool operator!=(const BlobDataSnapshot& a, const BlobDataBuilder& b) { | 172 inline bool operator!=(const BlobDataSnapshot& a, const BlobDataBuilder& b) { |
169 return !(a == b); | 173 return !(a == b); |
170 } | 174 } |
171 | 175 |
172 inline bool operator!=(const BlobDataBuilder& a, const BlobDataBuilder& b) { | 176 inline bool operator!=(const BlobDataBuilder& a, const BlobDataBuilder& b) { |
173 return !(a == b); | 177 return !(a == b); |
174 } | 178 } |
175 | 179 |
| 180 inline bool operator!=(const BlobDataBuilder& a, const BlobDataSnapshot& b) { |
| 181 return b != a; |
| 182 } |
| 183 |
176 #endif // defined(UNIT_TEST) | 184 #endif // defined(UNIT_TEST) |
177 | 185 |
178 } // namespace storage | 186 } // namespace storage |
179 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ | 187 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ |
OLD | NEW |