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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "webkit/common/blob/shareable_file_reference.h" | 14 #include "webkit/common/blob/shareable_file_reference.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class CONTENT_EXPORT IndexedDBBlobInfo { | 18 class CONTENT_EXPORT IndexedDBBlobInfo { |
19 public: | 19 public: |
20 typedef webkit_blob::ShareableFileReference::FinalReleaseCallback | 20 typedef webkit_blob::ShareableFileReference::FinalReleaseCallback |
21 ReleaseCallback; | 21 ReleaseCallback; |
22 IndexedDBBlobInfo(); | 22 IndexedDBBlobInfo(); |
23 ~IndexedDBBlobInfo(); | |
24 // These two are used for Blobs. | 23 // These two are used for Blobs. |
25 IndexedDBBlobInfo(const std::string& uuid, | 24 IndexedDBBlobInfo(const std::string& uuid, |
26 const base::string16& type, | 25 const base::string16& type, |
27 int64 size); | 26 int64 size); |
28 IndexedDBBlobInfo(const base::string16& type, int64 size, int64 key); | 27 IndexedDBBlobInfo(const base::string16& type, int64 size, int64 key); |
29 // These two are used for Files. | 28 // These two are used for Files. |
30 IndexedDBBlobInfo(const std::string& uuid, | 29 IndexedDBBlobInfo(const std::string& uuid, |
31 const base::FilePath& file_path, | 30 const base::FilePath& file_path, |
32 const base::string16& file_name, | 31 const base::string16& file_name, |
33 const base::string16& type); | 32 const base::string16& type); |
34 IndexedDBBlobInfo(int64 key, | 33 IndexedDBBlobInfo(int64 key, |
35 const base::string16& type, | 34 const base::string16& type, |
36 const base::string16& file_name); | 35 const base::string16& file_name); |
37 | 36 |
37 ~IndexedDBBlobInfo(); | |
cmumford
2014/08/20 19:43:05
Should this be reordered in the *.cc file too?
jsbell
2014/08/22 20:50:01
Done.
| |
38 | |
38 bool is_file() const { return is_file_; } | 39 bool is_file() const { return is_file_; } |
39 const std::string& uuid() const { return uuid_; } | 40 const std::string& uuid() const { return uuid_; } |
40 const base::string16& type() const { return type_; } | 41 const base::string16& type() const { return type_; } |
41 int64 size() const { return size_; } | 42 int64 size() const { return size_; } |
42 const base::string16& file_name() const { return file_name_; } | 43 const base::string16& file_name() const { return file_name_; } |
43 int64 key() const { return key_; } | 44 int64 key() const { return key_; } |
44 const base::FilePath& file_path() const { return file_path_; } | 45 const base::FilePath& file_path() const { return file_path_; } |
45 const base::Time& last_modified() const { return last_modified_; } | 46 const base::Time& last_modified() const { return last_modified_; } |
46 const base::Closure& mark_used_callback() const { | 47 const base::Closure& mark_used_callback() const { |
47 return mark_used_callback_; | 48 return mark_used_callback_; |
(...skipping 19 matching lines...) Expand all Loading... | |
67 | 68 |
68 // Valid only when this comes out of the database. | 69 // Valid only when this comes out of the database. |
69 int64 key_; | 70 int64 key_; |
70 base::Closure mark_used_callback_; | 71 base::Closure mark_used_callback_; |
71 ReleaseCallback release_callback_; | 72 ReleaseCallback release_callback_; |
72 }; | 73 }; |
73 | 74 |
74 } // namespace content | 75 } // namespace content |
75 | 76 |
76 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ | 77 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_ |
OLD | NEW |