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

Unified Diff: Source/platform/blob/BlobInfo.h

Issue 205413004: Add two classes [as yet unused] needed for upcoming IDB Blob support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rolled in code review feedback. Created 6 years, 9 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 | « Source/platform/blink_platform.gypi ('k') | Source/platform/exported/WebBlobInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/blob/BlobInfo.h
diff --git a/Source/platform/blob/BlobInfo.h b/Source/platform/blob/BlobInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..18c39595d76909bf5a0be9bb85fb0f3dfcf1f3ec
--- /dev/null
+++ b/Source/platform/blob/BlobInfo.h
@@ -0,0 +1,70 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BlobInfo_h
+#define BlobInfo_h
+
+#include "wtf/text/WTFString.h"
+
+namespace WebCore {
+
+class BlobInfo {
abarth-chromium 2014/04/01 21:48:04 You might not need this class. Code that would us
+public:
+ BlobInfo()
+ : m_isFile(false)
+ , m_size(-1)
+ , m_lastModified(0)
+ {
+ }
+ BlobInfo(const String& uuid, const String& type, long long size)
+ : m_isFile(false)
+ , m_uuid(uuid)
+ , m_type(type)
+ , m_size(size)
+ , m_lastModified(0)
+ {
+ ASSERT(size >= 0);
+ }
+ BlobInfo(const String& uuid, const String& filePath, const String& fileName, const String& type, double lastModified, long long size)
+ : m_isFile(true)
+ , m_uuid(uuid)
+ , m_type(type)
+ , m_size(size)
+ , m_filePath(filePath)
+ , m_fileName(fileName)
+ , m_lastModified(lastModified)
+ {
+ }
+ BlobInfo(const String& uuid, const String& filePath, const String& fileName, const String& type)
+ : m_isFile(true)
+ , m_uuid(uuid)
+ , m_type(type)
+ , m_size(-1)
+ , m_filePath(filePath)
+ , m_fileName(fileName)
+ , m_lastModified(0)
+ {
+ }
+
+ bool isFile() const { return m_isFile; }
+ const String& uuid() const { return m_uuid; }
+ const String& type() const { return m_type; }
+ long long size() const { return m_size; }
+ const String& filePath() const { return m_filePath; }
+ const String& fileName() const { return m_fileName; }
+ double lastModified() const { return m_lastModified; }
+
+private:
+ bool m_isFile;
+ String m_uuid;
+ String m_type; // mime type
+ long long m_size;
+ String m_filePath; // Only for File
+ String m_fileName; // Only for File
+ double m_lastModified; // only for File
+};
+
+} // namespace WebCore
+
+#endif // BlobInfo_h
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/exported/WebBlobInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698