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

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: 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 | « ui/base/resource/data_pack.cc ('k') | ui/base/ui_base_paths.cc » ('j') | 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 665b580a6d7253274442a4860e13ab7c67db7a32..cdab26ef36c04c3aa68b3667c3e3c8b54ade5451 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -662,6 +662,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()) >
« no previous file with comments | « ui/base/resource/data_pack.cc ('k') | ui/base/ui_base_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698