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/browser/blob/blob_async_transport_request_builder.h

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes, working w/ Layout tests Created 4 years, 5 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 #ifndef STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_ 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_
6 #define STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_ 6 #define STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const std::vector<RendererMemoryItemRequest>& requests() const { 110 const std::vector<RendererMemoryItemRequest>& requests() const {
111 return requests_; 111 return requests_;
112 } 112 }
113 113
114 // The total bytes size of memory items in the blob. 114 // The total bytes size of memory items in the blob.
115 uint64_t total_bytes_size() const { return total_bytes_size_; } 115 uint64_t total_bytes_size() const { return total_bytes_size_; }
116 116
117 static bool ShouldBeShortcut(const std::vector<DataElement>& items, 117 static bool ShouldBeShortcut(const std::vector<DataElement>& items,
118 size_t memory_available); 118 size_t memory_available);
119 119
120 protected:
121 std::vector<RendererMemoryItemRequest>* mutable_requests() {
122 return &requests_;
123 }
124
120 private: 125 private:
121 static void ComputeHandleSizes(uint64_t total_memory_size, 126 static void ComputeHandleSizes(uint64_t total_memory_size,
122 size_t max_segment_size, 127 size_t max_segment_size,
123 std::vector<size_t>* segment_sizes); 128 std::vector<size_t>* segment_sizes);
124 129
125 std::vector<size_t> shared_memory_sizes_; 130 std::vector<size_t> shared_memory_sizes_;
126 // The size of the files is capped by the |max_file_size| argument in 131 // The size of the files is capped by the |max_file_size| argument in
127 // InitializeForFileRequests, so we can just use size_t. 132 // InitializeForFileRequests, so we can just use size_t.
128 std::vector<size_t> file_sizes_; 133 std::vector<size_t> file_sizes_;
129 134
130 uint64_t total_bytes_size_; 135 uint64_t total_bytes_size_;
131 std::vector<RendererMemoryItemRequest> requests_; 136 std::vector<RendererMemoryItemRequest> requests_;
132 137
133 DISALLOW_COPY_AND_ASSIGN(BlobAsyncTransportRequestBuilder); 138 DISALLOW_COPY_AND_ASSIGN(BlobAsyncTransportRequestBuilder);
134 }; 139 };
135 140
136 } // namespace storage 141 } // namespace storage
137 142
138 #endif // STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_ 143 #endif // STORAGE_BROWSER_BLOB_BLOB_ASYNC_TRANSPORT_REQUEST_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698