summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_icon_set.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/extension_icon_set.cc')
-rw-r--r--chrome/common/extensions/extension_icon_set.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/common/extensions/extension_icon_set.cc b/chrome/common/extensions/extension_icon_set.cc
index 1f1dd21..fc1ac58 100644
--- a/chrome/common/extensions/extension_icon_set.cc
+++ b/chrome/common/extensions/extension_icon_set.cc
@@ -15,7 +15,7 @@ void ExtensionIconSet::Clear() {
}
void ExtensionIconSet::Add(int size, const std::string& path) {
- DCHECK(path.size() > 0 && path[0] != '/');
+ CHECK(path.size() > 0 && path[0] != '/');
map_[size] = path;
}
@@ -50,10 +50,14 @@ std::string ExtensionIconSet::Get(int size, MatchType match_type) const {
}
bool ExtensionIconSet::ContainsPath(const std::string& path) const {
- DCHECK(path.size() > 0 && path[0] != '/');
+ if (path.empty())
+ return false;
+
+ CHECK(path[0] != '/') <<
+ "ExtensionIconSet stores icon paths without leading slash.";
+
for (IconMap::const_iterator iter = map_.begin(); iter != map_.end();
++iter) {
- LOG(ERROR) << iter->second << " , " << path;
if (iter->second == path)
return true;
}