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

Unified Diff: public/platform/WebBlobInfo.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: Fixed the branch 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebBlobInfo.h
diff --git a/public/platform/WebBlobInfo.h b/public/platform/WebBlobInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3a66ecef7b2fe7ad23ff64c41c4d00203c5a1c5
--- /dev/null
+++ b/public/platform/WebBlobInfo.h
@@ -0,0 +1,90 @@
+// 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 WebBlobInfo_h
+#define WebBlobInfo_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace blink {
+
+class WebBlobInfo {
+public:
+ WebBlobInfo()
+ : m_isFile(false)
+ , m_size(-1)
+ , m_lastModified(0)
+ {
+ }
+ WebBlobInfo(const WebString& uuid, const WebString& type, long long size)
+ : m_isFile(false)
+ , m_uuid(uuid)
+ , m_type(type)
+ , m_size(size)
+ , m_lastModified(0)
+ {
+ }
+ WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& type)
+ : m_isFile(true)
+ , m_uuid(uuid)
+ , m_type(type)
+ , m_size(-1)
+ , m_filePath(filePath)
+ , m_fileName(fileName)
+ , m_lastModified(0)
+ {
+ }
+ WebBlobInfo(const WebString& uuid, const WebString& filePath, const WebString& fileName, const WebString& 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)
+ {
+ }
+ bool isFile() const
+ {
+ return m_isFile;
+ }
+ const WebString& uuid() const
+ {
+ return m_uuid;
+ }
+ const WebString& type() const
+ {
+ return m_type;
+ }
+ long long size() const
+ {
+ return m_size;
+ }
+ const WebString& filePath() const
+ {
+ return m_filePath;
+ }
+ const WebString& fileName() const
+ {
+ return m_fileName;
+ }
+ double lastModified() const
+ {
+ return m_lastModified;
+ }
+
+private:
+ bool m_isFile;
+ WebString m_uuid;
+ WebString m_type; // MIME type
+ long long m_size;
+ WebString m_filePath; // Only for File
+ WebString m_fileName; // Only for File
+ double m_lastModified; // Only for File
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698