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

Side by Side Diff: storage/browser/blob/blob_storage_context.h

Issue 973723002: Merge: Allow offsets in blobs larger than 2GB on 32 bit Chromium builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 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
OLDNEW
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 STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_
6 #define STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ 6 #define STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // wasn't enough memory to hold the item. 115 // wasn't enough memory to hold the item.
116 bool AppendAllocatedBlobItem(const std::string& target_blob_uuid, 116 bool AppendAllocatedBlobItem(const std::string& target_blob_uuid,
117 scoped_refptr<BlobDataItem> data_item, 117 scoped_refptr<BlobDataItem> data_item,
118 InternalBlobData::Builder* target_blob_data); 118 InternalBlobData::Builder* target_blob_data);
119 119
120 // Deconstructs the blob and appends it's contents to the target blob. Items 120 // Deconstructs the blob and appends it's contents to the target blob. Items
121 // are shared if possible, and copied if the given offset and length 121 // are shared if possible, and copied if the given offset and length
122 // have to split an item. 122 // have to split an item.
123 bool AppendBlob(const std::string& target_blob_uuid, 123 bool AppendBlob(const std::string& target_blob_uuid,
124 const InternalBlobData& blob, 124 const InternalBlobData& blob,
125 size_t offset, 125 uint64_t offset,
126 size_t length, 126 uint64_t length,
127 InternalBlobData::Builder* target_blob_data); 127 InternalBlobData::Builder* target_blob_data);
128 128
129 bool IsInUse(const std::string& uuid); 129 bool IsInUse(const std::string& uuid);
130 bool IsBeingBuilt(const std::string& uuid); 130 bool IsBeingBuilt(const std::string& uuid);
131 bool IsUrlRegistered(const GURL& blob_url); 131 bool IsUrlRegistered(const GURL& blob_url);
132 132
133 BlobMap blob_map_; 133 BlobMap blob_map_;
134 BlobURLMap public_blob_urls_; 134 BlobURLMap public_blob_urls_;
135 135
136 // Used to keep track of how much memory is being utilized for blob data, 136 // Used to keep track of how much memory is being utilized for blob data,
137 // we count only the items of TYPE_DATA which are held in memory and not 137 // we count only the items of TYPE_DATA which are held in memory and not
138 // items of TYPE_FILE. 138 // items of TYPE_FILE.
139 size_t memory_usage_; 139 size_t memory_usage_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); 141 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext);
142 }; 142 };
143 143
144 } // namespace storage 144 } // namespace storage
145 145
146 #endif // STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ 146 #endif // STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/fileapi/blob_storage_context_unittest.cc ('k') | storage/browser/blob/blob_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698