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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 3250002: Add an accordian effect to NTP. (Closed)
Patch Set: Fix menu positioning when there is a scrollbar. Created 10 years, 4 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/dom_ui/app_launcher_handler.cc
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 6b395f24ce29adf2ca615acfb18a2fd0d26d0b1c..2d3dee697d77c44afa201989863306e306a62c04 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -41,17 +41,11 @@ bool ExtractInt(const ListValue* list, size_t index, int* out_int) {
std::string GetIconURL(Extension* extension, Extension::Icons icon,
const std::string& default_val) {
- ExtensionResource resource = extension->GetIconPath(icon);
- if (resource.empty())
+ GURL url = extension->GetIconURL(icon);
+ if (!url.is_empty())
+ return url.spec();
+ else
return default_val;
-
-#if defined(OS_POSIX)
- std::string path = resource.relative_path().value();
-#elif defined(OS_WIN)
- std::string path = WideToUTF8(resource.relative_path().value());
-#endif // OS_WIN
-
- return extension->GetResourceURL(path).spec();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698