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 #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ | 5 #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ |
6 #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ | 6 #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <ostream> | 9 #include <ostream> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "storage/common/blob_storage/blob_storage_constants.h" | 12 #include "storage/common/blob_storage/blob_storage_constants.h" |
13 #include "storage/common/storage_common_export.h" | 13 #include "storage/common/storage_common_export.h" |
14 | 14 |
15 namespace storage { | 15 namespace storage { |
16 | 16 |
17 // This class is serialized over IPC to request bytes from a blob item. | 17 // This class is serialized over IPC to request bytes from a blob item. |
18 struct STORAGE_COMMON_EXPORT BlobItemBytesRequest { | 18 struct STORAGE_COMMON_EXPORT BlobItemBytesRequest { |
19 // Not using std::numeric_limits<T>::max() because of non-C++11 builds. | 19 // Not using std::numeric_limits<T>::max() because of non-C++11 builds. |
20 static const size_t kInvalidIndex = SIZE_MAX; | 20 static const size_t kInvalidIndex = SIZE_MAX; |
21 static const uint64_t kInvalidSize = kuint64max; | 21 static const uint64_t kInvalidSize = UINT64_MAX; |
22 | 22 |
23 static BlobItemBytesRequest CreateIPCRequest(size_t request_number, | 23 static BlobItemBytesRequest CreateIPCRequest(size_t request_number, |
24 size_t renderer_item_index, | 24 size_t renderer_item_index, |
25 size_t renderer_item_offset, | 25 size_t renderer_item_offset, |
26 size_t size); | 26 size_t size); |
27 | 27 |
28 static BlobItemBytesRequest CreateSharedMemoryRequest( | 28 static BlobItemBytesRequest CreateSharedMemoryRequest( |
29 size_t request_number, | 29 size_t request_number, |
30 size_t renderer_item_index, | 30 size_t renderer_item_index, |
31 size_t renderer_item_offset, | 31 size_t renderer_item_offset, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 STORAGE_COMMON_EXPORT bool operator==(const BlobItemBytesRequest& a, | 68 STORAGE_COMMON_EXPORT bool operator==(const BlobItemBytesRequest& a, |
69 const BlobItemBytesRequest& b); | 69 const BlobItemBytesRequest& b); |
70 | 70 |
71 STORAGE_COMMON_EXPORT bool operator!=(const BlobItemBytesRequest& a, | 71 STORAGE_COMMON_EXPORT bool operator!=(const BlobItemBytesRequest& a, |
72 const BlobItemBytesRequest& b); | 72 const BlobItemBytesRequest& b); |
73 | 73 |
74 } // namespace storage | 74 } // namespace storage |
75 | 75 |
76 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ | 76 #endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ |
OLD | NEW |