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

Side by Side Diff: storage/browser/blob/blob_data_builder.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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_DATA_BUILDER_H_ 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_
6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ 6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <ostream> 10 #include <ostream>
(...skipping 26 matching lines...) Expand all
37 using DataHandle = BlobDataItem::DataHandle; 37 using DataHandle = BlobDataItem::DataHandle;
38 // Visible for testing. 38 // Visible for testing.
39 static base::FilePath GetFutureFileItemPath(uint64_t file_id); 39 static base::FilePath GetFutureFileItemPath(uint64_t file_id);
40 40
41 // Returns if the given item was created by AppendFutureFile. 41 // Returns if the given item was created by AppendFutureFile.
42 static bool IsFutureFileItem(const DataElement& element); 42 static bool IsFutureFileItem(const DataElement& element);
43 // Returns |file_id| given to AppendFutureFile. 43 // Returns |file_id| given to AppendFutureFile.
44 static uint64_t GetFutureFileID(const DataElement& element); 44 static uint64_t GetFutureFileID(const DataElement& element);
45 45
46 explicit BlobDataBuilder(const std::string& uuid); 46 explicit BlobDataBuilder(const std::string& uuid);
47 BlobDataBuilder(BlobDataBuilder&&);
48 BlobDataBuilder& operator=(BlobDataBuilder&&);
47 ~BlobDataBuilder(); 49 ~BlobDataBuilder();
48 50
49 const std::string& uuid() const { return uuid_; } 51 const std::string& uuid() const { return uuid_; }
50 52
51 // Validates the data element that was sent over IPC, and copies the data if 53 // Validates the data element that was sent over IPC, and copies the data if
52 // it's a 'bytes' element. Data elements of BYTES_DESCRIPTION or 54 // it's a 'bytes' element. Data elements of BYTES_DESCRIPTION or
53 // DISK_CACHE_ENTRY types are not valid IPC data element types, and cannot be 55 // DISK_CACHE_ENTRY types are not valid IPC data element types, and cannot be
54 // given to this method. 56 // given to this method.
55 void AppendIPCDataElement(const DataElement& ipc_data); 57 void AppendIPCDataElement(const DataElement& ipc_data);
56 58
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 201 }
200 202
201 inline bool operator!=(const BlobDataBuilder& a, const BlobDataSnapshot& b) { 203 inline bool operator!=(const BlobDataBuilder& a, const BlobDataSnapshot& b) {
202 return b != a; 204 return b != a;
203 } 205 }
204 206
205 #endif // defined(UNIT_TEST) 207 #endif // defined(UNIT_TEST)
206 208
207 } // namespace storage 209 } // namespace storage
208 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ 210 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_
OLDNEW
« no previous file with comments | « storage/browser/blob/blob_async_transport_request_builder.cc ('k') | storage/browser/blob/blob_data_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698