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

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

Issue 10969044: cros: Implement default app ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 3 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/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index fe9298ccca268d322a2f8e30cb7be7ac8f2cfdb7..534aaac35ff7797f484673309d4bf56400edce81 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -663,7 +663,7 @@ bool ExtensionPrefs::IsAppNotificationDisabled(
}
void ExtensionPrefs::SetAppNotificationDisabled(
- const std::string& extension_id, bool value) {
+ const std::string& extension_id, bool value) {
DCHECK(Extension::IdIsValid(extension_id));
UpdateExtensionPref(extension_id, kPrefAppNotificationDisbaled,
Value::CreateBooleanValue(value));
@@ -1480,15 +1480,8 @@ void ExtensionPrefs::OnExtensionInstalled(
// Clear state that may be registered from a previous install.
extension_dict->Remove(kRegisteredEvents, NULL);
- if (extension->is_app()) {
- syncer::StringOrdinal new_page_ordinal = page_ordinal.IsValid() ?
- page_ordinal : extension_sorting_->GetNaturalAppPageOrdinal();
- if (!extension_sorting_->GetPageOrdinal(id).IsValid())
- extension_sorting_->SetPageOrdinal(id, new_page_ordinal);
- if (!extension_sorting_->GetAppLaunchOrdinal(id).IsValid())
- extension_sorting_->SetAppLaunchOrdinal(
- id, extension_sorting_->CreateNextAppLaunchOrdinal(new_page_ordinal));
- }
+ if (extension->ShouldDisplayInLauncher())
+ extension_sorting_->EnsureValidOrdinals(extension->id(), page_ordinal);
extension_pref_value_map_->RegisterExtension(
id, install_time, initial_state == Extension::ENABLED);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698