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

Unified Diff: ui/base/resource/data_pack.h

Issue 2969123002: Add deduplication logic to .pak files (Closed)
Patch Set: sizeof() Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/resource/data_pack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/data_pack.h
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 56d30d28e3902c87cfea62c7c769684ac1b489da..ffd47a4ad5e90a5f06e00f51b819975697e7d853 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -75,6 +75,8 @@ class UI_DATA_PACK_EXPORT DataPack : public ResourceHandle {
#endif
private:
+ struct Entry;
+ struct Alias;
class DataSource;
class BufferDataSource;
class MemoryMappedDataSource;
@@ -82,11 +84,14 @@ class UI_DATA_PACK_EXPORT DataPack : public ResourceHandle {
// Does the actual loading of a pack file.
// Called by Load and LoadFromFile and LoadFromBuffer.
bool LoadImpl(std::unique_ptr<DataSource> data_source);
+ const Entry* LookupEntryById(uint16_t resource_id) const;
std::unique_ptr<DataSource> data_source_;
- // Number of resources in the data.
+ const Entry* resource_table_;
size_t resource_count_;
+ const Alias* alias_table_;
+ size_t alias_count_;
// Type of encoding for text resources.
TextEncodingType text_encoding_type_;
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/resource/data_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698