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

Side by Side Diff: storage/common/data_element.h

Issue 2448353002: [BlobAsync] Moving async handling into BlobStorageContext & quota out. (Closed)
Patch Set: comments Created 4 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_storage_constants.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DATA_ELEMENT_H_ 5 #ifndef STORAGE_COMMON_DATA_ELEMENT_H_
6 #define STORAGE_COMMON_DATA_ELEMENT_H_ 6 #define STORAGE_COMMON_DATA_ELEMENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <limits> 11 #include <limits>
12 #include <ostream> 12 #include <ostream>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "storage/common/storage_common_export.h" 20 #include "storage/common/storage_common_export.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace storage { 23 namespace storage {
24 24
25 // Represents a base Web data element. This could be either one of 25 // Represents a base Web data element. This could be either one of
26 // bytes, file or blob data. 26 // bytes, file or blob data.
27 class STORAGE_COMMON_EXPORT DataElement { 27 class STORAGE_COMMON_EXPORT DataElement {
28 public: 28 public:
29 static const uint64_t kUnknownSize = std::numeric_limits<uint64_t>::max();
30
29 enum Type { 31 enum Type {
30 TYPE_UNKNOWN = -1, 32 TYPE_UNKNOWN = -1,
31 TYPE_BYTES, 33 TYPE_BYTES,
32 // Only used with BlobStorageMsg_StartBuildingBlob 34 // Only used with BlobStorageMsg_StartBuildingBlob
33 TYPE_BYTES_DESCRIPTION, 35 TYPE_BYTES_DESCRIPTION,
34 TYPE_FILE, 36 TYPE_FILE,
35 TYPE_BLOB, 37 TYPE_BLOB,
36 TYPE_FILE_FILESYSTEM, 38 TYPE_FILE_FILESYSTEM,
37 TYPE_DISK_CACHE_ENTRY, 39 TYPE_DISK_CACHE_ENTRY,
38 }; 40 };
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 }; 157 };
156 158
157 STORAGE_COMMON_EXPORT bool operator==(const DataElement& a, 159 STORAGE_COMMON_EXPORT bool operator==(const DataElement& a,
158 const DataElement& b); 160 const DataElement& b);
159 STORAGE_COMMON_EXPORT bool operator!=(const DataElement& a, 161 STORAGE_COMMON_EXPORT bool operator!=(const DataElement& a,
160 const DataElement& b); 162 const DataElement& b);
161 163
162 } // namespace storage 164 } // namespace storage
163 165
164 #endif // STORAGE_COMMON_DATA_ELEMENT_H_ 166 #endif // STORAGE_COMMON_DATA_ELEMENT_H_
OLDNEW
« no previous file with comments | « storage/common/blob_storage/blob_storage_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698