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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 489753002: Added proper extension manifest parser for launcher_page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Blank line. Created 6 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
« no previous file with comments | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 382de360605b707b7950c2ffcdd5f48f09e7a707..0a7e3aabae4a01bd69da16a6083ef13ca0714061 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -41,8 +41,8 @@
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_set.h"
-#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
+#include "extensions/common/manifest_handlers/launcher_page_info.h"
#include "grit/theme_resources.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/app_list_view_delegate_observer.h"
@@ -135,20 +135,12 @@ void GetCustomLauncherPageUrls(content::BrowserContext* browser_context,
it != enabled_extensions.end();
++it) {
const extensions::Extension* extension = it->get();
- const extensions::Manifest* manifest = extension->manifest();
- if (!manifest->HasKey(extensions::manifest_keys::kLauncherPage))
+ extensions::LauncherPageInfo* info =
+ extensions::LauncherPageHandler::GetInfo(extension);
+ if (!info)
continue;
- std::string launcher_page_page;
- if (!manifest->GetString(extensions::manifest_keys::kLauncherPagePage,
- &launcher_page_page)) {
- // TODO(mgiuca): Add a proper manifest parser to catch this error properly
- // and display it on the extensions page.
- LOG(ERROR) << "Extension " << extension->id() << ": "
- << extensions::manifest_keys::kLauncherPage
- << " has no 'page' attribute; will be ignored.";
- continue;
- }
- urls->push_back(extension->GetResourceURL(launcher_page_page));
+
+ urls->push_back(extension->GetResourceURL(info->page));
}
}
« no previous file with comments | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698