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

Unified Diff: ui/base/resource/resource_bundle.cc

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: . Created 5 years, 8 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
« ui/base/resource/data_pack.cc ('K') | « ui/base/resource/data_pack.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 755307c6ff2d3f234819b9efe942d03e9871c333..2d18cc1512a7cfc14f377c6f1670a2be26039db0 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -663,6 +663,9 @@ void ResourceBundle::AddDataPackFromPathInternal(const base::FilePath& path,
}
void ResourceBundle::AddDataPack(DataPack* data_pack) {
+#if DCHECK_IS_ON()
+ data_pack->CheckForDuplicateResources(data_packs_);
+#endif
data_packs_.push_back(data_pack);
if (GetScaleForScaleFactor(data_pack->GetScaleFactor()) >
« ui/base/resource/data_pack.cc ('K') | « ui/base/resource/data_pack.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698