OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 5 #ifndef WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
6 #define WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 6 #define WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool AppendBytesItem(BlobData* target_blob_data, | 86 bool AppendBytesItem(BlobData* target_blob_data, |
87 const char* data, int64 length); | 87 const char* data, int64 length); |
88 void AppendFileItem(BlobData* target_blob_data, | 88 void AppendFileItem(BlobData* target_blob_data, |
89 const base::FilePath& file_path, | 89 const base::FilePath& file_path, |
90 uint64 offset, uint64 length, | 90 uint64 offset, uint64 length, |
91 const base::Time& expected_modification_time); | 91 const base::Time& expected_modification_time); |
92 void AppendFileSystemFileItem( | 92 void AppendFileSystemFileItem( |
93 BlobData* target_blob_data, | 93 BlobData* target_blob_data, |
94 const GURL& url, uint64 offset, uint64 length, | 94 const GURL& url, uint64 offset, uint64 length, |
95 const base::Time& expected_modification_time); | 95 const base::Time& expected_modification_time); |
| 96 #if defined(OS_ANDROID) |
| 97 void AppendContentUrlItem( |
| 98 BlobData* target_blob_data, |
| 99 const GURL& url, uint64 offset, uint64 length, |
| 100 const base::Time& expected_modification_time); |
| 101 #endif |
96 | 102 |
97 bool IsInUse(const std::string& uuid); | 103 bool IsInUse(const std::string& uuid); |
98 bool IsBeingBuilt(const std::string& uuid); | 104 bool IsBeingBuilt(const std::string& uuid); |
99 bool IsUrlRegistered(const GURL& blob_url); | 105 bool IsUrlRegistered(const GURL& blob_url); |
100 | 106 |
101 BlobMap blob_map_; | 107 BlobMap blob_map_; |
102 BlobURLMap public_blob_urls_; | 108 BlobURLMap public_blob_urls_; |
103 | 109 |
104 // Used to keep track of how much memory is being utitlized for blob data, | 110 // Used to keep track of how much memory is being utitlized for blob data, |
105 // we count only the items of TYPE_DATA which are held in memory and not | 111 // we count only the items of TYPE_DATA which are held in memory and not |
106 // items of TYPE_FILE. | 112 // items of TYPE_FILE. |
107 int64 memory_usage_; | 113 int64 memory_usage_; |
108 | 114 |
109 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); | 115 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); |
110 }; | 116 }; |
111 | 117 |
112 } // namespace webkit_blob | 118 } // namespace webkit_blob |
113 | 119 |
114 #endif // WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 120 #endif // WEBKIT_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
OLD | NEW |