OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "webkit/common/blob/shareable_file_reference.h" | 12 #include "webkit/common/blob/shareable_file_reference.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 class CONTENT_EXPORT IndexedDBBlobInfo { | 16 class CONTENT_EXPORT IndexedDBBlobInfo { |
17 public: | 17 public: |
18 typedef webkit_blob::ShareableFileReference::FinalReleaseCallback | 18 typedef webkit_blob::ShareableFileReference::FinalReleaseCallback |
19 ReleaseCallback; | 19 ReleaseCallback; |
20 IndexedDBBlobInfo(); | 20 IndexedDBBlobInfo(); |
21 ~IndexedDBBlobInfo(); | 21 ~IndexedDBBlobInfo(); |
22 // These two are used for Blobs. | 22 // These two are used for Blobs. |
23 IndexedDBBlobInfo(const std::string& uuid, | 23 IndexedDBBlobInfo(const std::string& uuid, |
24 const base::string16& type, | 24 const base::string16& type, |
25 int64 size); | 25 int64 size); |
26 IndexedDBBlobInfo(const base::string16& type, int64 size, int64 key); | 26 IndexedDBBlobInfo(const base::string16& type, int64 size, int64 key); |
27 // These two are used for Files. | 27 // These two are used for Files. |
28 IndexedDBBlobInfo(const base::FilePath& file_path, | 28 IndexedDBBlobInfo(const std::string& uuid, |
| 29 const base::FilePath& file_path, |
29 const base::string16& file_name, | 30 const base::string16& file_name, |
30 const base::string16& type); | 31 const base::string16& type); |
31 IndexedDBBlobInfo(int64 key, | 32 IndexedDBBlobInfo(int64 key, |
32 const base::string16& type, | 33 const base::string16& type, |
33 const base::string16& file_name); | 34 const base::string16& file_name); |
34 | 35 |
35 bool is_file() const { return is_file_; } | 36 bool is_file() const { return is_file_; } |
36 const std::string& uuid() const { return uuid_; } | 37 const std::string& uuid() const { return uuid_; } |
37 const base::string16& type() const { return type_; } | 38 const base::string16& type() const { return type_; } |
38 int64 size() const { return size_; } | 39 int64 size() const { return size_; } |
(...skipping 25 matching lines...) Expand all Loading... |
64 | 65 |
65 // Valid only when this comes out of the database. | 66 // Valid only when this comes out of the database. |
66 int64 key_; | 67 int64 key_; |
67 base::Closure mark_used_callback_; | 68 base::Closure mark_used_callback_; |
68 ReleaseCallback release_callback_; | 69 ReleaseCallback release_callback_; |
69 }; | 70 }; |
70 | 71 |
71 } // namespace content | 72 } // namespace content |
72 | 73 |
73 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ | 74 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ |
OLD | NEW |