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

Side by Side Diff: storage/browser/blob/blob_data_builder.h

Issue 913303002: Fixed IndexedDB blob retention (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | storage/browser/blob/blob_data_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 26
27 const std::string& uuid() const { return uuid_; } 27 const std::string& uuid() const { return uuid_; }
28 28
29 void AppendData(const std::string& data) { 29 void AppendData(const std::string& data) {
30 AppendData(data.c_str(), data.size()); 30 AppendData(data.c_str(), data.size());
31 } 31 }
32 32
33 void AppendData(const char* data, size_t length); 33 void AppendData(const char* data, size_t length);
34 34
35 // You must know the length of the file, you cannot use kuint64max to specify 35 // You must know the length of the file, you cannot use kuint64max to specify
36 // the whole file. 36 // the whole file. This method creates a ShareableFileReference to the given
37 // file, which is stored in this builder.
37 void AppendFile(const base::FilePath& file_path, 38 void AppendFile(const base::FilePath& file_path,
38 uint64_t offset, 39 uint64_t offset,
39 uint64_t length, 40 uint64_t length,
40 const base::Time& expected_modification_time); 41 const base::Time& expected_modification_time);
41 42
42 // You must know the length of the file, you cannot use kuint64max to specify
43 // the whole file.
44 void AppendFile(const base::FilePath& file_path,
45 uint64_t offset,
46 uint64_t length,
47 const base::Time& expected_modification_time,
48 scoped_refptr<ShareableFileReference> shareable_file);
49
50 void AppendBlob(const std::string& uuid, uint64_t offset, uint64_t length); 43 void AppendBlob(const std::string& uuid, uint64_t offset, uint64_t length);
51 44
52 void AppendBlob(const std::string& uuid); 45 void AppendBlob(const std::string& uuid);
53 46
54 void AppendFileSystemFile(const GURL& url, 47 void AppendFileSystemFile(const GURL& url,
55 uint64_t offset, 48 uint64_t offset,
56 uint64_t length, 49 uint64_t length,
57 const base::Time& expected_modification_time); 50 const base::Time& expected_modification_time);
58 51
59 void set_content_type(const std::string& content_type) { 52 void set_content_type(const std::string& content_type) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return !(a == b); 106 return !(a == b);
114 } 107 }
115 108
116 inline bool operator!=(const BlobDataBuilder& a, const BlobDataBuilder& b) { 109 inline bool operator!=(const BlobDataBuilder& a, const BlobDataBuilder& b) {
117 return !(a == b); 110 return !(a == b);
118 } 111 }
119 #endif // defined(UNIT_TEST) 112 #endif // defined(UNIT_TEST)
120 113
121 } // namespace storage 114 } // namespace storage
122 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_ 115 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | storage/browser/blob/blob_data_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698