| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "storage/common/blob_storage/blob_item_bytes_response.h" | 5 #include "storage/common/blob_storage/blob_item_bytes_response.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 *os << "<empty>"; | 29 *os << "<empty>"; |
| 30 } else { | 30 } else { |
| 31 *os << base::HexEncode(&response.inline_data[0], length); | 31 *os << base::HexEncode(&response.inline_data[0], length); |
| 32 if (length < response.inline_data.size()) { | 32 if (length < response.inline_data.size()) { |
| 33 *os << "<...truncated due to length...>"; | 33 *os << "<...truncated due to length...>"; |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 *os << "]}"; | 36 *os << "]}"; |
| 37 } | 37 } |
| 38 | 38 |
| 39 bool operator==(const BlobItemBytesResponse& a, |
| 40 const BlobItemBytesResponse& b) { |
| 41 return a.request_number == b.request_number && |
| 42 a.inline_data.size() == b.inline_data.size() && |
| 43 std::equal(a.inline_data.begin(), |
| 44 a.inline_data.begin() + a.inline_data.size(), |
| 45 b.inline_data.begin()); |
| 46 } |
| 47 |
| 48 bool operator!=(const BlobItemBytesResponse& a, |
| 49 const BlobItemBytesResponse& b) { |
| 50 return !(a == b); |
| 51 } |
| 52 |
| 39 } // namespace storage | 53 } // namespace storage |
| OLD | NEW |