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

Side by Side Diff: storage/common/blob_storage/blob_item_bytes_response.cc

Issue 1292523002: [BlobAsync] Patch 3: Renderer Classes & Logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async2
Patch Set: comments and test Created 5 years, 1 month 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
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_response.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698