OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_BLOB_BLOB_DATA_H_ | 5 #ifndef WEBKIT_BLOB_BLOB_DATA_H_ |
6 #define WEBKIT_BLOB_BLOB_DATA_H_ | 6 #define WEBKIT_BLOB_BLOB_DATA_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 AppendData(data.c_str(), data.size()); | 28 AppendData(data.c_str(), data.size()); |
29 } | 29 } |
30 | 30 |
31 void AppendData(const char* data, size_t length); | 31 void AppendData(const char* data, size_t length); |
32 | 32 |
33 void AppendFile(const FilePath& file_path, uint64 offset, uint64 length, | 33 void AppendFile(const FilePath& file_path, uint64 offset, uint64 length, |
34 const base::Time& expected_modification_time); | 34 const base::Time& expected_modification_time); |
35 | 35 |
36 void AppendBlob(const GURL& blob_url, uint64 offset, uint64 length); | 36 void AppendBlob(const GURL& blob_url, uint64 offset, uint64 length); |
37 | 37 |
| 38 void AppendFileSystemFile(const GURL& url, uint64 offset, uint64 length, |
| 39 const base::Time& expected_modification_time); |
| 40 |
38 void AttachShareableFileReference(ShareableFileReference* reference) { | 41 void AttachShareableFileReference(ShareableFileReference* reference) { |
39 shareable_files_.push_back(reference); | 42 shareable_files_.push_back(reference); |
40 } | 43 } |
41 | 44 |
42 const std::vector<Item>& items() const { return items_; } | 45 const std::vector<Item>& items() const { return items_; } |
43 | 46 |
44 const std::string& content_type() const { return content_type_; } | 47 const std::string& content_type() const { return content_type_; } |
45 void set_content_type(const std::string& content_type) { | 48 void set_content_type(const std::string& content_type) { |
46 content_type_ = content_type; | 49 content_type_ = content_type; |
47 } | 50 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 86 } |
84 | 87 |
85 inline bool operator!=(const BlobData& a, const BlobData& b) { | 88 inline bool operator!=(const BlobData& a, const BlobData& b) { |
86 return !(a == b); | 89 return !(a == b); |
87 } | 90 } |
88 #endif // defined(UNIT_TEST) | 91 #endif // defined(UNIT_TEST) |
89 | 92 |
90 } // namespace webkit_blob | 93 } // namespace webkit_blob |
91 | 94 |
92 #endif // WEBKIT_BLOB_BLOB_DATA_H_ | 95 #endif // WEBKIT_BLOB_BLOB_DATA_H_ |
OLD | NEW |