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

Unified Diff: storage/common/data_element.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/common/blob/shareable_file_reference.cc ('k') | storage/common/data_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/common/data_element.h
diff --git a/webkit/common/data_element.h b/storage/common/data_element.h
similarity index 86%
rename from webkit/common/data_element.h
rename to storage/common/data_element.h
index 4ec09cec4e1ae6a1b61c97b657b2dd1949be07c6..61d1ecd89c30ed8166fc73ae65948482f5eaf508 100644
--- a/webkit/common/data_element.h
+++ b/storage/common/data_element.h
@@ -13,13 +13,13 @@
#include "base/logging.h"
#include "base/time/time.h"
#include "url/gurl.h"
-#include "webkit/common/webkit_common_export.h"
+#include "storage/common/storage_export.h"
namespace webkit_common {
// Represents a base Web data element. This could be either one of
// bytes, file or blob data.
-class WEBKIT_COMMON_EXPORT DataElement {
+class STORAGE_EXPORT DataElement {
public:
enum Type {
TYPE_UNKNOWN = -1,
@@ -70,24 +70,27 @@ class WEBKIT_COMMON_EXPORT DataElement {
// Sets TYPE_FILE data with range.
void SetToFilePathRange(const base::FilePath& path,
- uint64 offset, uint64 length,
+ uint64 offset,
+ uint64 length,
const base::Time& expected_modification_time);
// Sets TYPE_BLOB data with range.
void SetToBlobRange(const std::string& blob_uuid,
- uint64 offset, uint64 length);
+ uint64 offset,
+ uint64 length);
// Sets TYPE_FILE_FILESYSTEM with range.
void SetToFileSystemUrlRange(const GURL& filesystem_url,
- uint64 offset, uint64 length,
+ uint64 offset,
+ uint64 length,
const base::Time& expected_modification_time);
private:
Type type_;
std::vector<char> buf_; // For TYPE_BYTES.
- const char* bytes_; // For TYPE_BYTES.
- base::FilePath path_; // For TYPE_FILE.
- GURL filesystem_url_; // For TYPE_FILE_FILESYSTEM.
+ const char* bytes_; // For TYPE_BYTES.
+ base::FilePath path_; // For TYPE_FILE.
+ GURL filesystem_url_; // For TYPE_FILE_FILESYSTEM.
std::string blob_uuid_;
uint64 offset_;
uint64 length_;
@@ -96,8 +99,7 @@ class WEBKIT_COMMON_EXPORT DataElement {
#if defined(UNIT_TEST)
inline bool operator==(const DataElement& a, const DataElement& b) {
- if (a.type() != b.type() ||
- a.offset() != b.offset() ||
+ if (a.type() != b.type() || a.offset() != b.offset() ||
a.length() != b.length())
return false;
switch (a.type()) {
« no previous file with comments | « storage/common/blob/shareable_file_reference.cc ('k') | storage/common/data_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698