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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 149046: PageActions can now specify multiple icons and switch between them... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
Index: chrome/browser/extensions/extensions_service.cc
===================================================================
--- chrome/browser/extensions/extensions_service.cc (revision 19579)
+++ chrome/browser/extensions/extensions_service.cc (working copy)
@@ -752,12 +752,16 @@
for (PageActionMap::const_iterator i(page_actions.begin());
i != page_actions.end(); ++i) {
PageAction* page_action = i->second;
- FilePath path = page_action->icon_path();
- if (!file_util::PathExists(path)) {
- ReportExtensionLoadError(extension_path,
- StringPrintf("Could not load icon '%s' for page action.",
- WideToUTF8(path.ToWStringHack()).c_str()));
- return NULL;
+ const std::vector<FilePath>& icon_paths = page_action->icon_paths();
+ for (std::vector<FilePath>::const_iterator iter = icon_paths.begin();
+ iter != icon_paths.end(); ++iter) {
+ FilePath path = *iter;
+ if (!file_util::PathExists(path)) {
+ ReportExtensionLoadError(extension_path,
+ StringPrintf("Could not load icon '%s' for page action.",
+ WideToUTF8(path.ToWStringHack()).c_str()));
+ return NULL;
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698