summaryrefslogtreecommitdiffstats
path: root/base/data_pack.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:48:07 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:48:07 +0000
commitf017cc9f926a81638e324b51bd418ac7f7feeee0 (patch)
tree8db77306164b5d4498eac4ae729753095430a2e5 /base/data_pack.h
parent3396dc0d719aeca9d4593dfe0f1ab62cdac1629f (diff)
downloadchromium_src-f017cc9f926a81638e324b51bd418ac7f7feeee0.zip
chromium_src-f017cc9f926a81638e324b51bd418ac7f7feeee0.tar.gz
chromium_src-f017cc9f926a81638e324b51bd418ac7f7feeee0.tar.bz2
Try 2: Completely redo how themes are stored on disk and processed at install time.
Same as previous patch, except we now have a BrowserThemeProvider::GetDefaultDisplayProperty() so we don't have UMRs in ntp_resource_cache.cc. BUG=24493,21121 TEST=All the new unit tests pass. All the complex theme startup tests go faster. Previous Review URL: http://codereview.chromium.org/460050 Review URL: http://codereview.chromium.org/499004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/data_pack.h')
-rw-r--r--base/data_pack.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/data_pack.h b/base/data_pack.h
index 7c9abde..8938491 100644
--- a/base/data_pack.h
+++ b/base/data_pack.h
@@ -9,6 +9,8 @@
#ifndef BASE_DATA_PACK_H_
#define BASE_DATA_PACK_H_
+#include <map>
+
#include "base/basictypes.h"
#include "base/ref_counted_memory.h"
#include "base/scoped_ptr.h"
@@ -33,12 +35,16 @@ class DataPack {
// Get resource by id |resource_id|, filling in |data|.
// The data is owned by the DataPack object and should not be modified.
// Returns false if the resource id isn't found.
- bool GetStringPiece(uint32_t resource_id, StringPiece* data);
+ bool GetStringPiece(uint32 resource_id, StringPiece* data);
// Like GetStringPiece(), but returns a reference to memory. This interface
// is used for image data, while the StringPiece interface is usually used
// for localization strings.
- RefCountedStaticMemory* GetStaticMemory(uint32_t resource_id);
+ RefCountedStaticMemory* GetStaticMemory(uint32 resource_id);
+
+ // Writes a pack file containing |resources| to |path|.
+ static bool WritePack(const FilePath& path,
+ const std::map<uint32, StringPiece>& resources);
private:
// The memory-mapped data.