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

Side by Side Diff: storage/browser/blob/blob_data_builder.h

Issue 1234813004: [BlobAsync] Asynchronous Blob Construction Final Patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blob-protocol-change
Patch Set: comments Created 4 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698