Split Extension::ShouldDisplayInLauncher into ShouldDisplayIn{AppLauncher,NewTabPage}.
Adds manifest property show_in_new_tab_page (default value=show_in_launcher)
to give component apps a way to indicate that they should only appear in the
app launcher, and not the browser new tab page.
BUG=158880
TEST=unit_tests --gtest_filter=ExtensionTest.DisplayInXManifestProperties, and (on Windows)
settings app icon does appear on app launcher: ./chrome --user-data-dir=empty --enable-settings-app --show-app-list
settings app icon does not appear on NTP: ./chrome --user-data-dir=empty --enable-settings-app
Review URL: https://chromiumcodereview.appspot.com/11362081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166849 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index ddbcf120..c1134a7 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2088,7 +2088,7 @@
// All apps that are displayed in the launcher are ordered by their ordinals
// so we must ensure they have valid ordinals.
- if (extension->ShouldDisplayInLauncher()) {
+ if (extension->RequiresSortOrdinal()) {
extension_prefs_->extension_sorting()->EnsureValidOrdinals(
extension->id(), syncer::StringOrdinal());
}