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

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

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
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 #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_ 5 #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_
6 #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_ 6 #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <ostream> 10 #include <ostream>
(...skipping 19 matching lines...) Expand all
30 return &inline_data[0]; 30 return &inline_data[0];
31 } 31 }
32 32
33 size_t request_number; 33 size_t request_number;
34 std::vector<char> inline_data; 34 std::vector<char> inline_data;
35 }; 35 };
36 36
37 STORAGE_COMMON_EXPORT void PrintTo(const BlobItemBytesResponse& response, 37 STORAGE_COMMON_EXPORT void PrintTo(const BlobItemBytesResponse& response,
38 std::ostream* os); 38 std::ostream* os);
39 39
40 #if defined(UNIT_TEST) 40 STORAGE_COMMON_EXPORT bool operator==(const BlobItemBytesResponse& a,
41 STORAGE_COMMON_EXPORT inline bool operator==(const BlobItemBytesResponse& a, 41 const BlobItemBytesResponse& b);
42 const BlobItemBytesResponse& b) {
43 return a.request_number == b.request_number &&
44 a.inline_data.size() == b.inline_data.size() &&
45 std::equal(a.inline_data.begin(),
46 a.inline_data.begin() + a.inline_data.size(),
47 b.inline_data.begin());
48 }
49 42
50 STORAGE_COMMON_EXPORT inline bool operator!=(const BlobItemBytesResponse& a, 43 STORAGE_COMMON_EXPORT bool operator!=(const BlobItemBytesResponse& a,
51 const BlobItemBytesResponse& b) { 44 const BlobItemBytesResponse& b);
52 return !(a == b);
53 }
54 #endif // defined(UNIT_TEST)
55 45
56 } // namespace storage 46 } // namespace storage
57 47
58 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_ 48 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_
OLDNEW
« no previous file with comments | « storage/common/blob_storage/blob_item_bytes_request.cc ('k') | storage/common/blob_storage/blob_item_bytes_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698