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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/exported/WebBlobInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BlobInfo_h
6 #define BlobInfo_h
7
8 #include "wtf/text/WTFString.h"
9
10 namespace WebCore {
11
12 class BlobInfo {
abarth-chromium 2014/04/01 21:48:04 You might not need this class. Code that would us
13 public:
14 BlobInfo()
15 : m_isFile(false)
16 , m_size(-1)
17 , m_lastModified(0)
18 {
19 }
20 BlobInfo(const String& uuid, const String& type, long long size)
21 : m_isFile(false)
22 , m_uuid(uuid)
23 , m_type(type)
24 , m_size(size)
25 , m_lastModified(0)
26 {
27 ASSERT(size >= 0);
28 }
29 BlobInfo(const String& uuid, const String& filePath, const String& fileName, const String& type, double lastModified, long long size)
30 : m_isFile(true)
31 , m_uuid(uuid)
32 , m_type(type)
33 , m_size(size)
34 , m_filePath(filePath)
35 , m_fileName(fileName)
36 , m_lastModified(lastModified)
37 {
38 }
39 BlobInfo(const String& uuid, const String& filePath, const String& fileName, const String& type)
40 : m_isFile(true)
41 , m_uuid(uuid)
42 , m_type(type)
43 , m_size(-1)
44 , m_filePath(filePath)
45 , m_fileName(fileName)
46 , m_lastModified(0)
47 {
48 }
49
50 bool isFile() const { return m_isFile; }
51 const String& uuid() const { return m_uuid; }
52 const String& type() const { return m_type; }
53 long long size() const { return m_size; }
54 const String& filePath() const { return m_filePath; }
55 const String& fileName() const { return m_fileName; }
56 double lastModified() const { return m_lastModified; }
57
58 private:
59 bool m_isFile;
60 String m_uuid;
61 String m_type; // mime type
62 long long m_size;
63 String m_filePath; // Only for File
64 String m_fileName; // Only for File
65 double m_lastModified; // only for File
66 };
67
68 } // namespace WebCore
69
70 #endif // BlobInfo_h
OLDNEW
« 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