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

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

Issue 1115033003: resources: Prevent including the same resource in multiple pack files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 5 years, 7 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 | « tools/gritsettings/resource_ids ('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 1bf87365d93dfa7970ba13796cf2595c7adb3349..1ca3f101240786bec2d07e15bde0772af3430277 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -15,6 +15,7 @@
#include "base/files/file.h"
#include "base/files/memory_mapped_file.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/strings/string_piece.h"
#include "ui/base/resource/resource_handle.h"
#include "ui/base/ui_base_export.h"
@@ -59,6 +60,12 @@ class UI_BASE_EXPORT DataPack : public ResourceHandle {
TextEncodingType GetTextEncodingType() const override;
ui::ScaleFactor GetScaleFactor() const override;
+#if DCHECK_IS_ON()
+ // Checks to see if any resource in this DataPack already exists in the list
+ // of resources.
+ void CheckForDuplicateResources(const ScopedVector<ResourceHandle>& packs);
+#endif
+
private:
// Does the actual loading of a pack file. Called by Load and LoadFromFile.
bool LoadImpl();
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/resource/data_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698