diff options
author | tmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-21 23:19:34 +0000 |
---|---|---|
committer | tmdiep@chromium.org <tmdiep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-21 23:19:34 +0000 |
commit | db378328a94177ed3ad95e421f295cc8e9d3b1d3 (patch) | |
tree | aa37c5411e3bb30c683007ab0d81d586613da883 /extensions/browser/extension_prefs.cc | |
parent | 20bd0b28f6467339e611311aaf241d7eab388578 (diff) | |
download | chromium_src-db378328a94177ed3ad95e421f295cc8e9d3b1d3.zip chromium_src-db378328a94177ed3ad95e421f295cc8e9d3b1d3.tar.gz chromium_src-db378328a94177ed3ad95e421f295cc8e9d3b1d3.tar.bz2 |
Do not assign launch ordinals to ephemeral apps
Ephemeral apps are not shown in the app launcher or NTP, but they are
assigned ordinals, which results in unfilled NTP pages. This patch
does not give ephemeral apps launch ordinals until they are promoted
to fully installed apps.
AppSorting::MarkExtensionAsHidden() was refactored to
AppSorting::SetExtensionVisible() to allow the visibility of the
extension in the NTP to change.
BUG=394192
TEST=browser_tests
Review URL: https://codereview.chromium.org/397903002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/extension_prefs.cc')
-rw-r--r-- | extensions/browser/extension_prefs.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index 3e04d79..b50e716 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -1238,9 +1238,14 @@ void ExtensionPrefs::OnExtensionInstalled( install_flags, install_parameter, extension_dict); - FinishExtensionInfoPrefs(extension->id(), install_time, - extension->RequiresSortOrdinal(), - page_ordinal, extension_dict); + + bool requires_sort_ordinal = extension->RequiresSortOrdinal() && + (install_flags & kInstallFlagIsEphemeral) == 0; + FinishExtensionInfoPrefs(extension->id(), + install_time, + requires_sort_ordinal, + page_ordinal, + extension_dict); } void ExtensionPrefs::OnExtensionUninstalled(const std::string& extension_id, @@ -1453,7 +1458,8 @@ void ExtensionPrefs::SetDelayedInstallInfo( // Add transient data that is needed by FinishDelayedInstallInfo(), but // should not be in the final extension prefs. All entries here should have // a corresponding Remove() call in FinishDelayedInstallInfo(). - if (extension->RequiresSortOrdinal()) { + if (extension->RequiresSortOrdinal() && + (install_flags & kInstallFlagIsEphemeral) == 0) { extension_dict->SetString( kPrefSuggestedPageOrdinal, page_ordinal.IsValid() ? page_ordinal.ToInternalValue() |