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

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

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 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 11
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 13
14 namespace storage { 14 namespace storage {
15 15
16 BlobItemBytesResponse::BlobItemBytesResponse() 16 BlobItemBytesResponse::BlobItemBytesResponse()
17 : request_number(kInvalidIndex) {} 17 : request_number(kInvalidIndex) {}
18 18
19 BlobItemBytesResponse::BlobItemBytesResponse(size_t request_number) 19 BlobItemBytesResponse::BlobItemBytesResponse(uint32_t request_number)
20 : request_number(request_number) {} 20 : request_number(request_number) {}
21 21
22 BlobItemBytesResponse::BlobItemBytesResponse( 22 BlobItemBytesResponse::BlobItemBytesResponse(
23 const BlobItemBytesResponse& other) = default; 23 const BlobItemBytesResponse& other) = default;
24 24
25 BlobItemBytesResponse::~BlobItemBytesResponse() {} 25 BlobItemBytesResponse::~BlobItemBytesResponse() {}
26 26
27 void PrintTo(const BlobItemBytesResponse& response, ::std::ostream* os) { 27 void PrintTo(const BlobItemBytesResponse& response, ::std::ostream* os) {
28 const size_t kMaxDataPrintLength = 40; 28 const size_t kMaxDataPrintLength = 40;
29 size_t length = std::min(response.inline_data.size(), kMaxDataPrintLength); 29 size_t length = std::min(response.inline_data.size(), kMaxDataPrintLength);
(...skipping 19 matching lines...) Expand all
49 a.inline_data.begin() + a.inline_data.size(), 49 a.inline_data.begin() + a.inline_data.size(),
50 b.inline_data.begin()); 50 b.inline_data.begin());
51 } 51 }
52 52
53 bool operator!=(const BlobItemBytesResponse& a, 53 bool operator!=(const BlobItemBytesResponse& a,
54 const BlobItemBytesResponse& b) { 54 const BlobItemBytesResponse& b) {
55 return !(a == b); 55 return !(a == b);
56 } 56 }
57 57
58 } // namespace storage 58 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698