| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 std::string data; // For Data type. | 72 std::string data; // For Data type. |
| 73 const char* data_external; // For DataExternal type. | 73 const char* data_external; // For DataExternal type. |
| 74 GURL blob_url; // For Blob type. | 74 GURL blob_url; // For Blob type. |
| 75 FilePath file_path; // For File type. | 75 FilePath file_path; // For File type. |
| 76 base::Time expected_modification_time; // Also for File type. | 76 base::Time expected_modification_time; // Also for File type. |
| 77 uint64 offset; | 77 uint64 offset; |
| 78 uint64 length; | 78 uint64 length; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 BlobData(); | 81 BlobData(); |
| 82 explicit BlobData(const WebKit::WebBlobData& data); | |
| 83 | 82 |
| 84 void AppendData(const std::string& data) { | 83 void AppendData(const std::string& data) { |
| 85 AppendData(data.c_str(), data.size()); | 84 AppendData(data.c_str(), data.size()); |
| 86 } | 85 } |
| 87 | 86 |
| 88 void AppendData(const char* data, size_t length); | 87 void AppendData(const char* data, size_t length); |
| 89 | 88 |
| 90 void AppendFile(const FilePath& file_path, uint64 offset, uint64 length, | 89 void AppendFile(const FilePath& file_path, uint64 offset, uint64 length, |
| 91 const base::Time& expected_modification_time); | 90 const base::Time& expected_modification_time); |
| 92 | 91 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 166 } |
| 168 | 167 |
| 169 inline bool operator!=(const BlobData& a, const BlobData& b) { | 168 inline bool operator!=(const BlobData& a, const BlobData& b) { |
| 170 return !(a == b); | 169 return !(a == b); |
| 171 } | 170 } |
| 172 #endif // defined(UNIT_TEST) | 171 #endif // defined(UNIT_TEST) |
| 173 | 172 |
| 174 } // namespace webkit_blob | 173 } // namespace webkit_blob |
| 175 | 174 |
| 176 #endif // WEBKIT_BLOB_BLOB_DATA_H_ | 175 #endif // WEBKIT_BLOB_BLOB_DATA_H_ |
| OLD | NEW |